public class TypeUsageInformationImpl extends java.lang.Object implements TypeUsageInformation
Modifier and Type | Class and Description |
---|---|
private class |
TypeUsageInformationImpl.FieldClash |
Modifier and Type | Field and Description |
---|---|
private Predicate<java.lang.String> |
allowShorten |
private JavaRefTypeInstance |
analysisType |
private java.util.Map<java.lang.String,java.lang.Boolean> |
clashNames |
private java.util.Map<JavaRefTypeInstance,java.lang.String> |
displayName |
private IllegalIdentifierDump |
iid |
private java.util.Set<JavaRefTypeInstance> |
shortenedRefTypes |
private java.util.Map<java.lang.String,java.util.LinkedList<JavaRefTypeInstance>> |
shortNames |
private java.util.Set<DetectedStaticImport> |
staticImports |
private java.util.Set<JavaRefTypeInstance> |
usedLocalInnerTypes |
private java.util.Set<JavaRefTypeInstance> |
usedRefTypes |
Constructor and Description |
---|
TypeUsageInformationImpl(Options options,
JavaRefTypeInstance analysisType,
java.util.Set<JavaRefTypeInstance> usedRefTypes,
java.util.Set<DetectedStaticImport> staticImports) |
private final IllegalIdentifierDump iid
private java.util.Set<DetectedStaticImport> staticImports
private final JavaRefTypeInstance analysisType
private final java.util.Set<JavaRefTypeInstance> usedRefTypes
private final java.util.Set<JavaRefTypeInstance> shortenedRefTypes
private final java.util.Set<JavaRefTypeInstance> usedLocalInnerTypes
private final java.util.Map<JavaRefTypeInstance,java.lang.String> displayName
private final java.util.Map<java.lang.String,java.util.LinkedList<JavaRefTypeInstance>> shortNames
private final Predicate<java.lang.String> allowShorten
private final java.util.Map<java.lang.String,java.lang.Boolean> clashNames
public TypeUsageInformationImpl(Options options, JavaRefTypeInstance analysisType, java.util.Set<JavaRefTypeInstance> usedRefTypes, java.util.Set<DetectedStaticImport> staticImports)
public IllegalIdentifierDump getIid()
getIid
in interface TypeUsageInformation
public JavaRefTypeInstance getAnalysisType()
getAnalysisType
in interface TypeUsageInformation
public java.lang.String generateInnerClassShortName(JavaRefTypeInstance clazz)
generateInnerClassShortName
in interface TypeUsageInformation
public java.lang.String generateOverriddenName(JavaRefTypeInstance clazz)
generateOverriddenName
in interface TypeUsageInformation
private void initialiseFrom(java.util.Set<JavaRefTypeInstance> usedRefTypes)
private void addDisplayNames(java.util.Collection<JavaRefTypeInstance> types)
private boolean fieldClash(java.lang.String name)
public java.util.Set<JavaRefTypeInstance> getUsedClassTypes()
getUsedClassTypes
in interface TypeUsageInformation
public java.util.Set<JavaRefTypeInstance> getShortenedClassTypes()
getShortenedClassTypes
in interface TypeUsageInformation
public java.util.Set<JavaRefTypeInstance> getUsedInnerClassTypes()
getUsedInnerClassTypes
in interface TypeUsageInformation
public boolean hasLocalInstance(JavaRefTypeInstance type)
hasLocalInstance
in interface TypeUsageInformation
public boolean isStaticImport(JavaTypeInstance clazz, java.lang.String fixedName)
isStaticImport
in interface TypeUsageInformation
public java.util.Set<DetectedStaticImport> getDetectedStaticImports()
getDetectedStaticImports
in interface TypeUsageInformation
public java.lang.String getName(JavaTypeInstance type, TypeContext typeContext)
getName
in interface TypeUsageInformation
public boolean isNameClash(JavaTypeInstance type, java.lang.String name, TypeContext typeContext)
isNameClash
in interface TypeUsageInformation