Examples of AnnotationHandle


Examples of org.kite9.framework.model.AnnotationHandle

  public void test_1_14_AnnotationReference() throws Exception {
    Set<AnnotationHandle> refs = pm.getAnnotationReferences(convertName(Refs.Referenced.class));
    Method m = Refs.class.getMethod("referencer");
    MethodHandle mh = new MethodHandle(m);
    Reference ref = m.getAnnotation(Reference.class);
    AnnotationHandle expected = new AnnotationHandle(ref, mh, "refs");
    Assert.assertTrue(refs.contains(expected));
  }
View Full Code Here

Examples of org.kite9.framework.model.AnnotationHandle

        setFieldName(arg0);
        if (arg1 instanceof Type) {
          Type referenced = (Type) arg1;
          String name = referenced.getClassName();
          Type annotationClass = Type.getType(desc);
          AnnotationHandle ah = new AnnotationHandle(field, handle, MemberHandle
              .convertClassName(annotationClass.getClassName()));
          model.addAnnotationReference(MemberHandle.convertClassName(name), ah);
          addDependency(handle.getDeclaringClass(), model, referenced);
        }
      }
View Full Code Here

Examples of org.kite9.framework.model.AnnotationHandle

  pmi.addClassAnnotation(convertClassName(Reference.class), convertClassName(SomeClassD.class));
  pmi.addClassAnnotation(convertClassName(Useless.class), convertClassName(SomeClassA.class));
  pmi.addClassAnnotation(convertClassName(Useless.class), convertClassName(SomeClassE.class));
   
  Reference refAnn = SomeClassA.class.getAnnotation(Reference.class);
  pmi.addAnnotationReference(convertClassName(SomeReferencedClassB.class), new AnnotationHandle(refAnn, new ClassHandle(SomeClassA.class), "refs"));
  pmi.addAnnotationReference(convertClassName(SomeReferencedClassC.class), new AnnotationHandle(refAnn, new ClassHandle(SomeClassA.class), "refs"));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.