oracle.ide.runner
Interface StarterFactoryDescription
public interface StarterFactoryDescription
Provides a description of a StarterFactory that can be lazily loaded by
a StarterFactoryProvider. In the implementation of StarterFactoryDescriptions,
it is important to delay the loading, and initialization, of the StarterFactory
as long as possible.
- Since:
- 11.1.2.0.0
Method Summary |
boolean |
areRulesSatisfied(Project project,
Node node)
Determine if the rules, if any, of the StarterFactory registration
are satisfied by the incoming project to be run/debugged. |
java.lang.String |
getKey()
Return a unique String that identifies this StarterFactoryDescription |
StarterFactory |
getStarterFactory()
Get an instance of the StarterFactory. |
java.lang.String |
getStarterFactoryBaseClassName()
Get the name of the base class of the StarterFactory. |
java.lang.Class |
getStarterFactoryClass()
Get the Class object of the StarterFactory. |
java.lang.String |
getStarterFactoryClassName()
What is the name of the StarterFactory class?
It should be possible to answer this question using the StarterFactory
declaration in the extension.xml file without instantiating the
extension that owns the StarterFactory |
java.lang.Class |
getTargetClass()
Get the Class object of the target this StarterFactory can start. |
java.lang.String |
getTargetClassName()
What is the name of the target class that the StarterFactory can start?
It should be possible to answer this question using the StarterFactory
declaration in the extension.xml file without instantiating the
extension that owns the StarterFactory |
boolean |
hasInitializedStarterFactory()
Determine if the StarterFactory, and its module, have already been
initialized. |
boolean |
isAcceptableNode(Project project,
Node node)
Determine if the Node of the target that needs to be started is
acceptable. |
boolean |
isAcceptableProject(Project project)
Determine if the project of the target that needs to be started is
acceptable. |
boolean |
isAcceptableStarterFactory(java.lang.Class starterFactoryClass)
Determine if the incoming StarterFactory Class is acceptable
to the registered StarterFactory Class and BaseClass. |
boolean |
isAcceptableTarget(java.lang.Class targetClass,
boolean exactTargetClass)
Determine if the StarterFactory finds the incoming targetClass
acceptable. |
getKey
java.lang.String getKey()
- Return a unique String that identifies this StarterFactoryDescription
- Returns:
- A unique identifier
getTargetClassName
java.lang.String getTargetClassName()
- What is the name of the target class that the StarterFactory can start?
It should be possible to answer this question using the StarterFactory
declaration in the extension.xml file without instantiating the
extension that owns the StarterFactory
- Returns:
- The fully qualified name of the target class, which should
not be null
getStarterFactoryClassName
java.lang.String getStarterFactoryClassName()
- What is the name of the StarterFactory class?
It should be possible to answer this question using the StarterFactory
declaration in the extension.xml file without instantiating the
extension that owns the StarterFactory
- Returns:
- The full qualified name of the StarterFactory class,
which should not be null
getStarterFactoryBaseClassName
java.lang.String getStarterFactoryBaseClassName()
- Get the name of the base class of the StarterFactory. This base class
name is used to determine if the StarterFactory requested by the
RunProcess is the same or derived from this base class. By default
this method can return null, indicating that the default
oracle.ide.runner.StarterFactory class name should be used.
It should be possible to answer this question using the StarterFactory
declaration in the extension.xml file without instantiating the
extension that owns the StarterFactory
- Returns:
- NULL to indicate the default value should be used, or a
the fully qualified name of a base class of the StarterFactory
getTargetClass
java.lang.Class getTargetClass()
- Get the Class object of the target this StarterFactory can start.
In general this method is not called since there is a good
chance it will cause initialization of the extension that
owns the StarterFactory
- Returns:
- The Class object of the target
areRulesSatisfied
boolean areRulesSatisfied(Project project,
Node node)
- Determine if the rules, if any, of the StarterFactory registration
are satisfied by the incoming project to be run/debugged.
It should be possible to answer this question using the StarterFactory
declaration in the extension.xml file without instantiating the
extension that owns the StarterFactory
- Parameters:
project
- The project to be run/debugged, which can be NULL
if the project is not knownnode
- The Node being started for the run/debug session
- Returns:
- True if the rules, if any, are satisfied OR if there are
no rules OR the project is NULL. Return false otherwise.
isAcceptableTarget
boolean isAcceptableTarget(java.lang.Class targetClass,
boolean exactTargetClass)
- Determine if the StarterFactory finds the incoming targetClass
acceptable. Normally, acceptable means that the incoming targetClass
derives from, or is, the targetClass registered with the StarterFactory
This method should execute very quickly, it is used to enable/disable
menu items and other time-sensitive actions.
It should be possible to answer this question using the StarterFactory
declaration in the extension.xml file without instantiating the
extension that owns the StarterFactory
- Parameters:
targetClass
- The Class of a target that needs to be startedexactTargetClass
- If true, only consider the exact target class,
such as only accept it if the incoming targetClass is the exact class
registered with the StarterFactory
- Returns:
- True if the targetClass is acceptable
isAcceptableProject
boolean isAcceptableProject(Project project)
- Determine if the project of the target that needs to be started is
acceptable. This allows for more in-depth queries, such as if the
project has certain properties or files
This method should execute fairly quickly; it is called after the user
has already decided to run/debug/profile, and the runner is trying to
find the best StarterFactory for the run.
It should be possible to answer this question without initializing
the StarterFactory.
- Parameters:
project
- The project of the target that needs to be started,
which can be NULL if the project is not known
- Returns:
- True if the project is acceptable
isAcceptableNode
boolean isAcceptableNode(Project project,
Node node)
- Determine if the Node of the target that needs to be started is
acceptable. This allows for more in-depth queries, such as looking
inside the Node for annotations or other markers.
This method should execute fairly quickly; it is called after the user
has already decided to run/debug/profile, and the runner is trying to
find the best StarterFactory for the run.
It should be possible to answer this question without initializing
the StarterFactory.
- Parameters:
project
- The project of the target that needs to be started,
which can be NULL if the project is not knownnode
- The Node of the target that needs to be started
- Returns:
- True if the node is acceptable
hasInitializedStarterFactory
boolean hasInitializedStarterFactory()
- Determine if the StarterFactory, and its module, have already been
initialized.
- Returns:
- True if the StarterFactory has been initialized
isAcceptableStarterFactory
boolean isAcceptableStarterFactory(java.lang.Class starterFactoryClass)
- Determine if the incoming StarterFactory Class is acceptable
to the registered StarterFactory Class and BaseClass. Normally,
acceptable means that the incoming class is derived from
the registered StarterFactory BaseClass or is derived from
the default StarterFactory base class (oracle.ide.runner.StarterFactory)
It should be possible to answer this question using the StarterFactory
declaration in the extension.xml file without instantiating the
extension that owns the StarterFactory
- Parameters:
starterFactoryClass
- The StarterFactory
- Returns:
- True if the incoming Class is acceptable
getStarterFactoryClass
java.lang.Class getStarterFactoryClass()
- Get the Class object of the StarterFactory. This will usually
not be called.
Will only be called after hasInitializedStarterFactory returns
true, OR after isAcceptableTarget/Project/Node all return true,
since this causes the StarterFactory and its module to
be initialized
- Returns:
- The Class object of the StarterFactory
getStarterFactory
StarterFactory getStarterFactory()
- Get an instance of the StarterFactory.
Will only be called after hasInitializedStarterFactory returns
true, OR after isAcceptableTarget/Project/Node all return true,
since this causes the StarterFactory and its module to
be initialized
- Returns:
- An instance of the StarterFactory
Copyright © 1997, 2011, Oracle. All rights reserved.