public JType unboxify() { JPrimitiveType pt = getPrimitiveType(); return pt==null ? (JType)this : pt; }
public JType unboxify() { JPrimitiveType pt = getPrimitiveType(); return pt==null ? (JType)this : pt; }
public JType unboxify() { JPrimitiveType pt = getPrimitiveType(); return pt==null ? (JType)this : pt; }
public boolean isBoxedType() { return clazz.getPrimitiveType()!=null; }
public JType unboxify() { JPrimitiveType pt = getPrimitiveType(); return pt==null ? (JType)this : pt; }
public JType unboxify() { JPrimitiveType pt = getPrimitiveType(); return pt==null ? (JType)this : pt; }
public boolean isBoxedType() { return clazz.getPrimitiveType()!=null; }
protected String getGetterName() { return (exposedType.boxify().getPrimitiveType() == codeModel.BOOLEAN ? "is" : "get") + prop.getName(true); }
protected String getGetterName() { return (exposedType.boxify().getPrimitiveType() == codeModel.BOOLEAN ? "is" : "get") + prop.getName(true); }
protected String getGetterMethodName() { return (type.boxify().getPrimitiveType() == codeModel.BOOLEAN ? "is" : "get") + propertyInfo.getPublicName(); }
protected JType getType(Aspect aspect) { return super.getType(aspect).boxify().getPrimitiveType(); }
protected JType getType(Aspect aspect) { return super.getType(aspect).boxify().getPrimitiveType(); }
protected String getGetterName() { return (getFieldType().boxify().getPrimitiveType() == codeModel.BOOLEAN ? "is" : "get") + prop.getName(true); }
/** * Gets the name of the getter method. * * <p> * This encapsulation is necessary because sometimes we use * {@code isXXXX} as the method name. */ protected String getGetterMethod() { return (getFieldType().boxify().getPrimitiveType()==codeModel.BOOLEAN?"is":"get")+prop.getName(true); }
protected String getGetterName() { return (getFieldType().boxify().getPrimitiveType() == codeModel.BOOLEAN ? "is" : "get") + prop.getName(true); }
protected String getGetterName() { return (getFieldType().boxify().getPrimitiveType() == codeModel.BOOLEAN ? "is" : "get") + prop.getName(true); }
protected String getGetterName() { return (getFieldType().boxify().getPrimitiveType() == codeModel.BOOLEAN ? "is" : "get") + prop.getName(true); }
/** * Gets the name of the getter method. * * <p> * This encapsulation is necessary because sometimes we use * {@code isXXXX} as the method name. */ protected String getGetterMethod() { return (getFieldType().boxify().getPrimitiveType()==codeModel.BOOLEAN?"is":"get")+prop.getName(true); }
public static String getGetterMethodName(ClassOutline classOutline, JFieldVar field) { CPropertyInfo prop = classOutline.target.getProperty(field.name()); JType type = field.type(); Options options = classOutline.parent().getModel().options; JCodeModel codeModel = classOutline.parent().getCodeModel(); if (options.enableIntrospection) { return ((type.isPrimitive() && type.boxify().getPrimitiveType() == codeModel.BOOLEAN) ? "is" : "get") + prop.getName(true); } else { return (type.boxify().getPrimitiveType() == codeModel.BOOLEAN ? "is" : "get") + prop.getName(true); } }
ConstField( ClassOutlineImpl outline, CPropertyInfo prop ) { super(outline,prop); // we only support value constraints for a single-value property. assert !prop.isCollection(); JPrimitiveType ptype = implType.boxify().getPrimitiveType(); // generate the constant JExpression defaultValue = null; if(prop.defaultValue!=null) defaultValue = prop.defaultValue.compute(outline.parent()); $ref = outline.ref.field(JMod.PUBLIC|JMod.STATIC|JMod.FINAL, ptype!=null?ptype:implType, prop.getName(true), defaultValue ); $ref.javadoc().append(prop.javadoc); annotate($ref); }