Examples of AnnotationReader


Examples of com.cognifide.slice.core.internal.module.AnnotationReader

    List<Bundle> bundles = findBundles(bundleNameFilter);
    BundleClassesFinder classFinder = new BundleClassesFinder(bundles, basePackage);
    classFinder.addFilter(new ClassFilter() {
      @Override
      public boolean accepts(ClassReader classReader) {
        AnnotationReader annotationReader = new AnnotationReader();
        classReader.accept(annotationReader, ClassReader.SKIP_DEBUG);
        return annotationReader.isAnnotationPresent(SliceResource.class);
      }
    });
    return classFinder.getClasses();
  }
View Full Code Here

Examples of com.dragome.compiler.annotations.AnnotationReader

  public Parser(ClassUnit theFileUnit)
  {
    fileUnit= theFileUnit;
    fileUnit.annotations= null;

    AttributeReader r= new AnnotationReader(fileUnit);
    Attribute.addAttributeReader("RuntimeVisibleAnnotations", r);

    try
    {
      InputStream openInputStream= fileUnit.getClassFile().openInputStream();
View Full Code Here

Examples of com.sun.xml.bind.v2.model.annotation.AnnotationReader

/* 143 */         ann = null;
/*     */       }
/*     */     }
/* 146 */     if (ann != null) {
/* 147 */       Navigator nav = nav();
/* 148 */       AnnotationReader reader = reader();
/*     */
/* 150 */       Object defaultType = nav.ref(XmlElementRef.DEFAULT.class);
/* 151 */       Object je = nav.asDecl(JAXBElement.class);
/*     */
/* 153 */       for (XmlElementRef r : ann)
/*     */       {
/* 155 */         Object type = reader.getClassValue(r, "type");
/* 156 */         if (type.equals(defaultType)) type = nav.erasure(getIndividualType());
/*     */         boolean yield;
/*     */         boolean yield;
/* 157 */         if (nav.getBaseClass(type, je) != null)
/* 158 */           yield = addGenericElement(r);
View Full Code Here

Examples of org.apache.beehive.netui.pageflow.internal.AnnotationReader

                                + requestContext.getHttpRequest().getRequestURI() );
                }
            }
            else
            {
                AnnotationReader annReader = AnnotationReader.getAnnotationReader( backingClass, getServletContext() );
                   
                if ( annReader.getJpfAnnotation( backingClass, "FacesBacking" ) != null )
                {
                    if ( _log.isDebugEnabled() )
                    {
                        _log.debug( "Found backing class " + backingClassName + " for request "
                                    + requestContext.getHttpRequest().getRequestURI() + "; creating a new instance." );
View Full Code Here

Examples of org.codehaus.backport175.reader.bytecode.AnnotationReader

public class PerfTest extends TestCase {
    private static int INVOCATIONS = 100000;

    public void setUp() {
        // warm up
        final AnnotationReader reader = AnnotationReader.getReaderFor(test.reader.Target.METHOD.getDeclaringClass());
        reader.getAnnotation("test.TestAnnotations$VoidTyped", test.reader.Target.METHOD);
        Target5.METHOD.getAnnotation(Target5.Test.class);
    }
View Full Code Here

Examples of org.codehaus.backport175.reader.bytecode.AnnotationReader

    }

    public void testAccessAnnotation() {
        long startTime = System.currentTimeMillis();
        for (int i = 0; i < INVOCATIONS; i++) {
            final AnnotationReader reader = AnnotationReader.getReaderFor(test.reader.Target.METHOD.getDeclaringClass());
            Annotation annotation = reader.getAnnotation("test.TestAnnotations$VoidTyped", test.reader.Target.METHOD);
        }
        long time = System.currentTimeMillis() - startTime;
        double timePerInvocationNormalMethod = time / (double) INVOCATIONS;
        System.out.println("backport175 API : " + timePerInvocationNormalMethod);
    }
View Full Code Here

Examples of org.codehaus.backport175.reader.bytecode.AnnotationReader

     * @param annotation the annotation class
     * @param target      the java.lang.Class object to find the annotation on.
     * @return the annotation or null
     */
    public static Annotation getAnnotation(final Class annotation, final Class target) {
        final AnnotationReader reader = AnnotationReader.getReaderFor(target);
        return reader.getAnnotation(getAnnnotationName(annotation));
    }
View Full Code Here

Examples of org.codehaus.backport175.reader.bytecode.AnnotationReader

     * @param annotation the annotation class
     * @param method     the java.lang.refect.Method object to find the annotation on.
     * @return the annotation or null
     */
    public static Annotation getAnnotation(final Class annotation, final Method method) {
        final AnnotationReader reader = AnnotationReader.getReaderFor(method.getDeclaringClass());
        return reader.getAnnotation(getAnnnotationName(annotation), method);
    }
View Full Code Here

Examples of org.codehaus.backport175.reader.bytecode.AnnotationReader

     * @param annotationType the annotation type
     * @param constructor the annotated type
     * @return true if the annotation is present else false
     */
    public static boolean isAnnotationPresent(final Class annotationType, final Constructor constructor) {
        final AnnotationReader reader = AnnotationReader.getReaderFor(constructor.getDeclaringClass());
        return reader.isAnnotationPresent(annotationType, constructor);
    }
View Full Code Here

Examples of org.codehaus.backport175.reader.bytecode.AnnotationReader

     * @param annotation  the annotation class
     * @param constructor the java.lang.refect.Constructor object to find the annotation on.
     * @return the annotation or null
     */
    public static Annotation getAnnotation(final Class annotation, final Constructor constructor) {
        final AnnotationReader reader = AnnotationReader.getReaderFor(constructor.getDeclaringClass());
        return reader.getAnnotation(getAnnnotationName(annotation), constructor);
    }
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.