public class ClassPreparationMethodBuilder extends RecoderModelTransformer
<clprepare> responsible for the class
preparation.RecoderModelTransformer.FinalOuterVarsCollector, RecoderModelTransformer.TransformerCache| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_PREPARE_IDENTIFIER |
private java.util.HashMap<ClassDeclaration,ASTList<Statement>> |
class2staticFields
maps a class to its static NON CONSTANT fields
|
cache, servicesEQUIVALENCE, IDENTITY, NO_PROBLEM| Constructor and Description |
|---|
ClassPreparationMethodBuilder(CrossReferenceServiceConfiguration services,
RecoderModelTransformer.TransformerCache cache)
Creates an instance of the class preparation method model
transformer.
|
| Modifier and Type | Method and Description |
|---|---|
ProblemReport |
analyze() |
private MethodDeclaration |
createPrepareMethod(TypeDeclaration td)
creates the static method
<clprepare> for the
given type declaration |
private boolean |
isConstantField(FieldSpecification spec)
returns true if the given fieldspecification denotes a constant
field.
|
protected void |
makeExplicit(TypeDeclaration td)
entry method for the constructor normalform builder
|
private ASTList<Statement> |
prepareFields(TypeDeclaration typeDeclaration)
retrieves all static non constant fields and returns a list of
copy assignment pre-initialising them with their default values
some special settings for implicit fields are performed here as well
|
assign, attach, attribute, classDeclarations, containingClass, containingMethod, declare, declare, getAllSupertypes, getDefaultValue, getId, getLocalClass2FinalVar, getUnits, isVisible, makeExplicit, transformexecuteattach, 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, toStringpublic static final java.lang.String CLASS_PREPARE_IDENTIFIER
private java.util.HashMap<ClassDeclaration,ASTList<Statement>> class2staticFields
public ClassPreparationMethodBuilder(CrossReferenceServiceConfiguration services, RecoderModelTransformer.TransformerCache cache)
services - the CrossReferenceServiceConfiguration with the
information about the recoder modelcache - 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.private boolean isConstantField(FieldSpecification spec)
private ASTList<Statement> prepareFields(TypeDeclaration typeDeclaration)
typeDeclaration - the ClassDeclaration whose fields have to be preparedpublic ProblemReport analyze()
analyze in class TwoPassTransformationprivate MethodDeclaration createPrepareMethod(TypeDeclaration td)
<clprepare> for the
given type declarationtd - the TypeDeclaration to which the new created method
will be attachedprotected void makeExplicit(TypeDeclaration td)
makeExplicit in class RecoderModelTransformertd - the TypeDeclaration