com.ibm.wala.ipa.summaries
Class BypassSyntheticClass

java.lang.Object
  extended by com.ibm.wala.classLoader.SyntheticClass
      extended by com.ibm.wala.ipa.summaries.BypassSyntheticClass
All Implemented Interfaces:
IClass, IClassHierarchyDweller

public class BypassSyntheticClass
extends SyntheticClass

A synthetic implementation of a class


Constructor Summary
BypassSyntheticClass(IClass realType, IClassLoader loader, IClassHierarchy cha)
           
 
Method Summary
 boolean equals(java.lang.Object arg0)
           
 java.util.Collection<IField> getAllFields()
          Compute the instance and static fields declared by this class or any of its superclasses.
 java.util.Collection<IClass> getAllImplementedInterfaces()
           
 java.util.Collection<IField> getAllInstanceFields()
          Compute the instance fields declared by this class or any of its superclasses.
 java.util.Collection<IMethod> getAllMethods()
          Compute the methods declared by this class or any of its superclasses.
 java.util.Collection<IField> getAllStaticFields()
          Compute the static fields declared by this class or any of its superclasses.
 IMethod getClassInitializer()
           
 IClassLoader getClassLoader()
          By default, a synthetic class is "loaded" by the primordial loader.
 java.util.Collection<IField> getDeclaredInstanceFields()
          Compute the instance fields declared by this class.
 java.util.Collection<IMethod> getDeclaredMethods()
           
 java.util.Collection<IField> getDeclaredStaticFields()
           
 java.util.Collection<IClass> getDirectInterfaces()
           
 IField getField(Atom name)
          Finds a field.
 IMethod getMethod(Selector selector)
          Finds method matching signature.
 int getModifiers()
          Return the integer that encodes the class's modifiers, as defined by the JVM specification
static TypeName getName(TypeReference T)
           
 IClass getRealType()
           
 java.io.InputStream getSource()
           
 java.lang.String getSourceFileName()
           
 IClass getSuperclass()
           
 int hashCode()
           
 boolean isPrivate()
           
 boolean isPublic()
           
 boolean isReferenceType()
          Does 'this' refer to a reference type? If not, then it refers to a primitive type.
 boolean isSyntheticImplentor()
           
 java.lang.String toString()
           
 
Methods inherited from class com.ibm.wala.classLoader.SyntheticClass
getClassHierarchy, getName, getReference, isAbstract, isArrayClass, isInterface
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BypassSyntheticClass

public BypassSyntheticClass(IClass realType,
                            IClassLoader loader,
                            IClassHierarchy cha)
                     throws java.lang.NullPointerException,
                            java.lang.NullPointerException
Throws:
java.lang.NullPointerException
Method Detail

getName

public static TypeName getName(TypeReference T)
Parameters:
T - a type reference
Returns:
a synthetic class name to represent the synthetic form of this type
Throws:
java.lang.IllegalArgumentException - if T is null

getClassLoader

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

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

getSuperclass

public IClass getSuperclass()
Returns:
the superclass, or null if java.lang.Object

getAllImplementedInterfaces

public java.util.Collection<IClass> getAllImplementedInterfaces()
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.

getMethod

public IMethod getMethod(Selector selector)
Description copied from interface: IClass
Finds method matching signature. Delegates to superclass if not found.

Parameters:
selector - a method signature
Returns:
IMethod from this class matching the signature; null if not found in this class or any superclass.

getField

public IField getField(Atom name)
Description copied from interface: IClass
Finds a field.


getSourceFileName

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

getClassInitializer

public IMethod getClassInitializer()
Returns:
the method that is this class's initializer, or null if none

getDeclaredMethods

public java.util.Collection<IMethod> getDeclaredMethods()
Returns:
an Iterator of the IMethods declared by this class.

getDeclaredInstanceFields

public java.util.Collection<IField> getDeclaredInstanceFields()
Description copied from interface: IClass
Compute the instance fields declared by this class.

Returns:
Collection of IFields

getDeclaredStaticFields

public java.util.Collection<IField> getDeclaredStaticFields()
Returns:
Collection of IField

isSyntheticImplentor

public boolean isSyntheticImplentor()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getRealType

public IClass getRealType()

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class SyntheticClass

getModifiers

public int getModifiers()
                 throws UnimplementedError
Description copied from interface: IClass
Return the integer that encodes the class's modifiers, as defined by the JVM specification

Returns:
the integer that encodes the class's modifiers, as defined by the JVM specification
Throws:
UnimplementedError

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.


getDirectInterfaces

public java.util.Collection<IClass> getDirectInterfaces()
                                                 throws UnimplementedError
Returns:
Collection of (IClass) interfaces this class directly implements. If this class is an interface, returns the interfaces it immediately extends.
Throws:
UnimplementedError

getAllInstanceFields

public java.util.Collection<IField> getAllInstanceFields()
Description copied from interface: IClass
Compute the instance fields declared by this class or any of its superclasses.


getAllStaticFields

public java.util.Collection<IField> getAllStaticFields()
Description copied from interface: IClass
Compute the static fields declared by this class or any of its superclasses.


getAllMethods

public java.util.Collection<IMethod> getAllMethods()
Description copied from interface: IClass
Compute the methods declared by this class or any of its superclasses.


getAllFields

public java.util.Collection<IField> getAllFields()
Description copied from interface: IClass
Compute the instance and static fields declared by this class or any of its superclasses.


isPublic

public boolean isPublic()
Returns:
true iff this class is public

isPrivate

public boolean isPrivate()
Returns:
true iff this class is private

getSource

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