org.openide.compiler
Class CompilerType

java.lang.Object
  |
  +--org.openide.ServiceType
        |
        +--org.openide.compiler.CompilerType
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ExternalCompilerType

public abstract class CompilerType
extends ServiceType

Base class defining method for compilation service.

See Also:
Serialized Form

Inner classes inherited from class org.openide.ServiceType
ServiceType.Handle, ServiceType.Registry
 
Fields inherited from class org.openide.ServiceType
PROP_NAME
 
Constructor Summary
CompilerType()
           
 
Method Summary
static Enumeration compilerTypes()
          Get all registered compilers.
static CompilerType find(Class clazz)
          Find the compiler type implemented as a given class, among the services registered to the system.
static CompilerType find(String name)
          Find the compiler with requested name, among the services registered to the system.
static CompilerType getDefault()
          Deprecated. This is probably useless since compiler types normally apply to specific data object types, so no single compiler would be useful in all circumstances.
 HelpCtx getHelpCtx()
          Get context help for this service type.
abstract  void prepareJob(CompilerJob job, Class type, DataObject obj)
          Prepare a data object for compilation.
 
Methods inherited from class org.openide.ServiceType
addPropertyChangeListener, clone, createClone, displayName, firePropertyChange, getName, removePropertyChangeListener, setName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompilerType

public CompilerType()
Method Detail

getHelpCtx

public HelpCtx getHelpCtx()
Description copied from class: ServiceType
Get context help for this service type.
Overrides:
getHelpCtx in class ServiceType
Following copied from class: org.openide.ServiceType
Returns:
context help

prepareJob

public abstract void prepareJob(CompilerJob job,
                                Class type,
                                DataObject obj)
Prepare a data object for compilation. Implementations should create an instance of a suitable subclass of Compiler, passing the compiler job to the constructor so that the job may register the compiler.
Parameters:
job - compiler job to add compilers to
type - the type of compilation task to manage (CompilerCookie.Compile, etc.)
obj - data object to prepare for compilation

compilerTypes

public static Enumeration compilerTypes()
Get all registered compilers.
Returns:
enumeration of CompilerTypes

find

public static CompilerType find(Class clazz)
Find the compiler type implemented as a given class, among the services registered to the system.

This should be used during (de-)serialization of the specific compiler type for a data object: only store its class name and then try to find the compiler implemented by that class later.

Parameters:
clazz - the class of the compiler type looked for
Returns:
the desired compiler type or null if it does not exist

find

public static CompilerType find(String name)
Find the compiler with requested name, among the services registered to the system.

This should be used during (de-)serialization of the specific compiler type for a data object: only store its name and then try to find the debugger later.

Parameters:
name - (display) name of compiler to find
Returns:
the desired compiler or null if it does not exist

getDefault

public static CompilerType getDefault()
Deprecated. This is probably useless since compiler types normally apply to specific data object types, so no single compiler would be useful in all circumstances.

Gets the default compiler type in the system.


Built on December 12 2001.  |  Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.