|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object js.tinyvm.ClassRecord
public class ClassRecord
Abstraction for a class record (see vmsrc/language.h).
Constructor Summary | |
---|---|
ClassRecord()
|
Method Summary | |
---|---|
void |
addInterfaces(ClassRecord pUserClass)
|
void |
addInterfaceUser(ClassRecord pRec)
|
void |
addUsedMethod(java.lang.String aRef)
|
int |
computeClassSize()
|
static java.lang.String |
cpEntryId(org.apache.bcel.classfile.Constant aEntry)
|
void |
dump(IByteWriter aOut)
Dump. |
boolean |
equals(java.lang.Object aObj)
|
void |
findHiddenMethods()
|
int |
getAllocationSize()
|
static java.lang.String |
getArrayClassName(java.lang.String aName)
|
int |
getArrayDimension()
|
ClassRecord |
getArrayElementClass()
|
java.lang.String |
getCanonicalName()
|
static ClassRecord |
getClassRecord(java.lang.String className,
ClassPath aCP,
Binary aBinary)
|
int |
getClassSize()
|
int |
getInstanceFieldOffset(java.lang.String aName)
|
int |
getLength()
Returns the length of the record, in bytes. |
java.lang.String |
getName()
|
ClassRecord |
getParent()
|
PrimitiveClassRecord |
getPrimitiveClass()
Return the wrapped class if this class is a wrapper |
java.lang.String |
getSimpleName()
|
java.lang.String |
getSourceFilename()
|
int |
getStaticFieldIndex(java.lang.String aName)
|
int |
getStaticFieldOffset(java.lang.String aName)
|
StaticFieldRecord |
getStaticFieldRecord(java.lang.String aName)
|
StaticValue |
getStaticValue(java.lang.String aName)
|
int |
hashCode()
|
boolean |
hasMethod(Signature aSignature,
boolean aStatic)
(Call only after record has been processed). |
boolean |
hasParent()
|
boolean |
hasReference()
|
boolean |
hasStaticInitializer()
|
void |
initFlags()
|
void |
initParent()
|
boolean |
instanceUsed()
|
boolean |
isArray()
|
boolean |
isInterface()
|
boolean |
isPrimitive()
|
boolean |
isWrapper()
Determine if this class is a wrapper |
void |
markInstanceUsed()
|
void |
markMethod(MethodRecord pRec,
boolean directCall)
|
void |
markMethods()
|
void |
markUsed()
|
java.lang.String |
signature()
|
void |
storeCode(RecordTable<CodeSequence> aCodeSequences,
boolean aPostProcess)
|
void |
storeConstants(RecordTable<ConstantRecord> aConstantTable,
RecordTable<ConstantValue> aConstantValues)
|
void |
storeFields(RecordTable<RecordTable<InstanceFieldRecord>> aInstanceFieldTables,
RecordTable<StaticFieldRecord> aStaticFields,
RecordTable<StaticValue> aStaticState)
|
void |
storeInterfaceMap(RecordTable<InterfaceMap> maps)
Create and store the inetrface map for this interface class. |
void |
storeMethods(RecordTable<RecordTable<MethodRecord>> aMethodTables,
RecordTable<RecordTable<ExceptionRecord>> aExceptionTables,
HashVector<Signature> aSignatures,
boolean aAll)
|
void |
storeOptimizedFields(RecordTable<RecordTable<InstanceFieldRecord>> aInstanceFieldTables)
|
void |
storeOptimizedImplementingClasses(RecordTable<ClassRecord> aClassRecords)
Add the classes which implement this interface into the the set of class records. |
void |
storeOptimizedMethods(RecordTable<RecordTable<MethodRecord>> aMethodTables,
RecordTable<RecordTable<ExceptionRecord>> aExceptionTables,
HashVector<Signature> aSignatures)
|
void |
storeOptimizedStaticFields(RecordTable<StaticFieldRecord> aStaticFields,
RecordTable<StaticValue> aStaticState,
int align)
|
void |
storeReferredClasses(java.util.HashMap<java.lang.String,ClassRecord> aClasses,
RecordTable<ClassRecord> aClassRecords,
ClassPath aClassPath,
java.util.ArrayList<java.lang.String> aInterfaceMethods)
|
java.lang.String |
toString()
|
void |
useAllMethods()
|
boolean |
used()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ClassRecord()
Method Detail |
---|
public void useAllMethods()
public java.lang.String getName()
public java.lang.String getCanonicalName()
public java.lang.String getSimpleName()
public java.lang.String getSourceFilename()
public int getLength()
WritableData
getLength
in interface WritableData
public void dump(IByteWriter aOut) throws TinyVMException
WritableData
dump
in interface WritableData
aOut
- writer to write binary to
TinyVMException
public boolean isArray()
public boolean isInterface()
public boolean isPrimitive()
public boolean hasStaticInitializer()
public boolean hasMethod(Signature aSignature, boolean aStatic)
aSignature
- aStatic
-
public void initFlags()
public int getAllocationSize() throws TinyVMException
TinyVMException
public int getClassSize() throws TinyVMException
TinyVMException
public int computeClassSize() throws TinyVMException
TinyVMException
public boolean hasReference() throws TinyVMException
TinyVMException
public boolean hasParent()
public ClassRecord getParent()
public void initParent() throws TinyVMException
TinyVMException
public static java.lang.String getArrayClassName(java.lang.String aName)
public void storeReferredClasses(java.util.HashMap<java.lang.String,ClassRecord> aClasses, RecordTable<ClassRecord> aClassRecords, ClassPath aClassPath, java.util.ArrayList<java.lang.String> aInterfaceMethods) throws TinyVMException
TinyVMException
public void addUsedMethod(java.lang.String aRef)
public static java.lang.String cpEntryId(org.apache.bcel.classfile.Constant aEntry)
public int getInstanceFieldOffset(java.lang.String aName) throws TinyVMException
TinyVMException
public int getStaticFieldOffset(java.lang.String aName) throws TinyVMException
aName
-
TinyVMException
public StaticValue getStaticValue(java.lang.String aName) throws TinyVMException
aName
- the name of the static field.
TinyVMException
public int getStaticFieldIndex(java.lang.String aName)
public StaticFieldRecord getStaticFieldRecord(java.lang.String aName)
public void storeConstants(RecordTable<ConstantRecord> aConstantTable, RecordTable<ConstantValue> aConstantValues) throws TinyVMException
TinyVMException
public void storeMethods(RecordTable<RecordTable<MethodRecord>> aMethodTables, RecordTable<RecordTable<ExceptionRecord>> aExceptionTables, HashVector<Signature> aSignatures, boolean aAll) throws TinyVMException
TinyVMException
public void storeOptimizedMethods(RecordTable<RecordTable<MethodRecord>> aMethodTables, RecordTable<RecordTable<ExceptionRecord>> aExceptionTables, HashVector<Signature> aSignatures) throws TinyVMException
TinyVMException
public void storeOptimizedStaticFields(RecordTable<StaticFieldRecord> aStaticFields, RecordTable<StaticValue> aStaticState, int align) throws TinyVMException
TinyVMException
public void storeOptimizedFields(RecordTable<RecordTable<InstanceFieldRecord>> aInstanceFieldTables) throws TinyVMException
TinyVMException
public void storeFields(RecordTable<RecordTable<InstanceFieldRecord>> aInstanceFieldTables, RecordTable<StaticFieldRecord> aStaticFields, RecordTable<StaticValue> aStaticState) throws TinyVMException
TinyVMException
public void storeCode(RecordTable<CodeSequence> aCodeSequences, boolean aPostProcess) throws TinyVMException
TinyVMException
public void markMethods() throws TinyVMException
TinyVMException
public void markMethod(MethodRecord pRec, boolean directCall) throws TinyVMException
TinyVMException
public static ClassRecord getClassRecord(java.lang.String className, ClassPath aCP, Binary aBinary) throws TinyVMException
TinyVMException
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object aObj)
equals
in class java.lang.Object
public void addInterfaces(ClassRecord pUserClass)
public void addInterfaceUser(ClassRecord pRec)
public void findHiddenMethods() throws TinyVMException
TinyVMException
public void markUsed()
public void markInstanceUsed()
public boolean used()
public boolean instanceUsed()
public int getArrayDimension()
public ClassRecord getArrayElementClass()
public java.lang.String signature()
public boolean isWrapper()
public PrimitiveClassRecord getPrimitiveClass()
public void storeOptimizedImplementingClasses(RecordTable<ClassRecord> aClassRecords)
aClassRecords
- Set of recordspublic void storeInterfaceMap(RecordTable<InterfaceMap> maps) throws TinyVMException
maps
- the set of ineterface maps.
TinyVMException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |