public void setType(ClassNode t) { field.setType(t); }
public FieldNode(String name, int modifiers, ClassNode type, ClassNode owner, Expression initialValueExpression) { this.name = name; this.modifiers = modifiers; this.type = type; if (this.type == ClassHelper.DYNAMIC_TYPE && initialValueExpression != null) this.setType(initialValueExpression.getType()); this.setType(type); this.originType = type; this.owner = owner; this.initialValueExpression = initialValueExpression; }
public void setType(ClassNode type) { super.setType(type); field.setType(type); }
private static void createSoft(FieldNode fieldNode, Expression initExpr) { final ClassNode type = fieldNode.getType(); fieldNode.setType(SOFT_REF); createSoftGetter(fieldNode, initExpr, type); createSoftSetter(fieldNode, type); }
static void visitField(ErrorCollecting xform, AnnotationNode node, FieldNode fieldNode) { final Expression soft = node.getMember("soft"); final Expression init = getInitExpr(xform, fieldNode); String backingFieldName = "$" + fieldNode.getName(); fieldNode.rename(backingFieldName); fieldNode.setModifiers(ACC_PRIVATE | (fieldNode.getModifiers() & (~(ACC_PUBLIC | ACC_PROTECTED)))); PropertyNode pNode = fieldNode.getDeclaringClass().getProperty(backingFieldName); if (pNode != null) { fieldNode.getDeclaringClass().getProperties().remove(pNode); } if (soft instanceof ConstantExpression && ((ConstantExpression) soft).getValue().equals(true)) { createSoft(fieldNode, init); } else { create(fieldNode, init); // @Lazy not meaningful with primitive so convert to wrapper if needed if (ClassHelper.isPrimitiveType(fieldNode.getType())) { fieldNode.setType(ClassHelper.getWrapper(fieldNode.getType())); } } }
public void setType(ClassNode t) { field.setType(t); }
public void setType(ClassNode t) { field.setType(t); }
public void setType(ClassNode t) { field.setType(t); }
public void setType(ClassNode t) { field.setType(t); }
public FieldNode(String name, int modifiers, ClassNode type, ClassNode owner, Expression initialValueExpression) { this.name = name; this.modifiers = modifiers; this.type = type; if (this.type==ClassHelper.DYNAMIC_TYPE && initialValueExpression!=null) this.setType(initialValueExpression.getType()); this.setType(type); this.owner = owner; this.initialValueExpression = initialValueExpression; }
public FieldNode(String name, int modifiers, ClassNode type, ClassNode owner, Expression initialValueExpression) { this.name = name; this.modifiers = modifiers; this.type = type; if (this.type == ClassHelper.DYNAMIC_TYPE && initialValueExpression != null) this.setType(initialValueExpression.getType()); this.setType(type); this.originType = type; this.owner = owner; this.initialValueExpression = initialValueExpression; }
public FieldNode(String name, int modifiers, ClassNode type, ClassNode owner, Expression initialValueExpression) { this.name = name; this.modifiers = modifiers; this.type = type; if (this.type==ClassHelper.DYNAMIC_TYPE && initialValueExpression!=null) this.setType(initialValueExpression.getType()); this.setType(type); this.owner = owner; this.initialValueExpression = initialValueExpression; }
public FieldNode(String name, int modifiers, ClassNode type, ClassNode owner, Expression initialValueExpression) { this.name = name; this.modifiers = modifiers; this.type = type; if (this.type==ClassHelper.DYNAMIC_TYPE && initialValueExpression!=null) this.setType(initialValueExpression.getType()); this.setType(type); this.owner = owner; this.initialValueExpression = initialValueExpression; }
public void setType(ClassNode type) { super.setType(type); field.setType(type); }
public void setType(ClassNode type) { super.setType(type); field.setType(type); }
public void setType(ClassNode type) { super.setType(type); field.setType(type); }
public void setType(ClassNode type) { super.setType(type); field.setType(type); }
private void createSoft(FieldNode fieldNode, Expression initExpr) { final ClassNode type = fieldNode.getType(); fieldNode.setType(SOFT_REF); createSoftGetter(fieldNode, initExpr, type); createSoftSetter(fieldNode, type); }
private void createSoft(FieldNode fieldNode, Expression initExpr) { ClassNode type = fieldNode.getType(); fieldNode.setType(SOFT_REF); createSoftGetter(fieldNode, initExpr, type); createSoftSetter(fieldNode, type); }
private void createSoft(FieldNode fieldNode, Expression initExpr) { ClassNode type = fieldNode.getType(); fieldNode.setType(SOFT_REF); createSoftGetter(fieldNode, initExpr, type); createSoftSetter(fieldNode, type); }