|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jtool.jxplatform.query.QueryField
A utility class which provides quaries about fields.
Do not pass null to any parameter in methods in this class.
| Constructor Summary | |
QueryField()
|
|
| Method Summary | |
static boolean |
callsMethod(JxField jfield)
Tests if a given field calls any method. |
static boolean |
callsMethodInAncestorsOfClass(JxField jfield,
JxClass jclass)
Tests if a given field calls any method in ancestors of a given class. |
static boolean |
callsMethodInClass(JxField jfield,
JxClass jclass)
Tests if a given field calls any method in a given class. |
static boolean |
callsPrivateMethodsInClass(JxField jfield,
JxClass jclass)
Tests if a given field calls any private method in a given class. |
static JxMethodList |
getCalledMethodsInClass(JxField jfield,
JxClass jclass)
Obtains all methods which are called by a given field and which are in a given class. |
static JxFieldList |
getFieldsWithTheSameName(JxField jfield,
JxClassList jclasses)
Obtains all fields in a given collection with the same name as a given field. |
static JxFieldList |
getHiddenFields(JxField jfield)
Obtains all fields hidden by a given field. |
static JxFieldList |
getHiddenFields(JxField jfield,
JxClassList ancestors)
Obtains all fields hidden by a given field. |
static JxFieldList |
getHidingFields(JxField jfield)
Obtains all fields hiding a given field. |
static JxFieldList |
getHidingFields(JxField jfield,
JxClassList descendants)
Obtains all fields hiding a given field. |
static java.lang.String |
getSuffixName(java.lang.String name)
Returns the suffix name of a getter and setter of a field. |
static JxFieldList |
getUsedFieldsInAncestorsOfClass(JxField jfield,
JxClass jclass)
Obtains all fields which are used by a given field and which are in ancestors of a given class. |
static JxFieldList |
getUsedFieldsInClass(JxField jfield,
JxClass jclass)
Obtains all fields which are used by a given field and which are in a given class. |
static JxMethod |
guessGettter(JxField jfield)
Guesses and returns the getter of a given field. |
static JxMethod |
guessSettter(JxField jfield)
Guesses and returns the setter of a given field. |
static boolean |
hides(JxField jf1,
JxField jf2)
Tests if a given field hides a given field. |
static boolean |
inSimpleAssignments(JxField jfield,
JxClass jclass)
Tests if all accesses to a given field in a given class are contained in simple assignments. |
static boolean |
usesField(JxField jfield)
Tests if a given field uses another field. |
static boolean |
usesFieldInAncestorsOfClass(JxField jfield,
JxClass jclass)
Tests if a given field uses any field in ancestors of a given class. |
static boolean |
usesFieldInClass(JxField jfield,
JxClass jclass)
Tests if a given field uses another field in a given class. |
static boolean |
usesPrivateFieldInClass(JxField jfield,
JxClass jclass)
Tests if a given field uses any private field in a given class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public QueryField()
| Method Detail |
public static boolean usesField(JxField jfield)
throws JxUnknownResultException
jfield - A field wrapper.
true if the field uses another field, otherwise false.
JxUnknownResultException - if the result is unknown.
public static boolean callsMethod(JxField jfield)
throws JxUnknownResultException
jfield - A field wrapper.
true if the field calls any method, otherwise false.
JxUnknownResultException - if the result is unknown.
public static boolean usesFieldInClass(JxField jfield,
JxClass jclass)
throws JxUnknownResultException
jfield - A field wrapper.jclass - A class wrapper.
true if the field uses another field, otherwise false.
JxUnknownResultException - if the result is unknown.
public static boolean usesFieldInAncestorsOfClass(JxField jfield,
JxClass jclass)
throws JxUnknownResultException
jfield - A field wrapper.jclass - A class wrapper.
true if the field uses another field, otherwise false.
JxUnknownResultException - if the result is unknown.
public static JxFieldList getUsedFieldsInClass(JxField jfield,
JxClass jclass)
throws JxUnknownResultException
jfield - A field wrapper.jclass - A class wrapper.
JxUnknownResultException - if the result is unknown.
public static boolean callsMethodInClass(JxField jfield,
JxClass jclass)
throws JxUnknownResultException
jfield - A fiels wrapper.jclass - A class wrapper.
true if the field calls any method, otherwise false.
JxUnknownResultException - if the result is unknown.
public static boolean callsMethodInAncestorsOfClass(JxField jfield,
JxClass jclass)
throws JxUnknownResultException
jfield - A field wrapper.jclass - A class wrapper.
true if the field calls any method, otherwise false.
JxUnknownResultException - if the result is unknown.
public static JxMethodList getCalledMethodsInClass(JxField jfield,
JxClass jclass)
throws JxUnknownResultException
jfield - A field wrapper.jclass - A class wrapper.
JxUnknownResultException - if the result is unknown.
public static boolean usesPrivateFieldInClass(JxField jfield,
JxClass jclass)
throws JxUnknownResultException
jfield - A field wrapper.jclass - A class wrapper.
true if the field uses any private field, otherwise false.
JxUnknownResultException - if the result is unknown.
public static boolean callsPrivateMethodsInClass(JxField jfield,
JxClass jclass)
throws JxUnknownResultException
jfield - A field wrapper.jclass - A class wrapper.
true if the field calls any private method, otherwise false.
JxUnknownResultException - if the result is unknown.
public static JxFieldList getUsedFieldsInAncestorsOfClass(JxField jfield,
JxClass jclass)
throws JxUnknownResultException
jfield - A field wrapper.jclass - A class wrapper.
JxUnknownResultException - if the result is unknown.
public static JxFieldList getFieldsWithTheSameName(JxField jfield,
JxClassList jclasses)
jfield - A field wrapper.jclasses - The collection of class wrappers.
public static JxFieldList getHiddenFields(JxField jfield)
throws JxUnknownResultException
jfield - A field wrapper.
JxUnknownResultException - if the result is unknown.
public static JxFieldList getHiddenFields(JxField jfield,
JxClassList ancestors)
throws JxUnknownResultException
jfield - A field wrapper.ancestors - A collection of ancestors to be examined.
JxUnknownResultException - if the result is unknown.
public static JxFieldList getHidingFields(JxField jfield)
throws JxUnknownResultException
jfield - A field wrapper.
JxUnknownResultException - if the result is unknown.
public static JxFieldList getHidingFields(JxField jfield,
JxClassList descendants)
throws JxUnknownResultException
jfield - A field wrapper.descendants - A collection of descendants to be examined.
JxUnknownResultException - if the result is unknown.
public static boolean hides(JxField jf1,
JxField jf2)
jf1 - A wrapper of a hiding field.jf2 - A wrapper of a hidden field.
true if the first field hides by the second field, otherwise false.
public static boolean inSimpleAssignments(JxField jfield,
JxClass jclass)
throws JxUnknownResultException
jfield - A field wrapper.jclass - A class wrapper.
true if all the field accesses are contained in simple assigJxWrapperExceptionnments.
JxUnknownResultException - if the result is unknown.
public static JxMethod guessGettter(JxField jfield)
throws JxUnknownResultException
jfield - A field wrapper.
null if no getter was detected.
JxUnknownResultException - if the result is unknown.
public static JxMethod guessSettter(JxField jfield)
throws JxUnknownResultException
jfield - A field wrapper.
null if no setter was found.
JxUnknownResultException - if the result is unknown.public static java.lang.String getSuffixName(java.lang.String name)
name - A field name.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||