Search in sources :

Example 1 with Options

use of com.sun.tools.xjc.Options in project midpoint by Evolveum.

the class ProcessorUtils method getGetterMethodName.

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);
    }
}
Also used : Options(com.sun.tools.xjc.Options) CPropertyInfo(com.sun.tools.xjc.model.CPropertyInfo)

Aggregations

Options (com.sun.tools.xjc.Options)1 CPropertyInfo (com.sun.tools.xjc.model.CPropertyInfo)1