|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--adavid.reflect.JavaFinder
JavaFinder a java source finder: works on the class path and the property java.source.path which contains path to java source like CLASSPATH The property is given to the program via the command line with the option -Djava.source.path=... Something strange is that if we change dynamically java.class.path, the virtual machine does not take it into account! Zip files may be given in argument, with a special clause [sub directory] which says to search into the given sub directory ; this clause is ignored for normal directories.
Field Summary | |
static java.lang.String |
JAVA_PROPERTY_DEF
the property definition |
Constructor Summary | |
JavaFinder()
|
Method Summary | |
static int |
countDimensions(java.lang.String name)
returns the number of dimensions of the given name, i.e. |
static int |
endOf(int pos,
java.lang.String string)
finds the end of a token |
static java.lang.String |
getFile(java.lang.String filename,
java.lang.String extension)
returns the string content of the given filename ; null if error |
static java.lang.String |
getjjSource(java.lang.Class aClass)
|
static java.lang.String |
getjjSource(java.lang.String className)
returns the jj source of a class; by absolute name ; null if not found, or error |
static java.lang.String |
getSource(java.lang.Class aClass)
returns the source of a class:java or jj |
static java.lang.String |
getSource(java.lang.String className)
returns the source of a class; by absolute name ; null if not found, or error |
static Interval |
getSourcePos(java.lang.String name,
java.lang.String[] args,
java.lang.String source)
returns the interval where the source of the constructor/method can be found ; arguments are the name(short) and the arguments(long) not supported: type / comment / []... |
static int |
goBack(java.lang.String source,
int pos)
go back, jumps comments |
static void |
initJavaResource()
initializes the java source resource This may be useful if the user changes the value of java.source.path and wants a dynamic update. |
static int |
jump(int pos,
java.lang.String string)
jump until the next token, ignoring comments, blanks and , if we are on a token, then jump first to the end of this token |
static void |
main(java.lang.String[] args)
test |
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 JAVA_PROPERTY_DEF
Constructor Detail |
public JavaFinder()
Method Detail |
public static void initJavaResource()
public static java.lang.String getSource(java.lang.Class aClass)
public static java.lang.String getjjSource(java.lang.Class aClass)
public static java.lang.String getFile(java.lang.String filename, java.lang.String extension)
filename
- : absolute class nameextension:
- extension of the filepublic static java.lang.String getSource(java.lang.String className)
public static java.lang.String getjjSource(java.lang.String className)
public static int countDimensions(java.lang.String name)
public static int goBack(java.lang.String source, int pos)
public static Interval getSourcePos(java.lang.String name, java.lang.String[] args, java.lang.String source)
public static int jump(int pos, java.lang.String string)
public static int endOf(int pos, java.lang.String string)
public static void main(java.lang.String[] args)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |