Class AstClass
java.lang.Object
com.ibm.wala.cast.loader.AstClass
- All Implemented Interfaces:
IClass
,IClassHierarchyDweller
,ClassConstants
- Direct Known Subclasses:
AstDynamicPropertyClass
,JavaSourceLoaderImpl.JavaClass
-
Field Summary
Modifier and TypeFieldDescriptionFields inherited from interface com.ibm.wala.shrike.shrikeCT.ClassConstants
ACC_ABSTRACT, ACC_FINAL, ACC_INTERFACE, ACC_NATIVE, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_STATIC, ACC_STRICT, ACC_SUPER, ACC_SYNCHRONIZED, ACC_TRANSIENT, ACC_VOLATILE, CONSTANT_Class, CONSTANT_Double, CONSTANT_FieldRef, CONSTANT_Float, CONSTANT_Integer, CONSTANT_InterfaceMethodRef, CONSTANT_InvokeDynamic, CONSTANT_Long, CONSTANT_MethodHandle, CONSTANT_MethodRef, CONSTANT_MethodType, CONSTANT_Module, CONSTANT_NameAndType, CONSTANT_Package, CONSTANT_String, CONSTANT_Utf8, MAGIC, REF_getField, REF_getStatic, REF_invokeInterface, REF_invokeSpecial, REF_invokeStatic, REF_invokeVirtual, REF_newInvokeSpecial, REF_putField, REF_putStatic
-
Constructor Summary
ModifierConstructorDescriptionprotected
AstClass
(CAstSourcePositionMap.Position sourcePosition, TypeName typeName, IClassLoader loader, short modifiers, Map<Atom, IField> declaredFields, Map<Selector, IMethod> declaredMethods) -
Method Summary
Modifier and TypeMethodDescriptionCompute the instance and static fields declared by this class or any of its superclasses.Compute the instance fields declared by this class or any of its superclasses.Collection
<? extends IMethod> Compute the methods declared by this class or any of its superclasses.Compute the static fields declared by this class or any of its superclasses.Return the object that represents the defining class loader for this class.Compute the instance fields declared by this class.Collection
<? extends IMethod> abstract Collection
<IClass> Finds a field.Finds a field, given a name and a type.Finds method matching signature.int
Return the integer that encodes the class's modifiers, as defined by the JVM specificationgetName()
abstract IClass
boolean
boolean
boolean
Is this class a Java interface?boolean
boolean
isPublic()
boolean
Does 'this' refer to a reference type? If not, then it refers to a primitive type.boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.ibm.wala.classLoader.IClass
getAnnotations
Methods inherited from interface com.ibm.wala.ipa.cha.IClassHierarchyDweller
getClassHierarchy
-
Field Details
-
declaredFields
-
declaredMethods
-
-
Constructor Details
-
AstClass
protected AstClass(CAstSourcePositionMap.Position sourcePosition, TypeName typeName, IClassLoader loader, short modifiers, Map<Atom, IField> declaredFields, Map<Selector, IMethod> declaredMethods)
-
-
Method Details
-
isInterface
public boolean isInterface()Description copied from interface:IClass
Is this class a Java interface?- Specified by:
isInterface
in interfaceIClass
-
isAbstract
public boolean isAbstract()- Specified by:
isAbstract
in interfaceIClass
- Returns:
- true iff this class is abstract
-
isPublic
-
isPrivate
-
isReferenceType
public boolean isReferenceType()Description copied from interface:IClass
Does 'this' refer to a reference type? If not, then it refers to a primitive type.- Specified by:
isReferenceType
in interfaceIClass
-
isArrayClass
public boolean isArrayClass()- Specified by:
isArrayClass
in interfaceIClass
- Returns:
- true iff the class is an array class.
-
isSynthetic
public boolean isSynthetic()- Specified by:
isSynthetic
in interfaceIClass
- Returns:
- true iff this class is synthetic, i.e., compiler-generated
-
getModifiers
public int getModifiers()Description copied from interface:IClass
Return the integer that encodes the class's modifiers, as defined by the JVM specification- Specified by:
getModifiers
in interfaceIClass
- Returns:
- the integer that encodes the class's modifiers, as defined by the JVM specification
-
getSourcePosition
-
getSourceURL
-
getSourceFileName
- Specified by:
getSourceFileName
in interfaceIClass
- Returns:
- String holding the name of the source file that defined this class, or null if none found
-
getSource
-
getName
-
getReference
- Specified by:
getReference
in interfaceIClass
- Returns:
- canonical TypeReference corresponding to this class
-
getClassLoader
Description copied from interface:IClass
Return the object that represents the defining class loader for this class.- Specified by:
getClassLoader
in interfaceIClass
- Returns:
- the object that represents the defining class loader for this class.
-
getSuperclass
- Specified by:
getSuperclass
in interfaceIClass
- Returns:
- the superclass, or null if java.lang.Object
-
getDirectInterfaces
- Specified by:
getDirectInterfaces
in interfaceIClass
- Returns:
- Collection of (IClass) interfaces this class directly implements. If this class is an interface, returns the interfaces it immediately extends.
-
getAllImplementedInterfaces
- Specified by:
getAllImplementedInterfaces
in interfaceIClass
- Returns:
- Collection of (IClass) interfaces this class implements, including all ancestors of interfaces immediately implemented. If this class is an interface, it returns all super-interfaces.
-
getClassInitializer
- Specified by:
getClassInitializer
in interfaceIClass
- Returns:
- the method that is this class's initializer, or null if none
-
getMethod
Description copied from interface:IClass
Finds method matching signature. Delegates to superclass if not found. -
getField
-
getField
-
getDeclaredMethods
- Specified by:
getDeclaredMethods
in interfaceIClass
- Returns:
- an Iterator of the IMethods declared by this class.
-
getDeclaredInstanceFields
Description copied from interface:IClass
Compute the instance fields declared by this class.- Specified by:
getDeclaredInstanceFields
in interfaceIClass
- Returns:
- Collection of IFields
-
getDeclaredStaticFields
- Specified by:
getDeclaredStaticFields
in interfaceIClass
- Returns:
- Collection of IField
-
getAllInstanceFields
Description copied from interface:IClass
Compute the instance fields declared by this class or any of its superclasses.- Specified by:
getAllInstanceFields
in interfaceIClass
-
getAllStaticFields
Description copied from interface:IClass
Compute the static fields declared by this class or any of its superclasses.- Specified by:
getAllStaticFields
in interfaceIClass
-
getAllFields
Description copied from interface:IClass
Compute the instance and static fields declared by this class or any of its superclasses.- Specified by:
getAllFields
in interfaceIClass
-
getAllMethods
Description copied from interface:IClass
Compute the methods declared by this class or any of its superclasses.- Specified by:
getAllMethods
in interfaceIClass
-