Skip navigation links
KeY 2.7.1589_4abe0e7c170fc61dd74a695a6efcf763b0f06898
de.uka.ilkd.key.java.recoderext

Class ConstructorNormalformBuilder

    • Method Detail

      • collectInitializers

        private ASTList<Statement> collectInitializers(ClassDeclaration cd)
        The list of statements is the smallest list that contains a copy assignment for each instance field initializer of class cd, e.g. i = 0; for public int i = 0; or a reference to the private method <objectInitializer>i refering to the i-th object initializer of cd. These private declared methods are created on the fly. Example for class C { int i = 0; { int j = 3; i = j + 5; } public C () {} ... } the following list of size two is returned [ i = 0;, <objectInitializer>0(); ] where private <objectInitializer>0() { int j = 3; i = j + 5; }
        Parameters:
        cd - the ClassDeclaration of which the initilizers have to be collected
        Returns:
        the list of copy assignments and method references realising the initializers.
      • analyze

        public ProblemReport analyze()
        Two-pass transformation have to be strictly divided up into two parts. the first part analyzes the model and collects all necessary information. In this case all class declarations are examined and initializers as well as constructors are collected. All actions, which may cause a recoder model update have to be done here.
        Overrides:
        analyze in class TwoPassTransformation
        Returns:
        status report if analyze encountered problems or not
      • attachDefaultConstructor

        private void attachDefaultConstructor(ClassDeclaration cd)
      • normalform

        private MethodDeclaration normalform(ClassDeclaration cd,
                                             Constructor cons)
        Creates the normalform of the given constructor, that is declared in class cd. For a detailed description of the normalform to be built see the KeY Manual.
        Parameters:
        cd - the ClassDeclaration where the cons is declared
        cons - the Constructor to be transformed
        Returns:
        the constructor normalform
KeY 2.7.1589_4abe0e7c170fc61dd74a695a6efcf763b0f06898