Class GenericResolutionTransformation
java.lang.Object
recoder.kit.Transformation
recoder.kit.TwoPassTransformation
de.uka.ilkd.key.util.removegenerics.GenericResolutionTransformation
- Direct Known Subclasses:
ResolveMemberReference,ResolveTypeReference
public class GenericResolutionTransformation
extends recoder.kit.TwoPassTransformation
This is the base class to all transformations used in the generics removal process.
It allows 2 things: 1) calculating the target type of a type (which is the type when type variables are no longer) and 2) to print out debug info.
String creation is a little tedious in recoder so toString(Object) does a lot of it.
-
Field Summary
FieldsFields inherited from class recoder.kit.Transformation
EQUIVALENCE, IDENTITY, NO_PROBLEM -
Constructor Summary
ConstructorsConstructorDescriptionGenericResolutionTransformation(recoder.CrossReferenceServiceConfiguration sc) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidif the global debug flagDEBUG_OUTPUTis set to true print out a message.protected recoder.abstraction.TypetargetType(recoder.abstraction.Type t) get the type of the reference that it will have in a generic-free environment.static Stringconvert an object to a String.Methods inherited from class recoder.kit.TwoPassTransformation
analyze, execute, transformMethods inherited from class recoder.kit.Transformation
attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attach, attachAsArgument, attachAsArgument, attachAsArgument, attachAsArgument, attachAsArgument, attachAsArgument, attachAsArgument, attachAsArgument, attachAsBody, attachAsCondition, attachAsGuard, attachAsInitializer, attachAsLabel, attachAsMessage, attachAsPrefix, attachAsPrefix, attachAsPrefix, attachAsPrefix, attachAsUpdate, detach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttach, doAttachAsArgument, doAttachAsArgument, doAttachAsArgument, doAttachAsArgument, doAttachAsArgument, doAttachAsArgument, doAttachAsArgument, doAttachAsArgument, doAttachAsArgument, doAttachAsBody, doAttachAsCondition, doAttachAsGuard, doAttachAsInitializer, doAttachAsLabel, doAttachAsMessage, doAttachAsPrefix, doAttachAsPrefix, doAttachAsPrefix, doAttachAsPrefix, doAttachAsUpdate, doDetach, doReplace, getChangeHistory, getCrossReferenceSourceInfo, getNameInfo, getProblemReport, getProgramFactory, getServiceConfiguration, getSourceFileRepository, getSourceInfo, isVisible, replace, rollback, setProblemReport, setServiceConfiguration, toString
-
Field Details
-
DEBUG_OUTPUT
public static boolean DEBUG_OUTPUT
-
-
Constructor Details
-
GenericResolutionTransformation
public GenericResolutionTransformation() -
GenericResolutionTransformation
public GenericResolutionTransformation(recoder.CrossReferenceServiceConfiguration sc)
-
-
Method Details
-
targetType
protected recoder.abstraction.Type targetType(recoder.abstraction.Type t) get the type of the reference that it will have in a generic-free environment. If the expression once had typeVfor some (unbound) type variable it will then havejava.lang.Objectetc.- Parameters:
t- the type to be resolved- Returns:
- the coresponding type in the generic-free environment
-
debugOut
if the global debug flagDEBUG_OUTPUTis set to true print out a message.First the message-head is printed followed by a ':', followed by a ;-separated list of the arguments. Each argument is converted to a string using the
toString(Object).- Parameters:
msg- the message's headarg- 0 or more objects that will be expanded to a ;-separated list after the message
-
toString
convert an object to a String.For some classes
Object.toString()is lame, so that the following classes are caught here:MethodDeclarationNamedModelElementCollection- which handle each element with toString Anything else will be
transoformed using
Object.toString().- Parameters:
object- the object to be transformed, may be null- Returns:
- a String representing the object.
-