Package com.ibm.wala.classLoader
Interface Language
-
- All Known Subinterfaces:
BytecodeLanguage
- All Known Implementing Classes:
JavaLanguage,LanguageImpl
public interface LanguageMain interface for language-specific information. This interface helps build analyses which can operate over multiple languages.
-
-
Field Summary
Fields Modifier and Type Field Description static JavaLanguageJAVAThe canonicalLanguageimplementation for Java
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TypeReference[]getArrayInterfaces()get the interfaces implemented by all arrays in the languageLanguagegetBaseLanguage()If this language is "derived" from some other langauge, which one?TypeReferencegetConstantType(Object o)Given a Java constant o, return the appropriate language type to associate with the constant.Set<Language>getDerivedLanguages()ObjectgetMetadataToken(Object value)Get the representation of the meta-data corresponding to value.AtomgetName()What is the name of the language?TypeReferencegetPointerType(TypeReference pointee)PrimitiveTypegetPrimitive(TypeReference reference)get the abstraction of a primitive type to be used for type inferenceTypeReferencegetRootType()What is the root type in a type hierarchy for this language? e.g.TypeReferencegetStringType()TypeReferencegetThrowableType()What is the root type of exceptions in this language? e.g.Collection<TypeReference>inferInvokeExceptions(MethodReference target, IClassHierarchy cha)determine the set of possible exception types a call to target may throwSSAInstructionFactoryinstructionFactory()booleanisBooleanType(TypeReference t)booleanisCharType(TypeReference t)booleanisDoubleType(TypeReference t)booleanisFloatType(TypeReference t)booleanisIntType(TypeReference t)booleanisLongType(TypeReference t)booleanisMetadataType(TypeReference t)Is t a "metadata" type for the language, i.e., a type describing some other type (e.g., java.lang.Class for Java)?booleanisNullType(TypeReference t)Is t the type of the language's null value? Should return true ift == null(?).booleanisStringType(TypeReference t)booleanisVoidType(TypeReference t)TypeNamelookupPrimitiveType(String name)Given a source-level primitive type name, get the corresponding "low-level" type name, e.g., the corresponding character to use in a Java method descriptorvoidregisterDerivedLanguage(Language l)Yuck? Languages are mutable?
-
-
-
Field Detail
-
JAVA
static final JavaLanguage JAVA
The canonicalLanguageimplementation for Java
-
-
Method Detail
-
getName
Atom getName()
What is the name of the language?
-
getBaseLanguage
Language getBaseLanguage()
If this language is "derived" from some other langauge, which one?
-
registerDerivedLanguage
void registerDerivedLanguage(Language l)
Yuck? Languages are mutable?
-
getRootType
TypeReference getRootType()
What is the root type in a type hierarchy for this language? e.g. java.lang.Object in Java.
-
getThrowableType
TypeReference getThrowableType()
What is the root type of exceptions in this language? e.g. java.lang.Throwable in Java
-
getConstantType
TypeReference getConstantType(Object o)
Given a Java constant o, return the appropriate language type to associate with the constant. Possible types for o can be language dependent, but typically include Boolean, String, Integer, Float, etc.
-
isNullType
boolean isNullType(TypeReference t)
Is t the type of the language's null value? Should return true ift == null(?).
-
isIntType
boolean isIntType(TypeReference t)
-
isLongType
boolean isLongType(TypeReference t)
-
isVoidType
boolean isVoidType(TypeReference t)
-
isFloatType
boolean isFloatType(TypeReference t)
-
isDoubleType
boolean isDoubleType(TypeReference t)
-
isStringType
boolean isStringType(TypeReference t)
-
isMetadataType
boolean isMetadataType(TypeReference t)
Is t a "metadata" type for the language, i.e., a type describing some other type (e.g., java.lang.Class for Java)?
-
isCharType
boolean isCharType(TypeReference t)
-
isBooleanType
boolean isBooleanType(TypeReference t)
-
getMetadataToken
Object getMetadataToken(Object value)
Get the representation of the meta-data corresponding to value. For example, in Java, if value represents some type, the returned object should be the correspondingTypeReference. The returned object should be appropriate for use as the token in anSSALoadMetadataInstructionfor the language
-
getArrayInterfaces
TypeReference[] getArrayInterfaces()
get the interfaces implemented by all arrays in the language
-
lookupPrimitiveType
TypeName lookupPrimitiveType(String name)
Given a source-level primitive type name, get the corresponding "low-level" type name, e.g., the corresponding character to use in a Java method descriptor
-
instructionFactory
SSAInstructionFactory instructionFactory()
-
inferInvokeExceptions
Collection<TypeReference> inferInvokeExceptions(MethodReference target, IClassHierarchy cha) throws InvalidClassFileException
determine the set of possible exception types a call to target may throw- Throws:
InvalidClassFileException
-
getStringType
TypeReference getStringType()
-
getPointerType
TypeReference getPointerType(TypeReference pointee)
-
getPrimitive
PrimitiveType getPrimitive(TypeReference reference)
get the abstraction of a primitive type to be used for type inference- See Also:
TypeInference
-
-