|
Cramfull Compiled Resources v2.00 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--be.arci.pub.ResourceCompiler
Utility class to compile a (set of) Resorcer subclass(es). This is a very elaborated example of a user interface to ClassCompiler, the class that actually compiles Cramfull classes.
ResourceCompiler compiles a set of resource files into one or more
Cramfull subclasses. An example of also compiling serialized objects
into Cramfull subclasses is given in SerializingResourceCompiler
We supply this class as a free service to all users of the Cramfull Compiled Resources library. You are allowed to modify this source code, provided you move the class out of the be.arci package hierarchy.
USAGE: java be.arci.pub.ResourceCompiler [arguments]
Any number of arguments of each type can be given. Commandline arguments are interpreted left to right, command file arguments top to bottom.
ARGUMENTS:
Subsequent resources will be encoded in the class Out. The default Out name is "MyCramfull", in replace mode. The class-file for any previous Out argument is compiled when a new Out argument is encountered. A package directory tree for Out is created as needed.
Example:
Evaluation version
ClassCompiler,
be.arci.cramfull.Cramfull,
SerializingResourceCompiler| Field Summary | |
protected ClassCompiler |
compiler
|
static java.lang.String |
DEFAULT_CRAMFULL
Default qualified class-name for Cramfull subclass to compile (this class) or view (ResourceViewer) |
protected java.lang.String |
sEncoder
Encoder to use for subsequent resources |
| Constructor Summary | |
protected |
ResourceCompiler()
Does nothing |
| Method Summary | |
protected void |
addResource(CompilerEntry ce)
Adds a CompilerEntry to compile, checking for duplicates on canonical file name |
protected void |
closeCompiler()
Calls ClassCompiler to encode the resources and compile the class. |
protected void |
compile(java.util.Vector vecArgs)
Does everything else. |
static java.util.Vector |
expandCommandfiles(java.lang.String[] args)
Expands command file arguments into args. |
static void |
main(java.lang.String[] args)
Runs a ResourceCompiler with commandline arguments. |
protected void |
openCompiler(java.io.File flOutputdir,
java.lang.String sOutputClass,
boolean swReplace)
Opens a new ClassCompiler, which starts writing the output class. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final java.lang.String DEFAULT_CRAMFULL
Cramfull,
ResourceViewerprotected java.lang.String sEncoder
protected ClassCompiler compiler
| Constructor Detail |
protected ResourceCompiler()
| Method Detail |
public static void main(java.lang.String[] args)
public static java.util.Vector expandCommandfiles(java.lang.String[] args)
protected void openCompiler(java.io.File flOutputdir,
java.lang.String sOutputClass,
boolean swReplace)
throws java.io.IOException
ClassCompiler.addSerialized(java.lang.String, java.lang.String, java.lang.Object),
SerializingResourceCompiler
protected void addResource(CompilerEntry ce)
throws java.io.IOException
protected void closeCompiler()
throws java.io.IOException
protected void compile(java.util.Vector vecArgs)
|
Cramfull Compiled Resources v2.00 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||