Examples of ArrayType


Examples of org.apache.bcel.generic.ArrayType

                }
                Type componentType = getType(signature.substring(index));
                if (componentType == null) {
                    return null;
                }
                return new ArrayType(componentType, index);

            } else if (signature.startsWith("*")) {
                return new GenericObjectType("*");

            } else if (signature.startsWith("+") || signature.startsWith("-")) {
View Full Code Here

Examples of org.apache.bcel.generic.ArrayType

            return IncompatibleTypes.SEEMS_OK;
        }

        // -~- Array Types: compare dimensions, then base type
        if (expectedCat == TypeCategory.ARRAY_TYPE && argCat == TypeCategory.ARRAY_TYPE) {
            ArrayType parmArray = (ArrayType) expectedType;
            ArrayType argArray = (ArrayType) actualType;

            if (parmArray.getDimensions() != argArray.getDimensions()) {
                return IncompatibleTypes.ARRAY_AND_NON_ARRAY;
            }

            return compareTypes(parmArray.getBasicType(), argArray.getBasicType(), ignoreBaseType);
        }
        // If one is an Array Type and the other is not, then they
        // are incompatible. (We already know neither is java.lang.Object)
        if (expectedCat == TypeCategory.ARRAY_TYPE ^ argCat == TypeCategory.ARRAY_TYPE) {
            return IncompatibleTypes.ARRAY_AND_NON_ARRAY;
View Full Code Here

Examples of org.apache.bcel.generic.ArrayType

        } else if (type.toString().equals("java.lang.Object")) {
            return "Type.OBJECT";
        } else if (type.toString().equals("java.lang.StringBuffer")) {
            return "Type.STRINGBUFFER";
        } else if (type instanceof ArrayType) {
            ArrayType at = (ArrayType) type;
            return "new ArrayType(" + printType(at.getBasicType()) + ", " + at.getDimensions()
                    + ")";
        } else {
            return "new ObjectType(\"" + Utility.signatureToString(signature, false) + "\")";
        }
    }
View Full Code Here

Examples of org.apache.bcel.generic.ArrayType

        typeComparable = ObjectTypeFactory.getInstance("java.lang.Comparable");

        typeList = ObjectTypeFactory.getInstance("java.util.List");
        typeCollection = ObjectTypeFactory.getInstance("java.util.Collection");
        typeHashSet = ObjectTypeFactory.getInstance("java.util.HashSet");
        typeArrayClonable = new ArrayType(typeClonable, 1);
        typeArrayComparable = new ArrayType(typeComparable, 1);
        typeArrayObject = new ArrayType(typeObject, 1);
        typeArrayInteger = new ArrayType(typeInteger, 1);
        typeArrayString = new ArrayType(typeString, 1);
        typeArrayArrayObject = new ArrayType(typeObject, 2);
        typeArrayArraySerializable = new ArrayType(typeSerializable, 2);
        typeArrayArrayString = new ArrayType(typeString, 2);
        typeArrayInt = new ArrayType(Type.INT, 1);
        typeArrayArrayInt = new ArrayType(Type.INT, 2);
        typeArrayArrayArrayInt = new ArrayType(Type.INT, 3);
        typeArrayChar = new ArrayType(Type.CHAR, 1);
        typeArrayArrayChar = new ArrayType(Type.CHAR, 2);
        typeArrayArrayArrayChar = new ArrayType(Type.CHAR, 3);
        typeDynamicString = new FindRefComparison.DynamicStringType();
        typeStaticString = new FindRefComparison.StaticStringType();
        typeParameterString = new FindRefComparison.ParameterStringType();
    }
View Full Code Here

Examples of org.apache.bcel.generic.ArrayType

    InstructionList il = new InstructionList();
    MethodGen       mg = new MethodGen(Constants.ACC_STATIC |
               Constants.ACC_PUBLIC,// access flags
               Type.VOID,              // return type
               new Type[] {            // argument types
           new ArrayType(Type.STRING, 1)
               },
               new String[] { "argv" }, // arg names
               "main", "HelloWorld",    // method, class
               il, cp);
    InstructionFactory factory = new InstructionFactory(cg);
View Full Code Here

Examples of org.apache.bcel.generic.ArrayType

    boolean main=false, ignore=false;
    String class_name = class_gen.getClassName();
    String fname      = name.getName();
    InstructionList il = new InstructionList();

    Type[] args = { new ArrayType(Type.STRING, 1) }; // default for `main'
    String[] arg_names = { "$argv" };

    if(fname.equals("main")) {
      method = new MethodGen(ACC_STATIC | ACC_PUBLIC,
           Type.VOID, args, arg_names,
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.ArrayType

                assert false : "unexpected type in annotation declaration: " + typeName;
            }
        }
        else if ( type instanceof ArrayType )
        {
            ArrayType arrayType = ( ArrayType ) type;
            TypeInstance componentType = arrayType.getComponentType();
           
            // We only handle an array of strings -- nothing else at this point.
            assert componentType instanceof DeclaredType : componentType.getClass().getName();
            assert ( ( DeclaredType ) componentType ).getDeclaration().getQualifiedName().equals( String.class.getName() )
                    : ( ( DeclaredType ) componentType ).getDeclaration().getQualifiedName();
View Full Code Here

Examples of org.apache.cxf.aegis.type.basic.ArrayType

                                           + info.getAegisTypeClass().getName(), e);
        }
    }

    protected AegisType createArrayType(TypeClassInfo info) {
        ArrayType type = new ArrayType();
        type.setTypeMapping(getTypeMapping());
        type.setTypeClass(info.getType());
        type.setSchemaType(createCollectionQName(info, type.getComponentType()));

        if (info.getMinOccurs() != -1) {
            type.setMinOccurs(info.getMinOccurs());
        } else {
            type.setMinOccurs(typeConfiguration.getDefaultMinOccurs());
        }
       
        if (info.getMaxOccurs() != -1) {
            type.setMaxOccurs(info.getMaxOccurs());
        }
       
        type.setFlat(info.isFlat());

        return type;
    }
View Full Code Here

Examples of org.apache.cxf.aegis.type.basic.ArrayType

                    param.setProperty("maxOccurs", Long.toString(info.getMaxOccurs()));
                }
               
                if ((type instanceof ArrayType) && !type.isWriteOuter()) {
                    param.setProperty("org.apache.cxf.aegis.outerType", type);
                    ArrayType aType = (ArrayType) type;
                    type = aType.getComponentType();
                    usingComponentType = true;
                }
            }

            if (info.getMappedName() != null) {
View Full Code Here

Examples of org.apache.cxf.aegis.type.basic.ArrayType

                    param.setProperty("maxOccurs", Long.toString(info.getMaxOccurs()));
                }

                if ((type instanceof ArrayType) && !type.isWriteOuter()) {
                    param.setProperty("org.apache.cxf.aegis.outerType", type);
                    ArrayType aType = (ArrayType) type;
                    type = aType.getComponentType();
                    usingComponentType = true;
                }
            }

            if (info.getMappedName() != null) {
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.