|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dellroad.jc.Generate
Singleton class used as the starting point for object file generation.
The JC virtual machine will invoke generateObject()
on the singleton instance when it needs to create a new ELF object file.
The object file is actually generated by whatever ObjectGenerator
is specified by the jc.object.generator
system property.
By default, a
JCObjectGenerator
is used.
Field Summary | |
static char |
FILE_SEPARATOR
The system-dependent character used to separate directory names in a path name. |
static char |
PATH_SEPARATOR
The system-dependent character used to separate individual paths in a search path. |
Method Summary | |
static String |
decode(String s)
Reverse of encode(java.lang.String) . |
static String |
encode(String name)
Equivalent to encode(name, false) . |
static String |
encode(String name,
boolean ignoreSlashes)
Encode a name so that it uses only "safe" 7-bit characters so that it's suitable for use as a file name. |
void |
generateObject(String className,
ClassLoader loader)
Generate the ELF object file for the named class. |
static long |
hash(InputStream s)
Return the "JC hash" of some bytes. |
static File |
objectFile(String className)
Return the file that contains the ELF object for the class. |
static File |
objectFile(String className,
File dir)
Return the file that contains the ELF object for the class, given that dir is the root of the object directory
hierarchy.
|
static Generate |
v()
Retrieve the singleton instance of this class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final char FILE_SEPARATOR
public static final char PATH_SEPARATOR
Method Detail |
public static Generate v()
public void generateObject(String className, ClassLoader loader) throws Exception
jc.object.path
system property.
className
- name of class (with slashes not dots).loader
- class loader used to acquire the class file
Exception
objectFile()
public static File objectFile(String className)
jc.object.path
system property.
public static File objectFile(String className, File dir)
dir
is the root of the object directory
hierarchy.
This method does not depend on the jc.object.path
and therefore may be used when running under other Java VM's.
public static long hash(InputStream s)
public static String encode(String name)
encode(name, false)
.
public static String encode(String name, boolean ignoreSlashes)
name
- Class nameignoreSlashes
- whether to pass slash characters through
unencoded or convert them to underscores.public static String decode(String s)
encode(java.lang.String)
.
IllegalArgumentException
- if s
is not validly encoded.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |