Examples of ArrayValue


Examples of org.jboss.metatype.api.values.ArrayValue

         Serializable value = ((GenericValue)metaValue).getValue();
         return getValue(metaType, type, value);
      }
      else if (metaType.isArray())
      {
         ArrayValue arrayValue = (ArrayValue)metaValue;
         if (type == null)
            type = getTypeInfo(metaType, arrayValue.getValue());
         Object array = newArrayInstance(type, arrayValue.getLength());
         for (int i = 0; i < Array.getLength(array); i++)
         {
            Object element = arrayValue.getValue(i);
            if (element instanceof MetaValue)
               element = unwrapMetaValue((MetaValue)element, type, array);
            else if (element != null && element.getClass().isArray())
               element = unwrapArray(array, element);
View Full Code Here

Examples of org.jboss.metatype.api.values.ArrayValue

         {
            ArrayMetaType amt = (ArrayMetaType) propType;
            MetaType etype = amt.getElementType();
            if (etype == AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE)
            {
               ArrayValue avalue = (ArrayValue) prop.getValue();
               int length = avalue != null ? avalue.getLength() : 0;
               for(int n = 0; n < length; n ++)
                  processGenericValue((GenericValue) avalue.getValue(n), md);
            }
         }
         else if (propType.isCollection())
         {
            CollectionMetaType amt = (CollectionMetaType) propType;
            MetaType etype = amt.getElementType();
            if (etype == AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE)
            {
               CollectionValue avalue = (CollectionValue) prop.getValue();
               if(avalue != null)
               {
                  MetaValue[] elements = avalue.getElements();
                  for(int n = 0; n < avalue.getSize(); n ++)
                  {
                     GenericValue gv = (GenericValue) elements[n];
                     ManagedObject propMO = (ManagedObject) gv.getValue();
                     if(propMO != null)
                        processManagedObject(propMO, md);
View Full Code Here

Examples of org.jboss.metatype.api.values.ArrayValue

               String n = value.getValue().toString();
               matches = name.equals(n);
            }
            else if(type.isArray())
            {
               ArrayValue value = (ArrayValue) prop.getValue();
               for(Object n : value)
               {
                  if(name.equals(n.toString()))
                  {
                     matches = true;
View Full Code Here

Examples of org.jboss.reflect.spi.ArrayValue

            {
               getDependenciesForAnnotation(topLevelAnnotationName, (AnnotationValue)value, dependencies);
            }
            else if (value instanceof ArrayValue)
            {
               ArrayValue arrVal = (ArrayValue)value;
               TypeInfo type = ((ArrayInfo)arrVal.getType()).getComponentType();
               if (type instanceof AnnotationInfo)
               {
                  Value[] values = arrVal.getValues();
                  for (int j = 0 ; j < values.length ; j++)
                  {
                     getDependenciesForAnnotation(topLevelAnnotationName, (AnnotationValue)values[j], dependencies);
                  }
               }
View Full Code Here

Examples of org.msgpack.type.ArrayValue

    public int readArrayBegin() {
        Value v = getTop();
        if(!v.isArray()) {
            throw new MessageTypeException("Expected array but got not array value");
        }
        ArrayValue a = v.asArrayValue();
        stack.reduceCount();
        stack.pushArray(a.size());
        values[stack.getDepth()] = a.getElementArray();
        return a.size();
    }
View Full Code Here

Examples of org.msgpack.type.ArrayValue

            }

            stack.checkCount();
            v = getTop();
            if(v.isArray()) {
                ArrayValue a = v.asArrayValue();
                uc.writeArrayBegin(a.size());
                stack.reduceCount();
                stack.pushArray(a.size());
                values[stack.getDepth()] = a.getElementArray();

            } else if(v.isMap()) {
                MapValue m = v.asMapValue();
                uc.writeMapBegin(m.size());
                stack.reduceCount();
View Full Code Here

Examples of org.msgpack.type.ArrayValue

            }

            stack.checkCount();
            v = getTop();
            if(v.isArray()) {
                ArrayValue a = v.asArrayValue();
                stack.reduceCount();
                stack.pushArray(a.size());
                values[stack.getDepth()] = a.getElementArray();

            } else if(v.isMap()) {
                MapValue m = v.asMapValue();
                stack.reduceCount();
                stack.pushMap(m.size());
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.