| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This class contains a set of useful static methods for finding members in classes, checking the
relationship between classes (interfaces), and getting a function call expression from a reference to a
function.
| Method Summary | |
private static void | addAllMembers(Vector membersVector, SciClass sciClass, boolean filterOverriden, Vector scannedClasses) |
static Enumeration | allMembers(SciClass sciClass, boolean filterOverriden)Returns an enumeration of all the members this class has, including inherited members. |
static SciAttribute | findAttributeByName(SciClass sciClass, String name)Finds an attribute by its name and containing class. |
static SciClass | findClassByName(SciContainer container, String name) |
static SciClass | findClassByName(SciContainer container, SciClass aClass) |
static SciMember | findMemberBySignature(SciClass sciClass, String signature)Finds SciMember by its containing class and the signature. |
static SciMember | findMemberBySignature(SciClass sciClass, SciMember patternMember)Finds SciMember by its containing class and another member having the same
signature. |
static SciMember | findMemberBySignature(SciClass sciClass, String signature, boolean searchInBaseClasses)Finds SciMember by the signature in the specified class(interface), or in its parents. |
private static SciMember | findMemberBySignature(SciClass sciClass, String signature, Vector scannedClasses) |
static SciMember | findMemberBySignature(SciClass sciClass, SciMember patternMember, boolean searchInBaseClasses)Finds SciMember by another member having the same
signature, in the specified class(interface), or in its parents. |
private static SciMember | findMemberBySignature(SciClass sciClass, SciMember patternMember, Vector scannedClasses) |
static SciFunctionCallExpression | getFunctionCallFromReference(SciReferenceExpression referenceExpression)Returns a SciFunctionCallExpression for the specified reference to a function. |
static boolean | isInheritor(SciClass aClass, SciClass base, boolean checkDeepInheritance)Checks whether the specified class(interface) is a descendant of another class or interface. |
private static boolean | isInheritor(SciClass aClass, SciClass base, Vector baseClasses) |
| Method Detail |
private static void addAllMembers(Vector membersVector, SciClass sciClass, boolean filterOverriden, Vector scannedClasses)
public static Enumeration allMembers(SciClass sciClass, boolean filterOverriden)
SciClass in which members are being searched fortrue then this method will
Enumerationpublic static SciAttribute findAttributeByName(SciClass sciClass, String name)
SciClass in which an attribute is being searched forSciAttribute contained in the specified class and having the specified name,
null otherwisepublic static SciClass findClassByName(SciContainer container, String name)
public static SciClass findClassByName(SciContainer container, SciClass aClass)
public static SciMember findMemberBySignature(SciClass sciClass, String signature)
SciMember by its containing class and the signature.SciClass in which a member is being searchedSciMember having the specified signature and contained in the specified class;
null otherwise.public static SciMember findMemberBySignature(SciClass sciClass, SciMember patternMember)
SciMember by its containing class and another member having the same
SciClass in which a member is being searchedSciMember having the same signature as the target memberSciMember containing in the specified class and having the same signature
null otherwise.public static SciMember findMemberBySignature(SciClass sciClass, String signature, boolean searchInBaseClasses)
SciMember by the signature in the specified class(interface), or in its parents.SciClass in which a member is being searchedtrue then a member will be searched for
sciClass extends and/or implements (classes are searched first).
false then it will be searched for in the sciClass only.SciMember having the specified signature and contained in the specified class(interface),
null otherwise.private static SciMember findMemberBySignature(SciClass sciClass, String signature, Vector scannedClasses)
public static SciMember findMemberBySignature(SciClass sciClass, SciMember patternMember, boolean searchInBaseClasses)
SciMember by another member having the same
SciClass in which a member is being searchedSciMember having the same signature as the target membertrue then a member will be searched for
sciClass extends and/or implements (classes are searched first).
false then it will be searched in the sciClass only.SciMember having the same signature
null otherwise.private static SciMember findMemberBySignature(SciClass sciClass, SciMember patternMember, Vector scannedClasses)
public static SciFunctionCallExpression getFunctionCallFromReference(SciReferenceExpression referenceExpression)
SciFunctionCallExpression for the specified reference to a function. For references
null. This is a very convenient method, because
Let us suppose we have a line in the source code:
someObject.someMethod();
SciReference representing a reference to someMethod this method will return
SciFuncionCallExpression for the original source code line.SciReference representing a reference to someObject this method will return
null.
Note that since in Java (unlike C++) any usage of a method's name may
appear only in the function call expressions,
this method won't return null for references to methods.
SciReferenceExpressionSciFunctionCallExpression, or nullpublic static boolean isInheritor(SciClass aClass, SciClass base, boolean checkDeepInheritance)
SciClassSciClasstrue then this method
aClass.true if aClass is a descendant of base, false
private static boolean isInheritor(SciClass aClass, SciClass base, Vector baseClasses)
| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||