js.tinyvm
Class PrimitiveClassRecord
java.lang.Object
js.tinyvm.ClassRecord
js.tinyvm.PrimitiveClassRecord
- All Implemented Interfaces:
- WritableData
public class PrimitiveClassRecord
- extends ClassRecord
Abstraction for a class record (see vmsrc/language.h).
Method Summary |
void |
addInterfaces(ClassRecord pUserClass)
|
void |
addUsedMethod(java.lang.String aRef)
|
int |
getAllocationSize()
|
static ClassRecord |
getArrayClassRecord(java.lang.String className,
Binary aBinary,
int dims,
ClassRecord elem)
|
java.lang.String |
getCanonicalName()
|
ConstantRecord |
getClassConstant()
|
static ClassRecord |
getClassRecord(java.lang.String className,
Binary aBinary,
byte typ)
|
java.lang.String |
getName()
|
ClassRecord |
getParent()
|
java.lang.String |
getSimpleName()
|
java.lang.String |
getSourceFilename()
|
StaticFieldRecord |
getStaticFieldRecord(java.lang.String aName)
|
boolean |
hasMethod(Signature aSignature,
boolean aStatic)
(Call only after record has been processed). |
boolean |
hasParent()
|
boolean |
hasReference()
|
boolean |
hasStaticInitializer()
|
boolean |
isInterface()
|
void |
markMethod(MethodRecord pRec,
boolean directCall)
|
void |
markMethods()
|
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 |
storeMethods(RecordTable<RecordTable<MethodRecord>> aMethodTables,
RecordTable<RecordTable<ExceptionRecord>> aExceptionTables,
HashVector<Signature> aSignatures,
boolean aAll)
|
void |
storeOptimizedFields(RecordTable<RecordTable<InstanceFieldRecord>> aInstanceFieldTables)
|
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)
|
Methods inherited from class js.tinyvm.ClassRecord |
addInterfaceUser, computeClassSize, cpEntryId, dump, equals, findHiddenMethods, getArrayClassName, getArrayDimension, getArrayElementClass, getClassRecord, getClassSize, getInstanceFieldOffset, getLength, getPrimitiveClass, getStaticFieldIndex, getStaticFieldOffset, getStaticValue, hashCode, initFlags, initParent, instanceUsed, isArray, isPrimitive, isWrapper, markInstanceUsed, markUsed, signature, storeInterfaceMap, storeOptimizedImplementingClasses, toString, useAllMethods, used |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
PrimitiveClassRecord
public PrimitiveClassRecord()
getName
public java.lang.String getName()
- Overrides:
getName
in class ClassRecord
getSimpleName
public java.lang.String getSimpleName()
- Overrides:
getSimpleName
in class ClassRecord
getCanonicalName
public java.lang.String getCanonicalName()
- Overrides:
getCanonicalName
in class ClassRecord
getSourceFilename
public java.lang.String getSourceFilename()
- Overrides:
getSourceFilename
in class ClassRecord
isInterface
public boolean isInterface()
- Overrides:
isInterface
in class ClassRecord
hasStaticInitializer
public boolean hasStaticInitializer()
- Overrides:
hasStaticInitializer
in class ClassRecord
hasMethod
public boolean hasMethod(Signature aSignature,
boolean aStatic)
- (Call only after record has been processed).
- Overrides:
hasMethod
in class ClassRecord
- Returns:
hasReference
public boolean hasReference()
throws TinyVMException
- Overrides:
hasReference
in class ClassRecord
- Throws:
TinyVMException
hasParent
public boolean hasParent()
- Overrides:
hasParent
in class ClassRecord
getParent
public ClassRecord getParent()
- Overrides:
getParent
in class ClassRecord
storeReferredClasses
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
- Overrides:
storeReferredClasses
in class ClassRecord
- Throws:
TinyVMException
addUsedMethod
public void addUsedMethod(java.lang.String aRef)
- Overrides:
addUsedMethod
in class ClassRecord
getStaticFieldRecord
public StaticFieldRecord getStaticFieldRecord(java.lang.String aName)
- Overrides:
getStaticFieldRecord
in class ClassRecord
storeConstants
public void storeConstants(RecordTable<ConstantRecord> aConstantTable,
RecordTable<ConstantValue> aConstantValues)
throws TinyVMException
- Overrides:
storeConstants
in class ClassRecord
- Throws:
TinyVMException
storeMethods
public void storeMethods(RecordTable<RecordTable<MethodRecord>> aMethodTables,
RecordTable<RecordTable<ExceptionRecord>> aExceptionTables,
HashVector<Signature> aSignatures,
boolean aAll)
throws TinyVMException
- Overrides:
storeMethods
in class ClassRecord
- Throws:
TinyVMException
storeOptimizedMethods
public void storeOptimizedMethods(RecordTable<RecordTable<MethodRecord>> aMethodTables,
RecordTable<RecordTable<ExceptionRecord>> aExceptionTables,
HashVector<Signature> aSignatures)
throws TinyVMException
- Overrides:
storeOptimizedMethods
in class ClassRecord
- Throws:
TinyVMException
storeOptimizedStaticFields
public void storeOptimizedStaticFields(RecordTable<StaticFieldRecord> aStaticFields,
RecordTable<StaticValue> aStaticState,
int align)
throws TinyVMException
- Overrides:
storeOptimizedStaticFields
in class ClassRecord
- Throws:
TinyVMException
storeOptimizedFields
public void storeOptimizedFields(RecordTable<RecordTable<InstanceFieldRecord>> aInstanceFieldTables)
throws TinyVMException
- Overrides:
storeOptimizedFields
in class ClassRecord
- Throws:
TinyVMException
storeFields
public void storeFields(RecordTable<RecordTable<InstanceFieldRecord>> aInstanceFieldTables,
RecordTable<StaticFieldRecord> aStaticFields,
RecordTable<StaticValue> aStaticState)
throws TinyVMException
- Overrides:
storeFields
in class ClassRecord
- Throws:
TinyVMException
storeCode
public void storeCode(RecordTable<CodeSequence> aCodeSequences,
boolean aPostProcess)
throws TinyVMException
- Overrides:
storeCode
in class ClassRecord
- Throws:
TinyVMException
markMethods
public void markMethods()
throws TinyVMException
- Overrides:
markMethods
in class ClassRecord
- Throws:
TinyVMException
markMethod
public void markMethod(MethodRecord pRec,
boolean directCall)
throws TinyVMException
- Overrides:
markMethod
in class ClassRecord
- Throws:
TinyVMException
getClassRecord
public static ClassRecord getClassRecord(java.lang.String className,
Binary aBinary,
byte typ)
throws TinyVMException
- Throws:
TinyVMException
getArrayClassRecord
public static ClassRecord getArrayClassRecord(java.lang.String className,
Binary aBinary,
int dims,
ClassRecord elem)
throws TinyVMException
- Throws:
TinyVMException
getAllocationSize
public int getAllocationSize()
throws TinyVMException
- Overrides:
getAllocationSize
in class ClassRecord
- Returns:
- Number of bytes required for object allocation.
For arrays we return the size of a single element.
- Throws:
TinyVMException
addInterfaces
public void addInterfaces(ClassRecord pUserClass)
- Overrides:
addInterfaces
in class ClassRecord
getClassConstant
public ConstantRecord getClassConstant()