Class JavaSourceLoaderImpl
java.lang.Object
com.ibm.wala.classLoader.ClassLoaderImpl
com.ibm.wala.cast.java.loader.JavaSourceLoaderImpl
- All Implemented Interfaces:
IClassLoader
- Direct Known Subclasses:
ECJSourceLoaderImpl, JDTSourceLoaderImpl
A
ClassLoaderImpl that processes source file entities in the compile-time classpath.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classDOMO representation of an abstract (body-less) method on a Java type that resides in a source fileclassDOMO representation of a concrete method (which has a body) on a Java type that resides in a source filestatic classclassWALA representation of a Java class residing in a source fileprotected classGeneric DOMO representation of a method on a Java type that resides in a source fileprotected static classWALA representation of a field on a Java type that resides in a source file -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanprotected static final JavaSourceLoaderImpl.InstructionFactoryFields inherited from class ClassLoaderImpl
cha, DEBUG_LEVEL, loadedClassesModifier and TypeFieldDescriptionprotected final IClassHierarchyGoverning class hierarchystatic final intA mapping from class name (TypeName) to IClass -
Constructor Summary
ConstructorsConstructorDescriptionJavaSourceLoaderImpl(boolean existsCommonSuperClass, ClassLoaderReference loaderRef, IClassLoader parent, IClassHierarchy cha) JavaSourceLoaderImpl(ClassLoaderReference loaderRef, IClassLoader parent, IClassHierarchy cha) -
Method Summary
Modifier and TypeMethodDescriptionvoiddefineAbstractFunction(CAstEntity n, IClass owner) voiddefineField(CAstEntity n, IClass owner) voiddefineFunction(CAstEntity n, IClass owner, AbstractCFG<?, ?> cfg, SymbolTable symtab, boolean hasCatchBlock, Map<IBasicBlock<SSAInstruction>, Set<TypeReference>> caughtTypes, boolean hasMonitorOp, AstTranslator.AstLexicalInformation lexicalInfo, AstMethod.DebuggingInformation debugInfo) defineType(CAstEntity type, String typeName, CAstEntity owner) protected Collection<Annotation> protected abstract SourceModuleTranslatorvoidInitialize internal data structuresprotected voidloadAllSources(Set<ModuleEntry> modules) Set up mapping from type name to Module Entrystatic intmapToInt(Collection<CAstQualifier> qualifiers) toString()protected static TypeNametoWALATypeName(CAstType type) Methods inherited from class ClassLoaderImpl
getLanguage, getName, getNumberOfClasses, getNumberOfMethods, getParent, getReference, getSource, getSource, getSourceFileName, getSourceFileName, iterateAllClasses, lookupClass, removeAllModifier and TypeMethodDescriptiongetName()intintMethod getParent.Return the ClassLoaderReference for this class loader.getSourceFileName(IClass klass) getSourceFileName(IMethod method, int offset) lookupClass(TypeName className) Find and return the IClass defined by this class loader that corresponds to the given class name.voidremoveAll(Collection<IClass> toRemove) blow away references to any classes in the set
-
Field Details
-
fTypeMap
-
deleteTypeMapAfterInit
public static volatile boolean deleteTypeMapAfterInit -
insts
-
-
Constructor Details
-
JavaSourceLoaderImpl
public JavaSourceLoaderImpl(boolean existsCommonSuperClass, ClassLoaderReference loaderRef, IClassLoader parent, IClassHierarchy cha) -
JavaSourceLoaderImpl
public JavaSourceLoaderImpl(ClassLoaderReference loaderRef, IClassLoader parent, IClassHierarchy cha)
-
-
Method Details
-
getAnnotations
-
mapToInt
-
getClassHierarchy
-
loadAllSources
Description copied from class:ClassLoaderImplSet up mapping from type name to Module Entry- Overrides:
loadAllSourcesin classClassLoaderImpl
-
getTranslator
-
init
Description copied from class:ClassLoaderImplInitialize internal data structures- Specified by:
initin interfaceIClassLoader- Overrides:
initin classClassLoaderImpl- Throws:
IOException
-
defineFunction
public void defineFunction(CAstEntity n, IClass owner, AbstractCFG<?, ?> cfg, SymbolTable symtab, boolean hasCatchBlock, Map<IBasicBlock<SSAInstruction>, Set<TypeReference>> caughtTypes, boolean hasMonitorOp, AstTranslator.AstLexicalInformation lexicalInfo, AstMethod.DebuggingInformation debugInfo) -
defineAbstractFunction
-
defineField
-
toWALATypeName
-
defineType
-
toString
- Overrides:
toStringin classClassLoaderImpl
-
getInstructionFactory
- Specified by:
getInstructionFactoryin interfaceIClassLoader- Overrides:
getInstructionFactoryin classClassLoaderImpl
-