// // Satisfy IAnnoProcessor // @Override public CustomInfo process(final ASTNode astNode, final JstType jstType) { List<Annotation> annos = getAnnotations(astNode); if (annos.isEmpty()) { return null; } CustomInfo cInfo = new CustomInfo(); boolean forceFullyQualified = false; String annoName; for (Annotation anno : annos) { annoName = anno.getTypeName().toString(); if (annoName.equals(AExclude.class.getSimpleName())) { cInfo.setAttr(CustomAttr.EXCLUDED); } else if (annoName.equals(AJavaOnly.class.getSimpleName())) { cInfo.setAttr(CustomAttr.JAVA_ONLY); } else if (annoName.equals(AJsProxy.class.getSimpleName())) { cInfo.setAttr(CustomAttr.JS_PROXY); } else if (annoName.equals(AMappedToJS.class.getSimpleName())) { cInfo.setAttr(CustomAttr.MAPPED_TO_JS); process(astNode, jstType, anno, cInfo); } else if (annoName.equals(AMappedToVJO.class.getSimpleName())) { cInfo.setAttr(CustomAttr.MAPPED_TO_VJO); process(astNode, jstType, anno, cInfo); } else if (annoName.equals(ACustomizedAs.class.getSimpleName())) { MemberValuePair mvPair; for (Object pair : ((NormalAnnotation) anno).values()) { if (pair instanceof MemberValuePair) { mvPair = (MemberValuePair) pair; if (mvPair.getName().toString().equals("type")) { Type asAstType = ((TypeLiteral) mvPair.getValue()).getType(); IJstType asJstType = TranslateCtx.ctx() .getProvider() .getDataTypeTranslator() .processType(asAstType, jstType); cInfo.setAsType(asJstType); } else if (mvPair.getName().toString().equals("name")) { cInfo.setAsName(((StringLiteral) mvPair.getValue()).getLiteralValue()); } } } } else if (annoName.equals(ARename.class.getSimpleName())) { process(astNode, jstType, anno, cInfo); } else if (annoName.equals(AProperty.class.getSimpleName())) { if (astNode instanceof MethodDeclaration) { genMetaForPty((MethodDeclaration) astNode, jstType, anno); } } else if (annoName.equals(AForceFullyQualified.class.getSimpleName())) { if (astNode instanceof MethodDeclaration) { forceFullyQualified = TranslateHelper.isStatic(((MethodDeclaration) astNode).modifiers()); } } } if (forceFullyQualified) { cInfo.setForceFullyQualify(true); } return cInfo; }