public interface Language
Modifier and Type | Field and Description |
---|---|
static JavaLanguage |
JAVA
The canonical
Language implementation for Java |
Modifier and Type | Method and Description |
---|---|
TypeReference[] |
getArrayInterfaces()
get the interfaces implemented by all arrays in the language
|
Language |
getBaseLanguage()
If this language is "derived" from some other langauge, which one?
|
TypeReference |
getConstantType(Object o)
Given a Java constant o, return the appropriate language type to associate
with the constant.
|
Set<Language> |
getDerivedLanguages() |
Object |
getMetadataToken(Object value)
Get the representation of the meta-data corresponding to value.
|
Atom |
getName()
What is the name of the language?
|
TypeReference |
getPointerType(TypeReference pointee) |
PrimitiveType |
getPrimitive(TypeReference reference)
get the abstraction of a primitive type to be used for type inference
|
TypeReference |
getRootType()
What is the root type in a type hierarchy for this language? e.g.
|
TypeReference |
getStringType() |
TypeReference |
getThrowableType()
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 throw
|
SSAInstructionFactory |
instructionFactory() |
boolean |
isBooleanType(TypeReference t) |
boolean |
isCharType(TypeReference t) |
boolean |
isDoubleType(TypeReference t) |
boolean |
isFloatType(TypeReference t) |
boolean |
isIntType(TypeReference t) |
boolean |
isLongType(TypeReference t) |
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)?
|
boolean |
isNullType(TypeReference t)
Is t the type of the language's null value? Should return true if
t == null (?). |
boolean |
isStringType(TypeReference t) |
boolean |
isVoidType(TypeReference t) |
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
|
void |
registerDerivedLanguage(Language l)
Yuck? Languages are mutable?
|
static final JavaLanguage JAVA
Language
implementation for JavaAtom getName()
Language getBaseLanguage()
void registerDerivedLanguage(Language l)
TypeReference getRootType()
TypeReference getThrowableType()
TypeReference getConstantType(Object o)
boolean isNullType(TypeReference t)
t == null
(?).boolean isIntType(TypeReference t)
boolean isLongType(TypeReference t)
boolean isVoidType(TypeReference t)
boolean isFloatType(TypeReference t)
boolean isDoubleType(TypeReference t)
boolean isStringType(TypeReference t)
boolean isMetadataType(TypeReference t)
boolean isCharType(TypeReference t)
boolean isBooleanType(TypeReference t)
Object getMetadataToken(Object value)
TypeReference
. The returned object should be
appropriate for use as the token in an SSALoadMetadataInstruction
for the languageTypeReference[] getArrayInterfaces()
TypeName lookupPrimitiveType(String name)
SSAInstructionFactory instructionFactory()
Collection<TypeReference> inferInvokeExceptions(MethodReference target, IClassHierarchy cha) throws InvalidClassFileException
InvalidClassFileException
TypeReference getStringType()
TypeReference getPointerType(TypeReference pointee)
PrimitiveType getPrimitive(TypeReference reference)
TypeInference