|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jtool.jxplatform.query.QueryFile
A utility class which provides quaries about files.
Do not pass null to any parameter in methods in this class.
| Constructor Summary | |
QueryFile()
|
|
| Method Summary | |
boolean |
containsClassesWithName(JxFile jfile,
java.lang.String cname)
Tests if a given file contains a class with a given name. |
static boolean |
definesClass(JxFile jfile,
JxClass jclass)
Tests if a given file defines a given class. |
static boolean |
definesClass(JxFile jfile,
java.lang.String cname)
Tests if a given file defines a class with a given name. |
static JxFileList |
getAllFilesInTheSamePackage(JxFile jfile)
Obtains all files in a package where a given file exists. |
static JxClass |
getClassWithName(JxFile jfile,
java.lang.String cname)
Obtains a class with a given name which a given file can access. |
static java.util.ArrayList |
getJxAccessesUsingField(JxFile jfile,
JxField jfield)
Obtains all field access wrappers in a given file that access a given field. |
static java.util.ArrayList |
getJxCallsUsingMethod(JxFile jfile,
JxMethod jmethod)
Obtains all method call wrappers in a given file tha call a given method. |
static java.util.ArrayList |
getTypesOfClass(JxFile jfile,
JxClass jclass)
Obtains all types in a given file which indicate a given class. |
static boolean |
imports(JxFile jfile,
JxClass jclass)
Tests if a given file imports a given class. |
static boolean |
usesJxClassExceptSelf(JxFile jfile,
JxClass jclass)
Tests if a given file uses a given class exception the class itself. |
static boolean |
usesType(JxFile jfile,
java.lang.String fqn)
Tests if a given file uses a type with a given fully-qualified name. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public QueryFile()
| Method Detail |
public static boolean definesClass(JxFile jfile,
JxClass jclass)
jfile - A file wrapper.jclass - A class wrapper.
true if the file defines the class, otherwise false.
public static boolean definesClass(JxFile jfile,
java.lang.String cname)
jfile - A file wrapper.cname - A class name.
true if the file defines the class, otherwise false.
public static boolean usesType(JxFile jfile,
java.lang.String fqn)
throws JxUnknownResultException
jfile - A file wrapper.fqn - The fully qualified name of a type.
true if the file uses the type, otherwise false.
JxUnknownResultException - if the result is unknown.
public static java.util.ArrayList getTypesOfClass(JxFile jfile,
JxClass jclass)
throws JxUnknownResultException
jfile - a file wrapper.jclass - a class wrapper.
JxType objects.
JxUnknownResultException - if the result is unknown.
public static boolean usesJxClassExceptSelf(JxFile jfile,
JxClass jclass)
throws JxUnknownResultException
jfile - a file wrapper.jclass - a class warpper.
true if the file uses the class, otherwise false.
JxUnknownResultException - if the result is unknown.
public static java.util.ArrayList getJxCallsUsingMethod(JxFile jfile,
JxMethod jmethod)
throws JxUnknownResultException
jfile - a file wrapper.jmethod - a method wrapper.
JxMethodCall objects.
JxUnknownResultException - if the result is unknown.
public static java.util.ArrayList getJxAccessesUsingField(JxFile jfile,
JxField jfield)
throws JxUnknownResultException
jfile - a file wrapper.jfield - a field wrapper.
JxFieldAccess objects.
JxUnknownResultException - if the result is unknown.
public boolean containsClassesWithName(JxFile jfile,
java.lang.String cname)
throws JxUnknownResultException
jfile - a file wrapper.cname - a class name.
true if the file contains the class.
JxUnknownResultException - if the result is unknown.
public static JxClass getClassWithName(JxFile jfile,
java.lang.String cname)
throws JxUnknownResultException
jfile - a file wrapper.cname - a class name.
null if no class was found.
JxUnknownResultException - if the result is unknown.
public static JxFileList getAllFilesInTheSamePackage(JxFile jfile)
throws JxUnknownResultException
jfile - a file wrapper.
JxUnknownResultException - if the result is unknown.
public static boolean imports(JxFile jfile,
JxClass jclass)
throws JxUnknownResultException
jfile - a file wrapper.jclass - a class wrapper.
true if the file imports the class.
JxUnknownResultException - if the result is unknown.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||