com.ibm.wala.classLoader
Class SyntheticClass

java.lang.Object
  extended by com.ibm.wala.classLoader.SyntheticClass
All Implemented Interfaces:
IClass, IClassHierarchyDweller
Direct Known Subclasses:
BypassSyntheticClass, FakeRootClass

public abstract class SyntheticClass
extends java.lang.Object
implements IClass

An IClass that exists nowhere in bytecode.


Constructor Summary
SyntheticClass(TypeReference T, IClassHierarchy cha)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 IClassHierarchy getClassHierarchy()
           
 IClassLoader getClassLoader()
          By default, a synthetic class is "loaded" by the primordial loader.
 TypeName getName()
           
 TypeReference getReference()
           
 java.io.InputStream getSource()
           
 java.lang.String getSourceFileName()
           
 int hashCode()
           
 boolean isAbstract()
           
 boolean isArrayClass()
           
 boolean isInterface()
          Is this class a Java interface?
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.wala.classLoader.IClass
getAllFields, getAllImplementedInterfaces, getAllInstanceFields, getAllMethods, getAllStaticFields, getClassInitializer, getDeclaredInstanceFields, getDeclaredMethods, getDeclaredStaticFields, getDirectInterfaces, getField, getMethod, getModifiers, getSuperclass, isPrivate, isPublic, isReferenceType
 

Constructor Detail

SyntheticClass

public SyntheticClass(TypeReference T,
                      IClassHierarchy cha)
Parameters:
T - type reference describing this class
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getClassLoader

public IClassLoader getClassLoader()
By default, a synthetic class is "loaded" by the primordial loader. Subclasses may override as necessary.

Specified by:
getClassLoader in interface IClass
Returns:
the object that represents the defining class loader for this class.
See Also:
IClass.getClassLoader()

isInterface

public boolean isInterface()
Description copied from interface: IClass
Is this class a Java interface?

Specified by:
isInterface in interface IClass

isAbstract

public boolean isAbstract()
Specified by:
isAbstract in interface IClass
Returns:
true iff this class is abstract

getReference

public TypeReference getReference()
Specified by:
getReference in interface IClass
Returns:
canonical TypeReference corresponding to this class

getSourceFileName

public java.lang.String getSourceFileName()
Specified by:
getSourceFileName in interface IClass
Returns:
String holding the name of the source file that defined this class, or null if none found

getSource

public java.io.InputStream getSource()
Specified by:
getSource in interface IClass
Returns:
String representing the source file holding this class, or null if not found

isArrayClass

public boolean isArrayClass()
Specified by:
isArrayClass in interface IClass
Returns:
true iff the class is an array class.

getClassHierarchy

public IClassHierarchy getClassHierarchy()
Specified by:
getClassHierarchy in interface IClassHierarchyDweller

getName

public TypeName getName()
Specified by:
getName in interface IClass
Returns:
the TypeName for this class