Package org.jboss.reflect.spi

Examples of org.jboss.reflect.spi.ParameterInfo


      TypeInfoFactory factory = new IntrospectionTypeInfoFactory();

      ClassInfo simpleInterface = (ClassInfo) factory.getTypeInfo(SimpleInterface.class);
     
      TypeInfo boolType = PrimitiveInfo.BOOLEAN;
      ParameterInfo boolParam = new ParameterInfoImpl(null, "arg0", boolType);
      ParameterInfo[] boolParameters = new ParameterInfo[] { boolParam };

      TypeInfo booleanType = factory.getTypeInfo(Boolean.class);

      TypeInfo intType = PrimitiveInfo.INT;
      ParameterInfo intParam = new ParameterInfoImpl(null, "arg0", intType);
      ParameterInfo[] intParameters = new ParameterInfo[] { intParam };

      TypeInfo objectType = factory.getTypeInfo(Object.class);
      ParameterInfo objectParam = new ParameterInfoImpl(null, "arg0", objectType);
      ParameterInfo[] objectParameters = new ParameterInfo[] { objectParam };

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

      TypeInfo urlType = factory.getTypeInfo(URL.class);
      ParameterInfo urlParam = new ParameterInfoImpl(null, "arg1", urlType);
      ParameterInfo[] twoParameters = new ParameterInfo[] { stringParam, urlParam };

      TypeInfo voidType = PrimitiveInfo.VOID;
     
      HashSet result = new HashSet();
View Full Code Here


      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 };

      TypeInfo booleanType = factory.getTypeInfo(Boolean.class);

      TypeInfo intType = PrimitiveInfo.INT;
      ParameterInfo intParam = new ParameterInfoImpl(null, "arg0", intType);
      ParameterInfo[] intParameters = new ParameterInfo[] { intParam };

      TypeInfo objectType = factory.getTypeInfo(Object.class);
      ParameterInfo objectParam = new ParameterInfoImpl(null, "arg0", objectType);
      ParameterInfo[] objectParameters = new ParameterInfo[] { objectParam };

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

      TypeInfo urlType = factory.getTypeInfo(URL.class);
      ParameterInfo urlParam = new ParameterInfoImpl(null, "arg1", urlType);
      ParameterInfo[] twoParameters = new ParameterInfo[] { stringParam, urlParam };

      TypeInfo voidType = PrimitiveInfo.VOID;
     
      HashSet result = new HashSet();
View Full Code Here

      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 };
     
      TypeInfo boolType = PrimitiveInfo.BOOLEAN;
      ParameterInfo boolParam = new ParameterInfoImpl(null, "arg0", boolType);
      ParameterInfo[] boolParameters = new ParameterInfo[] { boolParam };

      TypeInfo intType = PrimitiveInfo.INT;
      ParameterInfo intParam = new ParameterInfoImpl(null, "arg0", intType);
      ParameterInfo[] intParameters = new ParameterInfo[] { intParam };

      TypeInfo objectType = factory.getTypeInfo(Object.class);
      ParameterInfo objectParam = new ParameterInfoImpl(null, "arg0", objectType);
      ParameterInfo[] objectParameters = new ParameterInfo[] { objectParam };

      HashSet result = new HashSet();
      result.add(new ConstructorInfoImpl(null, MethodInfo.NO_PARAMS, MethodInfo.NO_EXCEPTIONS, ModifierInfo.PUBLIC, simpleBean));
      result.add(new ConstructorInfoImpl(null, stringParameters, MethodInfo.NO_EXCEPTIONS, ModifierInfo.PUBLIC, simpleBean));
View Full Code Here

         typeInfos[i] = parameters[i].getParameterType();

      List<ParameterMetaData> pmds = new ArrayList<ParameterMetaData>();
      for(int i=0; i < parameters.length; i++)
      {
         ParameterInfo pi = parameters[i];
         Signature pis = createParametersSignature(
               pi.getName(),
               Configurator.getParameterTypes(log.isTraceEnabled(), typeInfos),
               i
         );
         MetaData mdr = retrieval.getComponentMetaData(pis);
         if (mdr != null)
         {
            ValueMetaData value = null;
            for(Annotation2ValueMetaDataAdapter adapter : adapters)
            {
               Annotation adapterAnnotation = mdr.getAnnotation(adapter.getAnnotation());
               if (adapterAnnotation != null)
               {
                  value = adapter.createValueMetaData(pi, adapterAnnotation, value);
               }
            }
            if (value == null)
               throw new IllegalArgumentException("No such Annotation2ValueMetaData adapter or no annotation on ParameterInfo: " + pi);
            if (trace)
               log.trace("Adding new ParameterMetaData for annotation: " + value);
            pmds.add(new AbstractParameterMetaData(pi.getParameterType().getName(), value));
         }
         else
         {
            throw new IllegalArgumentException("MetaData for parameter must exist: " + pi);
         }
View Full Code Here

      if (this == obj)
         return true;
      if (obj == null || obj instanceof ParameterInfo == false)
         return false;
     
      ParameterInfo other = (ParameterInfo) obj;
      return parameterType.equals(other.getParameterType());
   }
View Full Code Here

      if (this == obj)
         return true;
      if (obj == null || obj instanceof ParameterInfo == false)
         return false;
     
      ParameterInfo other = (ParameterInfo) obj;
      return parameterType.equals(other.getParameterType());
   }
View Full Code Here

      if( paramInfo != null )
      {
         for(int i = 0; i < paramInfo.length; i ++)
         {
            ParameterInfo pinfo = paramInfo[i];
            String pname = pinfo.getName();
            String pdescription = null;
            ManagementParameter mpa = null;
            // Look to ManagementParameter for info
            if (i < params.length)
            {
               mpa = params[i];
               if (mpa.name().equals(AnnotationDefaults.EMPTY_STRING) == false)
                  pname = mpa.name();
               if (mpa.description().equals(AnnotationDefaults.EMPTY_STRING) == false)
                  pdescription = mpa.description();
            }
            // Generate a name if there is none
            if (pname == null)
               pname = "arg#" + i;
            Fields fields =  new DefaultFieldsImpl(pname);
            if (pdescription != null)
               fields.setField(Fields.DESCRIPTION, pdescription);
            MetaType metaType = metaTypeFactory.resolve(pinfo.getParameterType());
            fields.setField(Fields.META_TYPE, metaType);
            // Delegate others (legal values, min/max etc.) to the constraints factory
            try
            {
               Class<? extends ManagedParameterConstraintsPopulatorFactory> factoryClass = opConstraintsFactor;
View Full Code Here

      // Process the op parameters
      if( paramInfo != null )
      {
         for(int i = 0; i < paramInfo.length; i ++)
         {
            ParameterInfo pinfo = paramInfo[i];
            String pname = pinfo.getName();
            String pdescription = null;
            ManagementParameter mpa = null;
            // Look to ManagementParameter for info
            if (i < params.length)
            {
               mpa = params[i];
               if (mpa.name().equals(AnnotationDefaults.EMPTY_STRING) == false)
                  pname = mpa.name();
               if (mpa.description().equals(AnnotationDefaults.EMPTY_STRING) == false)
                  pdescription = mpa.description();
            }
            // Generate a name if there is none
            if (pname == null)
               pname = "arg#" + i;
            Fields fields =  new DefaultFieldsImpl(pname);
            if (pdescription != null)
               fields.setField(Fields.DESCRIPTION, pdescription);
            MetaMapper[] paramMapper = {null};
            MetaType metaType = getMetaType(pinfo, pinfo.getParameterType(), metaData, true, paramMapper);
            fields.setField(Fields.META_TYPE, metaType);
            // Delegate others (legal values, min/max etc.) to the constraints factory
            try
            {
               Class<? extends ManagedParameterConstraintsPopulatorFactory> factoryClass = opConstraintsFactor;
View Full Code Here

      if( paramInfo != null )
      {
         for(int i = 0; i < paramInfo.length; i ++)
         {
            ParameterInfo pinfo = paramInfo[i];
            String pname = pinfo.getName();
            String pdescription = null;
            ManagementParameter mpa = null;
            // Look to ManagementParameter for info
            if (i < params.length)
            {
               mpa = params[i];
               if (mpa.name().equals(AnnotationDefaults.EMPTY_STRING) == false)
                  pname = mpa.name();
               if (mpa.description().equals(AnnotationDefaults.EMPTY_STRING) == false)
                  pdescription = mpa.description();
            }
            // Generate a name if there is none
            if (pname == null)
               pname = "arg#" + i;
            Fields fields =  new DefaultFieldsImpl(pname);
            if (pdescription != null)
               fields.setField(Fields.DESCRIPTION, pdescription);
            MetaType metaType = metaTypeFactory.resolve(pinfo.getParameterType());
            fields.setField(Fields.META_TYPE, metaType);
            // Delegate others (legal values, min/max etc.) to the constraints factory
            try
            {
               Class<? extends ManagedParameterConstraintsPopulatorFactory> factoryClass = opConstraintsFactor;
View Full Code Here

      if( paramInfo != null )
      {
         for(int i = 0; i < paramInfo.length; i ++)
         {
            ParameterInfo pinfo = paramInfo[i];
            String pname = pinfo.getName();
            String pdescription = null;
            ManagementParameter mpa = null;
            // Look to ManagementParameter for info
            if (i < params.length)
            {
               mpa = params[i];
               if (mpa.name().equals(AnnotationDefaults.EMPTY_STRING) == false)
                  pname = mpa.name();
               if (mpa.description().equals(AnnotationDefaults.EMPTY_STRING) == false)
                  pdescription = mpa.description();
            }
            // Generate a name if there is none
            if (pname == null)
               pname = "arg#" + i;
            Fields fields =  new DefaultFieldsImpl(pname);
            if (pdescription != null)
               fields.setField(Fields.DESCRIPTION, pdescription);
            MetaType metaType = metaTypeFactory.resolve(pinfo.getParameterType());
            fields.setField(Fields.META_TYPE, metaType);
            // Delegate others (legal values, min/max etc.) to the constraints factory
            try
            {
               Class<? extends ManagedParameterConstraintsPopulatorFactory> factoryClass = opConstraintsFactor;
View Full Code Here

TOP

Related Classes of org.jboss.reflect.spi.ParameterInfo

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.