Package org.glassfish.hk2.api

Examples of org.glassfish.hk2.api.Metadata


                   
                });
            }
            final ClassLoader binderClassLoader = loader;
           
            defaultLoader = new HK2Loader() {
                @Override
                public Class<?> loadClass(String className) throws MultiException {
                    try {
                        return binderClassLoader.loadClass(className);
                    } catch (ClassNotFoundException e) {
View Full Code Here


        };
       
    }

    protected Class<?> loadClass(String type) throws ClassNotFoundException {
        HK2Loader loader = myself.getLoader();
       
        if (loader == null) {
            return getClass().getClassLoader().loadClass(type);
        }
       
        try {
            return loader.loadClass(type);
        }
        catch (MultiException me) {
            for (Throwable th : me.getErrors()) {
                if (th instanceof ClassNotFoundException) {
                    throw (ClassNotFoundException) th;
View Full Code Here

        }
       
        final String fContract = contract;
        final String fName = name;
       
        return new IndexedFilter() {

            @Override
            public boolean matches(Descriptor d) {
                if (qualifiers.isEmpty()) return true;
               
View Full Code Here

                return annotationClass.getDeclaredMethods();
            }
           
      });
      for (Method annotationMethod : annotationMethods) {
          Metadata metadataAnno = annotationMethod.getAnnotation(Metadata.class);
          if (metadataAnno == null) continue;
         
          String key = metadataAnno.value();
         
          Object addMe;
          try {
              addMe = ReflectionHelper.invoke(annotation, annotationMethod, new Object[0]);
          }
View Full Code Here

      }
     
      Class<? extends Annotation> annotationClass = annotation.annotationType();
      Method annotationMethods[] = annotationClass.getDeclaredMethods();
      for (Method annotationMethod : annotationMethods) {
          Metadata metadataAnno = annotationMethod.getAnnotation(Metadata.class);
          if (metadataAnno == null) continue;
         
          String key = metadataAnno.value();
         
          Object addMe;
          try {
              addMe = ReflectionHelper.invoke(annotation, annotationMethod, new Object[0]);
          }
View Full Code Here

                return annotationClass.getDeclaredMethods();
            }
           
      });
      for (Method annotationMethod : annotationMethods) {
          Metadata metadataAnno = annotationMethod.getAnnotation(Metadata.class);
          if (metadataAnno == null) continue;
         
          String key = metadataAnno.value();
         
          Object addMe;
          try {
              addMe = ReflectionHelper.invoke(annotation, annotationMethod, new Object[0], false);
          }
View Full Code Here

                return annotationClass.getDeclaredMethods();
            }
           
      });
      for (Method annotationMethod : annotationMethods) {
          Metadata metadataAnno = annotationMethod.getAnnotation(Metadata.class);
          if (metadataAnno == null) continue;
         
          String key = metadataAnno.value();
         
          Object addMe;
          try {
              addMe = ReflectionHelper.invoke(annotation, annotationMethod, new Object[0]);
          }
View Full Code Here

        private final Map<ExecutableElement, String> metadataProperties = new HashMap<ExecutableElement, String>();

        public Model(DeclaredType type) {
            this.type = type;
            for (ExecutableElement e : ElementFilter.methodsIn(type.asElement().getEnclosedElements())) {
                Metadata im = e.getAnnotation(Metadata.class);
                if(im==null)    continue;

                String name = im.value();
                if (name.length() == 0) name = ((TypeElement) type.asElement()).getQualifiedName().toString() + '.' + e.getSimpleName();

                metadataProperties.put(e,name);
            }
        }
View Full Code Here

          Object addMe;
          try {
              addMe = ReflectionHelper.invoke(annotation, annotationMethod, new Object[0]);
          }
          catch (Throwable th) {
              throw new MultiException(th);
          }
         
          if (addMe == null) continue;
         
          String addMeString;
View Full Code Here

                @Override
                public Class<?> loadClass(String className) throws MultiException {
                    try {
                        return binderClassLoader.loadClass(className);
                    } catch (ClassNotFoundException e) {
                        throw new MultiException(e);
                    }
                }
            };
        }
        return defaultLoader;
View Full Code Here

TOP

Related Classes of org.glassfish.hk2.api.Metadata

Copyright © 2018 www.massapicom. 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.