|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.wtkx.Compiler
public class Compiler
Provides the facility by which WTKX resources can be compiled into Java
classes. This enables callers to leverage compile-time checking of their
WTKX files as well as a performance improvement over runtime WTKX parsing
(via WTKXSerializer
).
NOTE: This class contains experimental functionality and should be considered a "preview" until a future release.
Constructor Summary | |
---|---|
Compiler()
Creates a new Compiler. |
Method Summary | |
---|---|
boolean |
compile(Class<?> referenceClass,
String resourceName,
Iterable<String> options)
Compiles a WTKX resource into a Java class file. |
static Class<Bindable.ObjectHierarchy> |
getClass(Class<?> referenceClass,
String resourceName)
Gets the compiled class created from a WTKX resource. |
static String |
getPreferredClassName(Class<?> referenceClass,
String resourceName)
Returns the preferred class name for a compiled WTKX resource. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Compiler()
Method Detail |
---|
public boolean compile(Class<?> referenceClass, String resourceName, Iterable<String> options) throws IOException
referenceClass
- The class relative to which the WTKX resource can be found.resourceName
- A path name that identifies the WTKX resource. The path name should be
of the form defined by Class.getResource(String)
and is relative
to the base package. Note that this is the same form as is defined in
Bindable.Load.resourceName()
.options
- Compiler options, or null for no options.
IOException
public static String getPreferredClassName(Class<?> referenceClass, String resourceName)
WTKXSerializer
) based on their preferred class names.
referenceClass
- The class relative to which the WTKX resource will be considered.
Use null to specify that the WTKX resource is relative to no
class.resourceName
- A path name that identifies the WTKX resource. The path name should be
of the form defined by Class.getResource(String)
and is relative
to the reference class. Note that this is the same form as is defined in
Bindable.Load.resourceName()
.
public static Class<Bindable.ObjectHierarchy> getClass(Class<?> referenceClass, String resourceName)
referenceClass
- The class relative to which the WTKX resource will be considered.
Use null to specify that the WTKX resource is relative to no
class.resourceName
- A path name that identifies the WTKX resource. The path name should be
of the form defined by Class.getResource(String)
and is relative
to the reference class. Note that this is the same form as is defined in
Bindable.Load.resourceName()
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |