コード例 #1
0
ファイル: DesignateReader.java プロジェクト: JSlain/bnd
 @Override
 public void annotation(Annotation annotation) throws Exception {
   try {
     java.lang.annotation.Annotation a = annotation.getAnnotation();
     if (a instanceof Designate) designate = annotation;
     else if (a instanceof Component) {
       doComponent(a);
     } else {
       XMLAttribute xmlAttr = finder.getXMLAttribute(annotation);
       if (xmlAttr != null) {
         doXmlAttribute(annotation, xmlAttr);
       }
     }
   } catch (Exception e) {
     e.printStackTrace();
     analyzer.error("During generation of a component on class %s, exception %s", clazz, e);
   }
 }
コード例 #2
0
ファイル: OCDReader.java プロジェクト: JSlain/bnd
 @Override
 public void annotation(Annotation annotation) throws Exception {
   try {
     java.lang.annotation.Annotation a = annotation.getAnnotation();
     if (a instanceof ObjectClassDefinition) doOCD((ObjectClassDefinition) a, annotation);
     else if (a instanceof AttributeDefinition) {
       current.ad = (AttributeDefinition) a;
       current.a = annotation;
     } else {
       XMLAttribute xmlAttr = finder.getXMLAttribute(annotation);
       if (xmlAttr != null) {
         doXmlAttribute(annotation, xmlAttr);
       }
     }
   } catch (Exception e) {
     e.printStackTrace();
     analyzer.error("During generation of a component on class %s, exception %s", clazz, e);
   }
 }