public class PrepareObjectBuilder extends RecoderModelTransformer
RecoderModelTransformer.FinalOuterVarsCollector, RecoderModelTransformer.TransformerCache
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
IMPLICIT_OBJECT_PREPARE |
static java.lang.String |
IMPLICIT_OBJECT_PREPARE_ENTER |
cache, services
EQUIVALENCE, IDENTITY, NO_PROBLEM
Constructor and Description |
---|
PrepareObjectBuilder(CrossReferenceServiceConfiguration services,
RecoderModelTransformer.TransformerCache cache) |
Modifier and Type | Method and Description |
---|---|
ProblemReport |
analyze()
Two-pass transformation have to be strictly divided up into two
parts.
|
MethodDeclaration |
createMethod(TypeDeclaration type)
creates the implicit
<prepare> method that
sets the fields of the given type to its default values |
MethodDeclaration |
createMethodPrepareEnter(TypeDeclaration type)
creates the implicit
<prepareEnter> method that
sets the fields of the given type to its default values |
protected StatementBlock |
createPrepareBody(ReferencePrefix prefix,
TypeDeclaration classType)
creates an implicit method called 'prepare', that sets all
attributes to their default values
|
protected void |
makeExplicit(TypeDeclaration td)
entry method for the constructor normalform builder
|
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_OBJECT_PREPARE
public static final java.lang.String IMPLICIT_OBJECT_PREPARE_ENTER
public PrepareObjectBuilder(CrossReferenceServiceConfiguration services, RecoderModelTransformer.TransformerCache cache)
public ProblemReport analyze()
analyze
in class TwoPassTransformation
protected StatementBlock createPrepareBody(ReferencePrefix prefix, TypeDeclaration classType)
public MethodDeclaration createMethod(TypeDeclaration type)
<prepare>
method that
sets the fields of the given type to its default valuestype
- the TypeDeclaration for which the
<prepare>
is created<prepare>
methodpublic MethodDeclaration createMethodPrepareEnter(TypeDeclaration type)
<prepareEnter>
method that
sets the fields of the given type to its default valuestype
- the TypeDeclaration for which the
<prepare>
is created<prepare>
methodprotected void makeExplicit(TypeDeclaration td)
makeExplicit
in class RecoderModelTransformer
td
- the TypeDeclarationCopyright © 2003-2019 The KeY-Project.