Class CAstAbstractModuleLoader
java.lang.Object
com.ibm.wala.cast.loader.CAstAbstractLoader
com.ibm.wala.cast.loader.CAstAbstractModuleLoader
- All Implemented Interfaces:
IClassLoader
- Direct Known Subclasses:
JavaScriptLoader
abstract class loader that performs CAst and IR generation for relevant entities in a list of
Modules. Subclasses provide the CAst / IR translators appropriate for the language.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclassclass -
Field Summary
Fields inherited from class CAstAbstractLoader
cha, parent, typesModifier and TypeFieldDescriptionprotected final IClassHierarchyprotected final IClassLoadertypes loaded by this -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidsubclasses should override to perform actions after CAst and IR have been generated.protected Fileprotected abstract TranslatorToCAstgetTranslatorToCAst(CAst ast, ModuleEntry M, List<Module> modules) create the appropriate CAst translator for the language and source modulevoidInitialize internal data structures.protected abstract TranslatorToIRinitTranslator(Set<Pair<CAstEntity, ModuleEntry>> topLevelEntities) create the appropriate IR translator for the languageprotected abstract booleanshouldTranslate(CAstEntity entity) should IR be generated for entity?Methods inherited from class CAstAbstractLoader
addMessage, addMessages, clearMessages, getMessages, getModulesWithParseErrors, getModulesWithWarnings, getName, getNumberOfClasses, getNumberOfMethods, getParent, getSource, getSource, getSourceFileName, getSourceFileName, iterateAllClasses, lookupClass, lookupClass, removeAllModifier and TypeMethodDescriptionvoidaddMessage(ModuleEntry module, Warning message) voidaddMessages(ModuleEntry module, Set<Warning> message) voidgetName()intintgetSourceFileName(IClass klass) getSourceFileName(IMethod method, int bcOffset) lookupClass(TypeName className) Find and return the IClass defined by this class loader that corresponds to the given class name.lookupClass(String className, IClassHierarchy cha) voidremoveAll(Collection<IClass> toRemove) blow away references to any classes in the setMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IClassLoader
getInstructionFactory, getLanguage, getReferenceModifier and TypeMethodDescriptionReturn the ClassLoaderReference for this class loader.
-
Constructor Details
-
CAstAbstractModuleLoader
-
CAstAbstractModuleLoader
-
-
Method Details
-
getTranslatorToCAst
protected abstract TranslatorToCAst getTranslatorToCAst(CAst ast, ModuleEntry M, List<Module> modules) throws IOException create the appropriate CAst translator for the language and source module- Parameters:
modules- all modules in the analysis- Throws:
IOException
-
shouldTranslate
should IR be generated for entity? -
initTranslator
protected abstract TranslatorToIR initTranslator(Set<Pair<CAstEntity, ModuleEntry>> topLevelEntities) create the appropriate IR translator for the language- Parameters:
topLevelEntities- the set of all modules being translated
-
getLocalFile
- Throws:
IOException
-
finishTranslation
protected void finishTranslation()subclasses should override to perform actions after CAst and IR have been generated. by default, do nothing -
init
Description copied from interface:IClassLoaderInitialize internal data structures.
-