Examples of ClassInfo


Examples of org.jboss.reflect.spi.ClassInfo

   {
      TypeInfoFactory factory = new IntrospectionTypeInfoFactory();

      TypeInfo longType = PrimitiveInfo.LONG;
     
      ClassInfo simpleBean = (ClassInfo) factory.getTypeInfo(SimpleBean.class);
     
      TypeInfo objectType = factory.getTypeInfo(Object.class);
     
      HashSet result = new HashSet();
      result.add(new FieldInfoImpl(null, "PUBLIC_CONSTANT", objectType, ModifierInfo.PUBLIC_CONSTANT, simpleBean));
View Full Code Here

Examples of org.jboss.reflect.spi.ClassInfo

  
   protected Set getSimpleBeanMethods()
   {
      TypeInfoFactory factory = new IntrospectionTypeInfoFactory();

      ClassInfo simpleBean = (ClassInfo) factory.getTypeInfo(SimpleBean.class);
     
      TypeInfo boolType = PrimitiveInfo.BOOLEAN;
      ParameterInfo boolParam = new ParameterInfoImpl(null, "arg0", boolType);
      ParameterInfo[] boolParameters = new ParameterInfo[] { boolParam };
View Full Code Here

Examples of org.jboss.reflect.spi.ClassInfo

  
   protected Set getSimpleBeanConstructors()
   {
      TypeInfoFactory factory = new IntrospectionTypeInfoFactory();

      ClassInfo simpleBean = (ClassInfo) factory.getTypeInfo(SimpleBean.class);

      TypeInfo stringType = factory.getTypeInfo(String.class);
      ParameterInfo stringParam = new ParameterInfoImpl(null, "arg0", stringType);
      ParameterInfo[] stringParameters = new ParameterInfo[] { stringParam };
     
View Full Code Here

Examples of org.jboss.reflect.spi.ClassInfo

   }

   protected JoinpointFactory getJointpointFactory(Class clazz)
   {
      IntrospectionTypeInfoFactory typeFactory = new IntrospectionTypeInfoFactory();
      ClassInfo info = (ClassInfo) typeFactory.getTypeInfo(clazz);
      return new ReflectJoinpointFactory(info);
   }
View Full Code Here

Examples of org.jboss.reflect.spi.ClassInfo

   public BeanInfo getBeanInfo(ClassLoader cl, ClassAdapter classAdapter)
   {
      synchronized (cache)
      {
         ClassInfo classInfo = classAdapter.getClassInfo();
         String className = classInfo.getName();
         Map map = (Map) cache.get(cl);
         if (map != null)
         {
            BeanInfo info = (BeanInfo) map.get(className);
            if (info != null)
               return info;
         }

         if (classInfo.isInterface())
            throw new IllegalArgumentException(classInfo.getName() + " is an interface");

         Set constructors = getConstructors(classInfo);
         Set methods = getMethods(classInfo);
         Set properties = getProperties(methods);
         Set events = getEvents(classInfo);
View Full Code Here

Examples of org.jboss.reflect.spi.ClassInfo

         return result;
     
      if (typeInfo.isEnum())
         return generateEnum((EnumInfo) typeInfo);

      ClassInfo annotationType = isAnnotation(typeInfo);
      if (annotationType != null)
         return generateAnnotation(annotationType);
     
      if (typeInfo.isArray())
         return generateArray((ArrayInfo) typeInfo);
     
      if (typeInfo.isCollection())
         return generateCollection((ClassInfo) typeInfo);
     
      if (typeInfo.isMap())
      {
         // See if this is a Map<String,?> type
         ClassInfo classInfo = (ClassInfo) typeInfo;
         TypeInfo[] types = classInfo.getActualTypeArguments();
         if (types != null)
         {
            TypeInfo keyType = types[0];
            TypeInfo valueType = types[1];
            if(keyType.getName().equals(String.class.getName()))
View Full Code Here

Examples of org.jboss.reflect.spi.ClassInfo

      if (typeInfo.isAnnotation())
         return (ClassInfo) typeInfo;
     
      if (typeInfo instanceof ClassInfo)
      {
         ClassInfo classInfo = (ClassInfo) typeInfo;
         InterfaceInfo[] interfaces = classInfo.getInterfaces();
         if (interfaces != null)
         {
            for (int i = 0; i < interfaces.length; ++i)
            {
               if (interfaces[i].isAnnotation())
View Full Code Here

Examples of org.jboss.reflect.spi.ClassInfo

   public GenericMetaType isGeneric(TypeInfo typeInfo)
   {
      if (typeInfo instanceof ClassInfo == false)
         return null;
     
      ClassInfo classInfo = (ClassInfo) typeInfo;
      Generic generic = classInfo.getUnderlyingAnnotation(Generic.class);
      if (generic != null)
         return new GenericMetaType(typeInfo.getName(), typeInfo.getName());
      return null;
   }
View Full Code Here

Examples of org.jboss.reflect.spi.ClassInfo

      catch (Exception e)
      {
         throw new RuntimeException("Unable to determine component type for " + type, e);
      }
     
      ClassInfo classInfo = configuration.getClassInfo(value.getClass());
      if (classInfo.isArray())
      {
         // See if this is a primitive array
         ArrayInfo arrayInfo = ArrayInfo.class.cast(classInfo);
         TypeInfo compInfo = arrayInfo.getComponentType();
         while(compInfo instanceof ArrayInfo)
View Full Code Here

Examples of org.jboss.reflect.spi.ClassInfo

         cl = Thread.currentThread().getContextClassLoader();
     
      try
      {
         BeanInfo beanInfo = configuration.getBeanInfo(typeName, cl);
         ClassInfo classInfo = beanInfo.getClassInfo();
         Class<?> clazz = classInfo.getType();
         if (classInfo.isInterface())
         {
            // Handle map specially
            if (clazz.isAssignableFrom(Map.class))
               return unwrapCompositeMap(compositeValue);
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.