| java.lang.Object de.uka.ilkd.key.java.KeYJavaASTFactory de.uka.ilkd.key.java.CreateArrayMethodBuilder
All known Subclasses: de.uka.ilkd.key.java.CreateTransientArrayMethodBuilder,
CreateArrayMethodBuilder | public class CreateArrayMethodBuilder extends KeYJavaASTFactory (Code) | | This class creates the <createArray> method for array
creation and in particular its helper method
<createArrayHelper> . This class hould be replaced by a
recoder transformation as soon as we port our array data structures to
RecodeR.
|
Method Summary | |
protected LinkedList | createArray(ListOfField fields) | protected ListOfField | filterField(ArrayOfMemberDeclaration list) extracts all field specifications out of the given list. | final protected ListOfField | filterField(FieldDeclaration field) | protected ListOfField | filterImplicitFields(ListOfField list) | protected ProgramVariable | find(String name, ListOfField fields) | protected ProgramVariable | findInObjectFields(String name) | public ProgramMethod | getArrayInstanceAllocatorMethod(TypeReference arrayTypeReference) | protected StatementBlock | getCreateArrayBody(TypeReference arrayRef, ProgramVariable paramLength) | protected StatementBlock | getCreateArrayHelperBody(ProgramVariable length, ProgramVariable paramLength, ListOfField fields, boolean createTransient, ProgramVariable transientType) creates the body of method <createArrayHelper(int
paramLength)>
therefore it first adds the statements responsible to take the correct
one out of the list, then the arrays length attribute is set followed by
a call to <prepare>() setting the arrays fields on
their default value. | public ProgramMethod | getCreateArrayHelperMethod(TypeReference arrayTypeReference, ProgramVariable length, ListOfField fields) | public ProgramMethod | getCreateArrayMethod(TypeReference arrayTypeReference, ProgramMethod prepare, ListOfField fields) | protected Expression | getDefaultValue(Type type) | public ProgramMethod | getPrepareArrayMethod(TypeRef arrayRef, ProgramVariable length, Expression defaultValue, ListOfField fields) |
IMPLICIT_ARRAY_CREATE | final public static String IMPLICIT_ARRAY_CREATE(Code) | | |
IMPLICIT_ARRAY_CREATE_TRANSIENT | final public static String IMPLICIT_ARRAY_CREATE_TRANSIENT(Code) | | |
IMPLICIT_ARRAY_CREATION_HELPER | final public static String IMPLICIT_ARRAY_CREATION_HELPER(Code) | | |
IMPLICIT_ARRAY_TRANSIENT_CREATION_HELPER | final public static String IMPLICIT_ARRAY_TRANSIENT_CREATION_HELPER(Code) | | |
integerType | final protected KeYJavaType integerType(Code) | | keeps the currently used integer type
|
objectType | final protected KeYJavaType objectType(Code) | | stores the currently used object type
|
CreateArrayMethodBuilder | public CreateArrayMethodBuilder(KeYJavaType integerType, KeYJavaType objectType)(Code) | | create the method builder for array implict creation methods
|
createArray | protected LinkedList createArray(ListOfField fields)(Code) | | creates the statements which take the next object out of the list of
available objects
the statements which take the next object out of the list ofavailable objects |
filterField | protected ListOfField filterField(ArrayOfMemberDeclaration list)(Code) | | extracts all field specifications out of the given list. Therefore it
descends into field declarations.
Parameters: list - the ArrayOfMemberDeclaration with the members of a typedeclaration a ListOfField the includes all field specifications found int thefield declaration of the given list |
filterField | final protected ListOfField filterField(FieldDeclaration field)(Code) | | extracts all fields out of fielddeclaration
Parameters: field - the FieldDeclaration of which the field specifications have tobe extracted a ListOfField the includes all field specifications found int thefield declaration of the given list |
filterImplicitFields | protected ListOfField filterImplicitFields(ListOfField list)(Code) | | extracts all implicit field specifications out of the given list
Parameters: list - the ListOfField from which the implicit ones have to beselected a list with all implicit fields found in 'list' |
find | protected ProgramVariable find(String name, ListOfField fields)(Code) | | retrieves a field with the given name out of the list
Parameters: name - a String with the name of the field to be looked for Parameters: fields - the ListOfField where we have to look for the field the program variable of the given name or null if not found |
getArrayInstanceAllocatorMethod | public ProgramMethod getArrayInstanceAllocatorMethod(TypeReference arrayTypeReference)(Code) | | creates the implicit method <allocate> which is a
stump and given meaning by a contract
|
getCreateArrayHelperBody | protected StatementBlock getCreateArrayHelperBody(ProgramVariable length, ProgramVariable paramLength, ListOfField fields, boolean createTransient, ProgramVariable transientType)(Code) | | creates the body of method <createArrayHelper(int
paramLength)>
therefore it first adds the statements responsible to take the correct
one out of the list, then the arrays length attribute is set followed by
a call to <prepare>() setting the arrays fields on
their default value.
Parameters: length - the final public ProgramVariablelength of the array Parameters: paramLength - the ProgramVariable which is the parameter ofthe <createArray> method Parameters: prepare - the ProgramMethod <prepare>() which will be called when executing<createArray> Parameters: fields - the ListOfFields of the current array Parameters: createTransient - a boolean indicating if a transient array has to be created (this is special to JavaCard) Parameters: transientType - a ProgramVariable identifying the kind of transient the StatementBlock which is the method's body
{this. = this..;this. = false;this. = true;this.length = paramLength;this.();this. = transientType;this. = true;return this;} |
getCreateArrayMethod | public ProgramMethod getCreateArrayMethod(TypeReference arrayTypeReference, ProgramMethod prepare, ListOfField fields)(Code) | | creates the implicit method <createArray> it
fulfills a similar purpose as <createObject> in
addition it sets the arrays length and calls the prepare method
|
getDefaultValue | protected Expression getDefaultValue(Type type)(Code) | | returns the default value of the given type according to JLS \S 4.5.5
the default value of the given type according to JLS \S 4.5.5 |
Methods inherited from de.uka.ilkd.key.java.KeYJavaASTFactory | public static Statement assign(Expression lhs, Expression rhs)(Code)(Java Doc) public static Expression attribute(ReferencePrefix prefix, ProgramVariable field)(Code)(Java Doc) public static Break breakStatement(Label l)(Code)(Java Doc) public static Catch catchClause(ParameterDeclaration param, StatementBlock body)(Code)(Java Doc) public static Catch catchClause(JavaInfo javaInfo, String param, KeYJavaType kjt, StatementBlock body)(Code)(Java Doc) public static Catch catchClause(JavaInfo javaInfo, String param, String type, StatementBlock body)(Code)(Java Doc) public static LocalVariableDeclaration declare(ProgramElementName name, TypeReference typeRef)(Code)(Java Doc) public static LocalVariableDeclaration declare(ProgramElementName name, Expression init, KeYJavaType type)(Code)(Java Doc) public static LocalVariableDeclaration declare(ProgramVariable var, Expression init, KeYJavaType type)(Code)(Java Doc) public static LocalVariableDeclaration declare(ProgramVariable var, KeYJavaType type)(Code)(Java Doc) public static LocalVariableDeclaration declare(String name, KeYJavaType type)(Code)(Java Doc) public static EmptyStatement emptyStatement()(Code)(Java Doc) public static If ifElse(Expression guard, Then then, Else els)(Code)(Java Doc) public static If ifThen(Expression guard, Statement then)(Code)(Java Doc) public static StatementBlock insertStatementInBlock(Statement[] stmnt, StatementBlock b)(Code)(Java Doc) public static StatementBlock insertStatementInBlock(StatementBlock stmnt, StatementBlock b)(Code)(Java Doc) public static ProgramVariable localVariable(String name, KeYJavaType kjt)(Code)(Java Doc) public static ProgramVariable localVariable(ProgramElementName name, KeYJavaType kjt)(Code)(Java Doc) public static ParameterDeclaration parameterDeclaration(JavaInfo javaInfo, KeYJavaType kjt, String name)(Code)(Java Doc) public static ParameterDeclaration parameterDeclaration(JavaInfo javaInfo, KeYJavaType kjt, ProgramVariable var)(Code)(Java Doc) public static ParameterDeclaration parameterDeclaration(JavaInfo javaInfo, String type, String name)(Code)(Java Doc) public static Return returnClause(Expression e)(Code)(Java Doc) public static Throw throwClause(Expression e)(Code)(Java Doc)
|
|
|