public class ImplicitFieldAdder extends RecoderModelTransformer
RecoderModelTransformer.FinalOuterVarsCollector, RecoderModelTransformer.TransformerCache
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FINAL_VAR_PREFIX |
static java.lang.String |
IMPLICIT_CLASS_ERRONEOUS |
static java.lang.String |
IMPLICIT_CLASS_INIT_IN_PROGRESS |
static java.lang.String |
IMPLICIT_CLASS_INITIALIZED |
static java.lang.String |
IMPLICIT_CLASS_PREPARED |
static java.lang.String |
IMPLICIT_CREATED |
static java.lang.String |
IMPLICIT_ENCLOSING_THIS |
static java.lang.String |
IMPLICIT_INITIALIZED |
static java.lang.String |
IMPLICIT_TRANSACTION_UPDATED |
static java.lang.String |
IMPLICIT_TRANSIENT |
cache, services
EQUIVALENCE, IDENTITY, NO_PROBLEM
Constructor and Description |
---|
ImplicitFieldAdder(CrossReferenceServiceConfiguration services,
RecoderModelTransformer.TransformerCache cache)
creates a transformation that adds all implicit fields,
for example
<created> ,
<initialized> and
<nextToCreate> etc. |
Modifier and Type | Method and Description |
---|---|
protected void |
addClassInitializerStatusFields(TypeDeclaration td) |
ProblemReport |
analyze() |
static FieldDeclaration |
createImplicitRecoderField(java.lang.String typeName,
java.lang.String fieldName,
boolean isStatic,
boolean isPrivate)
creates an implicit field of the given type and name
|
static FieldDeclaration |
createImplicitRecoderField(java.lang.String typeName,
java.lang.String fieldName,
boolean isStatic,
boolean isPrivate,
boolean isFinal) |
protected void |
makeExplicit(TypeDeclaration td)
The method is called for each type declaration of the compilation
unit and initiates the syntactical transformation.
|
assign, attach, attribute, classDeclarations, containingClass, containingMethod, declare, declare, getAllSupertypes, getDefaultValue, getId, getLocalClass2FinalVar, getUnits, isVisible, makeExplicit, transform
execute
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, replace, rollback, setProblemReport, setServiceConfiguration, toString
public static final java.lang.String IMPLICIT_CLASS_PREPARED
public static final java.lang.String IMPLICIT_CLASS_INITIALIZED
public static final java.lang.String IMPLICIT_CLASS_INIT_IN_PROGRESS
public static final java.lang.String IMPLICIT_CLASS_ERRONEOUS
public static final java.lang.String IMPLICIT_CREATED
public static final java.lang.String IMPLICIT_INITIALIZED
public static final java.lang.String IMPLICIT_TRANSIENT
public static final java.lang.String IMPLICIT_TRANSACTION_UPDATED
public static final java.lang.String IMPLICIT_ENCLOSING_THIS
public static final java.lang.String FINAL_VAR_PREFIX
public ImplicitFieldAdder(CrossReferenceServiceConfiguration services, RecoderModelTransformer.TransformerCache cache)
<created>
,
<initialized>
and
<nextToCreate>
etc.services
- the CrossReferenceServiceConfiguration to access
model informationcache
- a cache object that stores information which is needed by
and common to many transformations. it includes the compilation units,
the declared classes, and information for local classes.public static FieldDeclaration createImplicitRecoderField(java.lang.String typeName, java.lang.String fieldName, boolean isStatic, boolean isPrivate)
typeName
- the name of the type of the new field to createfieldName
- the name of the fieldisStatic
- a boolean that is true if the field has to be
created as static (class) fieldpublic static FieldDeclaration createImplicitRecoderField(java.lang.String typeName, java.lang.String fieldName, boolean isStatic, boolean isPrivate, boolean isFinal)
protected void addClassInitializerStatusFields(TypeDeclaration td)
public ProblemReport analyze()
analyze
in class TwoPassTransformation
protected void makeExplicit(TypeDeclaration td)
RecoderModelTransformer
makeExplicit
in class RecoderModelTransformer
Copyright © 2003-2019 The KeY-Project.