Package org.jboss.reflect.plugins

Examples of org.jboss.reflect.plugins.ClassInfoImpl$UnknownClassInfo


      // Everything is done lazily
   }

   public ClassInfo getSuperClass(Class clazz)
   {
      ClassInfoImpl superType = null;
      if (clazz.isInterface() == false)
      {
         Class superClazz = clazz.getSuperclass();
         if (superClazz != null)
            superType = (ClassInfoImpl) getTypeInfo(superClazz);
View Full Code Here


      return getTypeInfo(clazz);
   }
  
   protected Object instantiate(Class clazz)
   {
      ClassInfoImpl result;
      if (clazz.isInterface())
         result = new InterfaceInfoImpl(clazz.getName());
      else
         result = new ClassInfoImpl(clazz.getName());
      result.setType(clazz);
      result.setTypeInfoFactory(this);
      return result;
   }
View Full Code Here

   }

   public ClassInfoImpl getSuperClass(ClassInfoImpl classInfo)
   {
      Class clazz = classInfo.getType();
      ClassInfoImpl superType = null;
      if (clazz.isInterface() == false)
      {
         Class superClazz = clazz.getSuperclass();
         if (superClazz != null)
            superType = (ClassInfoImpl) getTypeInfo(superClazz);
View Full Code Here

      return getTypeInfo(clazz);
   }

   protected TypeInfo instantiate(Class<?> clazz)
   {
      ClassInfoImpl result;
      if (clazz.isArray())
      {
         TypeInfo componentType = getTypeInfo(clazz.getComponentType());
         result = new ArrayInfoImpl(componentType);
      }
      else if (clazz.isEnum())
      {
         EnumInfoImpl enumInfoImpl = new EnumInfoImpl(clazz.getName(), clazz.getModifiers());
         result = enumInfoImpl;
         Field[] fields = clazz.getFields();
         EnumConstantInfoImpl[] constants = new EnumConstantInfoImpl[fields.length];
         int i = 0;
         for (Field field : fields)
         {
            AnnotationValue[] annotations = getAnnotations(field);
            constants[i++] = new EnumConstantInfoImpl(field.getName(), enumInfoImpl, annotations);
         }
         enumInfoImpl.setEnumConstants(constants);
      }
      else if (clazz.isAnnotation())
      {
         result = new AnnotationInfoImpl(clazz.getName(), clazz.getModifiers());
         Method[] methods = getDeclaredMethods(clazz);
         AnnotationAttributeImpl[] atttributes = new AnnotationAttributeImpl[methods.length];
         for (int i = 0 ; i < methods.length ; i++)
         {
            atttributes[i] = new AnnotationAttributeImpl(methods[i].getName(), getTypeInfo(methods[i].getReturnType()), null);
         }
         ((AnnotationInfoImpl)result).setAttributes(atttributes);
      }
      else
      {
         result = new ReflectClassInfoImpl(clazz.getName());
      }
      result.setType(clazz);
      result.setTypeInfoFactory(this);
      result.setClassInfoHelper(this);
      result.setAnnotationHelper(this);
      return result;
   }
View Full Code Here

   @SuppressWarnings("deprecation")
   public ClassInfoImpl getSuperClass(ClassInfoImpl classInfo)
   {
      Class<?> clazz = classInfo.getType();
      ClassInfoImpl superType = null;
      if (clazz.isInterface() == false)
      {
         Class<?> superClazz = clazz.getSuperclass();
         if (superClazz != null)
            superType = (ClassInfoImpl) getTypeInfo(superClazz);
View Full Code Here

      return getTypeInfo(clazz);
   }

   protected TypeInfo instantiate(Class<?> clazz)
   {
      ClassInfoImpl result;
      if (clazz.isArray())
      {
         TypeInfo componentType = getTypeInfo(clazz.getComponentType());
         result = new ArrayInfoImpl(componentType);
      }
      else if (clazz.isEnum())
      {
         EnumInfoImpl enumInfoImpl = new EnumInfoImpl(clazz.getName(), clazz.getModifiers());
         result = enumInfoImpl;
         Field[] fields = clazz.getFields();
         EnumConstantInfoImpl[] constants = new EnumConstantInfoImpl[fields.length];
         int i = 0;
         for (Field field : fields)
         {
            AnnotationValue[] annotations = getAnnotations(field);
            constants[i++] = new EnumConstantInfoImpl(field.getName(), enumInfoImpl, annotations);
         }
         enumInfoImpl.setEnumConstants(constants);
      }
      else if (clazz.isAnnotation())
      {
         result = new AnnotationInfoImpl(clazz.getName(), clazz.getModifiers());
         Method[] methods = getDeclaredMethods(clazz);
         AnnotationAttributeImpl[] atttributes = new AnnotationAttributeImpl[methods.length];
         for (int i = 0 ; i < methods.length ; i++)
         {
            atttributes[i] = new AnnotationAttributeImpl(methods[i].getName(), getTypeInfo(methods[i].getReturnType()), null);
         }
         ((AnnotationInfoImpl)result).setAttributes(atttributes);
      }
      else
      {
         result = new ReflectClassInfoImpl(clazz.getName());
      }
      result.setType(clazz);
      result.setTypeInfoFactory(this);
      result.setClassInfoHelper(this);
      result.setAnnotationHelper(this);
      return result;
   }
View Full Code Here

   @SuppressWarnings("deprecation")
   public ClassInfoImpl getSuperClass(ClassInfoImpl classInfo)
   {
      Class<?> clazz = classInfo.getType();
      ClassInfoImpl superType = null;
      if (clazz.isInterface() == false)
      {
         Class<?> superClazz = clazz.getSuperclass();
         if (superClazz != null)
            superType = (ClassInfoImpl) getTypeInfo(superClazz);
View Full Code Here

      return getTypeInfo(clazz);
   }

   protected TypeInfo instantiate(Class<?> clazz)
   {
      ClassInfoImpl result;
      if (clazz.isArray())
      {
         TypeInfo componentType = getTypeInfo(clazz.getComponentType());
         result = new ArrayInfoImpl(componentType);
      }
      else if (clazz.isEnum())
      {
         EnumInfoImpl enumInfoImpl = new EnumInfoImpl(clazz.getName(), clazz.getModifiers());
         result = enumInfoImpl;
         Field[] fields = clazz.getFields();
         EnumConstantInfoImpl[] constants = new EnumConstantInfoImpl[fields.length];
         int i = 0;
         for (Field field : fields)
         {
            AnnotationValue[] annotations = getAnnotations(field);
            constants[i++] = new EnumConstantInfoImpl(field.getName(), enumInfoImpl, annotations);
         }
         enumInfoImpl.setEnumConstants(constants);
      }
      else if (clazz.isAnnotation())
      {
         result = new AnnotationInfoImpl(clazz.getName(), clazz.getModifiers());
         Method[] methods = getDeclaredMethods(clazz);
         AnnotationAttributeImpl[] atttributes = new AnnotationAttributeImpl[methods.length];
         for (int i = 0 ; i < methods.length ; i++)
         {
            atttributes[i] = new AnnotationAttributeImpl(methods[i].getName(), getTypeInfo(methods[i].getReturnType()), null);
         }
         ((AnnotationInfoImpl)result).setAttributes(atttributes);
      }
      else
      {
         result = new ReflectClassInfoImpl(clazz.getName());
      }
      result.setType(clazz);
      result.setTypeInfoFactory(this);
      result.setClassInfoHelper(this);
      result.setAnnotationHelper(this);
      return result;
   }
View Full Code Here

      testInterface(ClassInfoMethodParameterAnnotationInterface.class);
   }
  
   private void testInterface(Class<?> clazz) throws Throwable
   {
      ClassInfoImpl expected = new ClassInfoImpl(clazz.getName(), Modifier.PUBLIC);
      TypeInfo info = testBasics(clazz, expected);
     
      assertFalse(info.isArray());
      assertFalse(info.isEnum());
      assertFalse(info.isPrimitive());
View Full Code Here

      testClass(ClassInfoConstructorParameterAnnotationClass.class);
   }
  
   private void testClass(Class<?> clazz) throws Throwable
   {
      ClassInfoImpl expected = new ClassInfoImpl(clazz.getName(), Modifier.PUBLIC);
      TypeInfo info = testBasics(clazz, expected);
     
      assertFalse(info.isArray());
      assertFalse(info.isEnum());
      assertFalse(info.isPrimitive());
View Full Code Here

TOP

Related Classes of org.jboss.reflect.plugins.ClassInfoImpl$UnknownClassInfo

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.