org.siebengeisslein.pclass
Class PClass

java.lang.Object
  extended by org.siebengeisslein.client.Persistent
      extended by org.siebengeisslein.pclass.PClass
All Implemented Interfaces:
Instrumented, VariableManager

public class PClass
extends Persistent
implements VariableManager


Field Summary
static int CLASSFILE_VERSION
           
static int MIGRATION_MAP_INDEX
           
 
Constructor Summary
PClass(TypeManager typeManager, GlobalVariableManager globalVarManager, PPackage pakage, java.lang.String classname, int id)
           
 
Method Summary
 void addConstructor(PInternalConstructor Method)
           
 PInternalField addField(java.lang.String name, PType type)
           
 void addInterface(AbstractRefPType interfaceType)
           
 void addMethod(PInternalMethod Method)
           
 void addMethodListener(ObjectChangeListener listener)
           
 void addResolveListener(VariableManager manager)
           
 PInternalMethod createConstructor()
           
 PInternalMethod createMethod()
           
 void export(java.util.jar.JarOutputStream jar)
           
 boolean extendsClass(PType type)
           
 java.util.List<PMethod> getAllConstructors()
           
 java.util.List<PField> getAllFields()
           
 java.util.List<PInternalField> getAllFieldsBefore(int version)
           
 java.util.List<PMethod> getAllMethods()
           
 PType getAsType()
           
 PInternalMethod getConstructor(int index)
           
 int getConstructorCount()
           
 DataDirectory getDataDirectory()
           
 DefaultErrorList getErrorList()
           
 PInternalField getField(int index)
           
 PInternalField getField(java.lang.String name)
           
 PField getField(java.lang.String name, PType owner)
           
 int getFieldCount()
           
 int getId()
           
 java.util.List<AbstractRefPType> getImplementedInterfaces()
           
 PType getInterface(int index)
           
 int getInterfaceCount()
           
 java.lang.String getInternalName()
           
 PInternalMethod getMethod(int index)
           
 PMethod getMethod(java.lang.String methodName, java.util.List<PType> parameters)
           
 int getMethodCount()
           
 java.lang.String getName()
           
 PPackage getPackage()
           
 java.lang.String getQualifiedName()
           
 AbstractRefPType getSuperClass()
           
 TypeManager getTypeManager()
           
 Variable getVariable(java.lang.String name)
           
 int getVersion()
           
 boolean hasChanged()
           
 void incVersion()
           
 boolean isAbstract()
           
 boolean isImplementing(PType type)
           
 boolean isInterface()
           
 void removeField(PInternalField field)
           
 void removeMethod(PInternalMethod Method)
           
 void resolved(Variable variable)
           
 void setInterface(int index, AbstractRefPType type)
           
 void setName(java.lang.String name)
           
 void setSuperClass(AbstractRefPType superClass)
           
 java.lang.String toString()
           
 
Methods inherited from class org.siebengeisslein.client.Persistent
abort, clearUserLocals, clone, commit, disposeTransient, getGroup, getRef, getTransientValue, hashCode, initTransient, isWriteTransaction, joinWriteTransaction, readLock, setGroup, setTransientValue, toPersistent, toRef, writeExternal, writeLock
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MIGRATION_MAP_INDEX

public static final int MIGRATION_MAP_INDEX
See Also:
Constant Field Values

CLASSFILE_VERSION

public static final int CLASSFILE_VERSION
See Also:
Constant Field Values
Constructor Detail

PClass

public PClass(TypeManager typeManager,
              GlobalVariableManager globalVarManager,
              PPackage pakage,
              java.lang.String classname,
              int id)
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getVersion

public int getVersion()

addField

public PInternalField addField(java.lang.String name,
                               PType type)

removeField

public void removeField(PInternalField field)

getFieldCount

public int getFieldCount()

getField

public PInternalField getField(int index)

addMethod

public void addMethod(PInternalMethod Method)

addConstructor

public void addConstructor(PInternalConstructor Method)

removeMethod

public void removeMethod(PInternalMethod Method)

getMethodCount

public int getMethodCount()

getMethod

public PInternalMethod getMethod(int index)

getInterfaceCount

public int getInterfaceCount()

getInterface

public PType getInterface(int index)

getInternalName

public java.lang.String getInternalName()

getQualifiedName

public java.lang.String getQualifiedName()

toString

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

getPackage

public PPackage getPackage()

getVariable

public Variable getVariable(java.lang.String name)
Specified by:
getVariable in interface VariableManager

addResolveListener

public void addResolveListener(VariableManager manager)
Specified by:
addResolveListener in interface VariableManager

resolved

public void resolved(Variable variable)
Specified by:
resolved in interface VariableManager

createMethod

public PInternalMethod createMethod()

createConstructor

public PInternalMethod createConstructor()

export

public void export(java.util.jar.JarOutputStream jar)
            throws java.io.IOException
Throws:
java.io.IOException

getSuperClass

public AbstractRefPType getSuperClass()

setSuperClass

public void setSuperClass(AbstractRefPType superClass)

addInterface

public void addInterface(AbstractRefPType interfaceType)

setInterface

public void setInterface(int index,
                         AbstractRefPType type)

isImplementing

public boolean isImplementing(PType type)

getAsType

public PType getAsType()

getId

public int getId()

getTypeManager

public TypeManager getTypeManager()

getField

public PField getField(java.lang.String name,
                       PType owner)
Specified by:
getField in interface VariableManager

getMethod

public PMethod getMethod(java.lang.String methodName,
                         java.util.List<PType> parameters)

isInterface

public boolean isInterface()

getField

public PInternalField getField(java.lang.String name)

getAllMethods

public java.util.List<PMethod> getAllMethods()

getAllConstructors

public java.util.List<PMethod> getAllConstructors()

incVersion

public void incVersion()

hasChanged

public boolean hasChanged()
Returns:
wether the persistent representation of this class has changed since the last call to incVersion().

getAllFields

public java.util.List<PField> getAllFields()

addMethodListener

public void addMethodListener(ObjectChangeListener listener)

extendsClass

public boolean extendsClass(PType type)

getImplementedInterfaces

public java.util.List<AbstractRefPType> getImplementedInterfaces()

getConstructorCount

public int getConstructorCount()

getConstructor

public PInternalMethod getConstructor(int index)

isAbstract

public boolean isAbstract()

getAllFieldsBefore

public java.util.List<PInternalField> getAllFieldsBefore(int version)

getErrorList

public DefaultErrorList getErrorList()

getDataDirectory

public DataDirectory getDataDirectory()
Specified by:
getDataDirectory in interface VariableManager