Public Methods | |
TypeExtractor (TransSystem system, SootClassManager classManager) | |
String | arrayName (ArrayType sootArrayType) |
void | caseArrayType (ArrayType type) |
void | caseBooleanType (BooleanType type) |
void | caseByteType (ByteType type) |
void | caseIntType (IntType type) |
void | caseLongType (LongType type) |
void | caseRefType (RefType type) |
void | caseShortType (ShortType type) |
void | defaultCase (Type type) |
edu ksu cis bandera bir Record | getRecordType (SootClass sootClass) |
Private Methods | |
void | addFields (edu.ksu.cis.bandera.bir.Record rec, SootClass sootClass) |
void | createArrayType (ArrayType sootArrayType, int arrayLen) |
edu ksu cis bandera bir Collection | createCollectionType (edu.ksu.cis.bandera.bir.Type type, int size) |
void | createRecordType (SootClass sootClass, boolean isLocked) |
void | createRefType (ArrayType sootArrayType) |
void | createRefType (SootClass sootClass) |
edu ksu cis bandera bir Array | getArrayType (ArrayType sootArrayType) |
Vector | getInterfaceClasses (SootClass sootClass) |
edu ksu cis bandera bir Ref | getRefType (ArrayType sootArrayType) |
edu ksu cis bandera bir Ref | getRefType (SootClass sootClass) |
Vector | getSuperClasses (SootClass sootClass) |
Private Attributes | |
TransSystem | system |
SootClassManager | classManager |
Hashtable | refTypeTable = new Hashtable() |
Hashtable | recordTypeTable = new Hashtable() |
Hashtable | arrayTypeTable = new Hashtable() |
The TransSystem class is a factory for the BIR type classes. For Jimple primitive types, the extractor simply calls the appropriate constructor method in the factory. For Jimple reference types, the extractor maintains a mapping from the Jimple type to the BIR record, array, or reference type.
Definition at line 59 of file TypeExtractor.java.
|
Add the fields of a class to a BIR record. Definition at line 82 of file TypeExtractor.java. |
|
Construct name for array type by appending "_arr" to the base type name for each dimension (e.g., int [][] would be int_arr_arr). Definition at line 109 of file TypeExtractor.java. Referenced by Builder::createCollections().
|
|
Declare BIR array type for a Soot array type. Definition at line 148 of file TypeExtractor.java. Referenced by Builder::createRecordAndArrayTypes().
|
|
Create a collection type for a given BIR type and collection size. Definition at line 166 of file TypeExtractor.java. Referenced by Builder::createCollections().
|
|
Declare a record type for a class C (name it C_rec). Note: we flatten the implementation inheritance here by adding all fields from superclasses of C into C_rec. It is important that the inherited fields of a subclass appear first and in the same order as they do in the superclass. Definition at line 182 of file TypeExtractor.java. Referenced by Builder::createRecordAndArrayTypes().
|
|
Declare reference type for a class C (name it C_ref). Definition at line 217 of file TypeExtractor.java. |
|
Declare a reference type for an array type A (name it A_ref). Definition at line 206 of file TypeExtractor.java. Referenced by Builder::createRefTypes().
|
|
Get BIR array type for Soot array type. Definition at line 240 of file TypeExtractor.java. Referenced by Builder::createCollections().
|
|
Return the set of interfaces implemented by a class. Note: need to look at all superclasses. Definition at line 250 of file TypeExtractor.java. Referenced by Builder::createCollections().
|
|
Get BIR record type of class. Definition at line 272 of file TypeExtractor.java. Referenced by Builder::createCollections().
|
|
Get the reference type for a class or array. Definition at line 282 of file TypeExtractor.java. Referenced by Builder::createCollections().
|
|
Return the set of super classes of a class. Definition at line 289 of file TypeExtractor.java. Referenced by Builder::createCollections().
|
|
These tables map Jimple types to BIR types. Note that a single Jimple type (e.g., a SootClass C) may have multiple BIR types (e.g., C_rec and C_ref). Definition at line 70 of file TypeExtractor.java. |