public AFieldDeclIR consField(String access, STypeIR type, String name, SExpIR initExp) { AFieldDeclIR stateField = new AFieldDeclIR(); stateField.setAccess(access); stateField.setType(type); stateField.setStatic(true); stateField.setFinal(false); stateField.setVolatile(false); stateField.setName(name); stateField.setInitial(initExp); return stateField; }
public AFieldDeclIR constructField(String access, String name, boolean isStatic, boolean isFinal, STypeIR type, SExpIR exp) { AFieldDeclIR field = new AFieldDeclIR(); field.setAccess(access); field.setName(name); field.setVolatile(false); field.setStatic(isStatic); field.setFinal(isFinal); field.setType(type); field.setInitial(exp); return field; }
/** * Creates a new tree field only constructor {@code AFieldDeclIR TAG=field} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param access_ the {@link String} node for the {@code access} child of this {@link AFieldDeclIR} node * @param static_ the {@link Boolean} node for the {@code static} child of this {@link AFieldDeclIR} node * @param volatile_ the {@link Boolean} node for the {@code volatile} child of this {@link AFieldDeclIR} node * @param final_ the {@link Boolean} node for the {@code final} child of this {@link AFieldDeclIR} node * @param type_ the {@link STypeIR} node for the {@code type} child of this {@link AFieldDeclIR} node * @param name_ the {@link String} node for the {@code name} child of this {@link AFieldDeclIR} node * @param initial_ the {@link SExpIR} node for the {@code initial} child of this {@link AFieldDeclIR} node */ public AFieldDeclIR(String access_, Boolean static_, Boolean volatile_, Boolean final_, STypeIR type_, String name_, SExpIR initial_) { super(null,null,null); this.setAccess(access_); this.setStatic(static_); this.setVolatile(volatile_); this.setFinal(final_); this.setType(type_); this.setName(name_); this.setInitial(initial_); }
/** * Creates a new complete constructor {@code AFieldDeclIR} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param access_ the {@link String} node for the {@code access} child of this {@link AFieldDeclIR} node * @param static_ the {@link Boolean} node for the {@code static} child of this {@link AFieldDeclIR} node * @param volatile_ the {@link Boolean} node for the {@code volatile} child of this {@link AFieldDeclIR} node * @param final_ the {@link Boolean} node for the {@code final} child of this {@link AFieldDeclIR} node * @param type_ the {@link STypeIR} node for the {@code type} child of this {@link AFieldDeclIR} node * @param name_ the {@link String} node for the {@code name} child of this {@link AFieldDeclIR} node * @param initial_ the {@link SExpIR} node for the {@code initial} child of this {@link AFieldDeclIR} node */ public AFieldDeclIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, String access_, Boolean static_, Boolean volatile_, Boolean final_, STypeIR type_, String name_, SExpIR initial_) { super(sourceNode_,tag_,metaData_); this.setAccess(access_); this.setStatic(static_); this.setVolatile(volatile_); this.setFinal(final_); this.setType(type_); this.setName(name_); this.setInitial(initial_); }
private AFieldDeclIR consHashcodeField() { AExternalTypeIR fieldType = new AExternalTypeIR(); fieldType.setName(IJavaConstants.INT); AFieldDeclIR field = new AFieldDeclIR(); field.setAccess(IJavaConstants.PRIVATE); field.setVolatile(false); field.setFinal(false); field.setStatic(true); field.setName(HASHCODE_FIELD); field.setType(fieldType); field.setInitial(consZero()); return field; }
private AFieldDeclIR consInstanceField(String name) { AClassTypeIR quoteClassType = new AClassTypeIR(); quoteClassType.setName(name); AFieldDeclIR field = new AFieldDeclIR(); field.setAccess(IJavaConstants.PRIVATE); field.setVolatile(false); field.setFinal(false); field.setStatic(true); field.setName(INSTANCE_FIELD); field.setType(quoteClassType); field.setInitial(info.getExpAssistant().consNullExp()); return field; }
fieldIR.setVolatile(true); sentinelfld.setType(sentType); sentinelfld.setAccess(IRConstants.PUBLIC); sentinelfld.setVolatile(true); sentinelfld.setStatic(false);