Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
View | Details | Raw Unified | Return to bug 168061
Collapse All | Expand All

(-)src/org/netbeans/api/java/source/GeneratorUtilities.java (-6 / +1 lines)
 Lines 408-419    Link Here 
408
        assert name.length() > 0;
408
        assert name.length() > 0;
409
        TypeMirror type = copy.getTypes().asMemberOf((DeclaredType)clazz.asType(), field);
409
        TypeMirror type = copy.getTypes().asMemberOf((DeclaredType)clazz.asType(), field);
410
        StringBuilder sb = getCapitalizedName(name);
410
        StringBuilder sb = getCapitalizedName(name);
411
        boolean isBooleanType = false;
411
        boolean isBooleanType = type.getKind() == TypeKind.BOOLEAN;
412
        if (type instanceof DeclaredType) {
413
            isBooleanType = copy.getElements().getTypeElement("java.lang.Boolean").equals(((DeclaredType) type).asElement()); // NOI18N
414
        } else {
415
            isBooleanType = type.getKind() == TypeKind.BOOLEAN;
416
        }
417
        sb.insert(0, isBooleanType ? "is" : "get"); //NOI18N
412
        sb.insert(0, isBooleanType ? "is" : "get"); //NOI18N
418
        BlockTree body = make.Block(Collections.singletonList(make.Return(make.Identifier(name))), false);
413
        BlockTree body = make.Block(Collections.singletonList(make.Return(make.Identifier(name))), false);
419
        return make.Method(make.Modifiers(mods), sb, make.Type(type), Collections.<TypeParameterTree>emptyList(), Collections.<VariableTree>emptyList(), Collections.<ExpressionTree>emptyList(), body, null);
414
        return make.Method(make.Modifiers(mods), sb, make.Type(type), Collections.<TypeParameterTree>emptyList(), Collections.<VariableTree>emptyList(), Collections.<ExpressionTree>emptyList(), body, null);

Return to bug 168061
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo