public class KeYCrossReferenceSourceInfo extends DefaultCrossReferenceSourceInfo
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,CompilationUnit> |
stubClasses
The mapping from class names to stub compilation units.
|
name2primitiveType
serviceConfiguration
METHOD_EXIT
ELEMENT_LONG, ELEMENT_LONG_LOCAL, ELEMENT_SHORT
INITIAL_CROSS_REFERENCER_ELEMENT2REFERENCE_HASH_SET_SIZE, INITIAL_SOURCE_INFO_NAME2PRIMITIVE_HASH_SET_SIZE, INITIAL_SOURCE_INFO_REFERENCE2ELEMENT_HASH_SET_SIZE
Constructor and Description |
---|
KeYCrossReferenceSourceInfo(ServiceConfiguration config) |
Modifier and Type | Method and Description |
---|---|
ClassType |
getContainingClassType(ProgramElement context)
Returns the class type that contains the given program element.
|
java.util.Collection<? extends CompilationUnit> |
getCreatedStubClasses()
Gets the collection of created stub classes ion their compilation units
|
Type |
getType(Expression expr)
clears the cache for the TypeReference to Type resolution.
|
Type |
getType(java.lang.String name,
ProgramElement context)
Tries to find a type with the given name using the given program element
as context.
|
Type |
getType(TypeReference tr) |
Variable |
getVariable(java.lang.String name,
ProgramElement context) |
void |
initialize(ServiceConfiguration cfg)
Called by the service configuration indicating that all services
are known.
|
void |
modelChanged(ChangeHistoryEvent event) |
void |
setIgnoreUnresolvedClasses(boolean ignoreUnresolvedClasses)
Sets if unresolved classes result in an exception or lead to stubs.
|
void |
setNames2Vars(java.util.HashMap<java.lang.String,VariableSpecification> names2vars) |
getReferences, getReferences, getReferences, getReferences, getReferences, getReferences, information, reset
addProgressListener, containsTypeParameter, getAnnotationProperty, getAnnotationType, getClassTypeContainer, getConstructor, getConstructor, getConstructorDeclaration, getConstructors, getConstructors, getConstructors, getContainingClassType, getErrorHandler, getExceptions, getField, getFields, getFields, getFromPackageImports, getFromTypeImports, getFromUnitPackage, getInheritedField, getInheritedType, getLocalType, getMethod, getMethod, getMethodDeclaration, getMethods, getMethods, getMethods, getNameInfo, getPackage, getPackage, getReturnType, getSignature, getSucceedingStatements, getSupertypes, getType, getType, getType, getType, getTypeDeclaration, getTypes, getTypes, getVariable, getVariable, getVariableSpecification, isNarrowingTo, makeSignature, register, removeProgressListener, resolveURQ, resolveURQ
doThreePhaseFilter, filterApplicableMethods, filterMostSpecificMethods, filterMostSpecificMethodsPhase2, filterMostSpecificMethodsPhase3, getAllFields, getAllMethods, getAllSubtypes, getAllSupertypes, getAllTypes, getBoxedType, getConstructors, getConstructors, getMethods, getMethods, getMethods, getOutermostType, getPromotedType, getSubtypes, getUnboxedType, isCompatibleSignature, isCompatibleSignature, isSubtype, isSupertype, isVisibleFor, isWidening, isWidening, isWidening, isWidening, makeParameterizedArrayType, replaceTypeArgs, updateModel
getServiceConfiguration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addProgressListener, getAnnotationProperty, getAnnotationType, getConstructor, getConstructor, getConstructorDeclaration, getConstructors, getConstructors, getField, getFields, getMethod, getMethod, getMethodDeclaration, getMethods, getMethods, getPackage, getSucceedingStatements, getType, getType, getType, getTypeDeclaration, getTypes, getVariable, getVariable, getVariableSpecification, isNarrowingTo, makeSignature, register, removeProgressListener, resolveURQ
filterApplicableMethods, filterMostSpecificMethods, filterMostSpecificMethodsPhase2, filterMostSpecificMethodsPhase3, getAllFields, getAllMethods, getAllSubtypes, getAllSupertypes, getAllTypes, getBoxedType, getClassTypeContainer, getConstructors, getConstructors, getContainingClassType, getExceptions, getFields, getMethods, getMethods, getMethods, getMethods, getPackage, getPromotedType, getReturnType, getSignature, getSubtypes, getSupertypes, getType, getTypes, getUnboxedType, isCompatibleSignature, isCompatibleSignature, isSubtype, isSupertype, isVisibleFor, isWidening, isWidening, isWidening, isWidening
getServiceConfiguration
protected java.util.Map<java.lang.String,CompilationUnit> stubClasses
public KeYCrossReferenceSourceInfo(ServiceConfiguration config)
public void setNames2Vars(java.util.HashMap<java.lang.String,VariableSpecification> names2vars)
public void initialize(ServiceConfiguration cfg)
initialize
in interface Service
initialize
in class DefaultSourceInfo
cfg
- the service configuration this services has been assigned to.public ClassType getContainingClassType(ProgramElement context)
getContainingClassType
in interface SourceInfo
getContainingClassType
in class DefaultSourceInfo
context
- a program element.null
).public void modelChanged(ChangeHistoryEvent event)
modelChanged
in interface ChangeHistoryListener
modelChanged
in class DefaultCrossReferenceSourceInfo
public Variable getVariable(java.lang.String name, ProgramElement context)
getVariable
in interface SourceInfo
getVariable
in class DefaultSourceInfo
public Type getType(java.lang.String name, ProgramElement context)
null
.
This method is identical to
DefaultSourceInfo.getType(String, ProgramElement)
but it uses pe = redirectScopeNesting(pe);
instead of
s.getASTParent();
in Recoder 0.84.getType
in interface SourceInfo
getType
in class DefaultSourceInfo
name
- the name for the type to be looked up; may or may not be
qualified.context
- a program element defining the lookup context (scope).null
).public void setIgnoreUnresolvedClasses(boolean ignoreUnresolvedClasses)
registerUnresolvedTypeRef(TypeReference)
to create dummy stubs.ignoreUnresolvedClasses
- ignore unresolved classes iff truepublic Type getType(TypeReference tr)
getType
in interface SourceInfo
getType
in class DefaultSourceInfo
public java.util.Collection<? extends CompilationUnit> getCreatedStubClasses()
public Type getType(Expression expr)
getType
in interface SourceInfo
getType
in class DefaultSourceInfo
Copyright © 2003-2019 The KeY-Project.