Java 类com.sun.codemodel.JExpressionImpl 实例源码

项目:jaxb2-rich-contract-plugin    文件:MetaPlugin.java   
private JExpression dotClass(final JType cl) {
    if (cl instanceof JClass) {
        return ((JClass)cl).dotclass();
    } else {
        return new JExpressionImpl() {
            public void generate(final JFormatter f) {
                f.g(cl).p(".class");
            }
        };
    }
}
项目:jaxb2-annotate-plugin    文件:AnnotatingSingleValueVisitor.java   
private JAnnotationUse param(final JType type) {
    if (type instanceof JClass) {
        return annotationUse.param(this.name, (JClass) type);
    } else {
        return annotationUse.param(this.name, new JExpressionImpl() {
            public void generate(JFormatter f) {
                f.g(type).p(".class");
            }
        });
    }
}
项目:jaxb2-annotate-plugin    文件:AnnotatingArrayValueVisitor.java   
private JAnnotationArrayMember param(final JType type) {
    if (type instanceof JClass) {
        return annotationArrayMember.param((JClass) type);
    } else {
        return annotationArrayMember.param(new JExpressionImpl() {
            public void generate(JFormatter f) {
                f.g(type).p(".class");
            }
        });
    }
}