Search in sources :

Example 1 with JEnumConstantRef

use of com.helger.jcodemodel.JEnumConstantRef in project androidannotations by androidannotations.

the class AnnotationArrayParamExtractor method visitEnumConstant.

@Override
public Void visitEnumConstant(VariableElement c, JAnnotationArrayMember p) {
    AbstractJClass annotationClass = helper.typeMirrorToJClass(c.asType());
    JEnumConstantRef ref = JExpr.enumConstantRef(annotationClass, c.getSimpleName().toString());
    p.param(ref);
    return null;
}
Also used : AbstractJClass(com.helger.jcodemodel.AbstractJClass) JEnumConstantRef(com.helger.jcodemodel.JEnumConstantRef)

Example 2 with JEnumConstantRef

use of com.helger.jcodemodel.JEnumConstantRef in project androidannotations by androidannotations.

the class AnnotationParamExtractor method visitEnumConstant.

@Override
public Void visitEnumConstant(VariableElement c, String p) {
    AbstractJClass annotationClass = helper.typeMirrorToJClass(c.asType());
    JEnumConstantRef ref = JExpr.enumConstantRef(annotationClass, c.getSimpleName().toString());
    use.param(p, ref);
    return null;
}
Also used : AbstractJClass(com.helger.jcodemodel.AbstractJClass) JEnumConstantRef(com.helger.jcodemodel.JEnumConstantRef)

Aggregations

AbstractJClass (com.helger.jcodemodel.AbstractJClass)2 JEnumConstantRef (com.helger.jcodemodel.JEnumConstantRef)2