Package java.nio

Examples of java.nio.$Type$Buffer


            // now calculate the parameters
            int offset = 1;
            for (Class<?> aClass : delegatedMethod.getParameterTypes())
            {
                final Type type = Type.getType(aClass);
                mv.visitVarInsn(type.getOpcode(Opcodes.ILOAD), offset);
                offset += type.getSize();
            }

            // and finally invoke the target method on the provided Contextual Instance
            final Type declaringClass = Type.getType(delegatedMethod.getDeclaringClass());
            boolean interfaceMethod = Modifier.isInterface(delegatedMethod.getDeclaringClass().getModifiers());
            mv.visitMethodInsn(interfaceMethod ? Opcodes.INVOKEINTERFACE : Opcodes.INVOKEVIRTUAL,
                               declaringClass.getInternalName(), delegatedMethod.getName(), methodDescriptor);

            generateReturn(mv, delegatedMethod);

            mv.visitMaxs(-1, -1);


            mv.visitFieldInsn(Opcodes.GETFIELD, proxyClassFileName, FIELD_PROXIED_INSTANCE, Type.getDescriptor(classToProxy));

            int offset = 1;
            for (Class<?> aClass : delegatedMethod.getParameterTypes())
            {
                final Type type = Type.getType(aClass);
                mv.visitVarInsn(type.getOpcode(Opcodes.ILOAD), offset);
                offset += type.getSize();
            }

            final Type declaringClass = Type.getType(delegatedMethod.getDeclaringClass());
            mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, declaringClass.getInternalName(), delegatedMethod.getName(), methodDescriptor);

            generateReturn(mv, delegatedMethod);

            mv.visitMaxs(-1, -1);

            // now calculate the parameters
            int offset = 1;
            for (Class<?> aClass : delegatedMethod.getParameterTypes())
            {
                final Type type = Type.getType(aClass);
                mv.visitVarInsn(type.getOpcode(Opcodes.ILOAD), offset);
                offset += type.getSize();
            }

            // and finally invoke the target method on the provided Contextual Instance
            final Type declaringClass = Type.getType(delegatedMethod.getDeclaringClass());
            if (abstractMethod)
            {
                // generate an empty return block
            }
            else
            {
                // invoke the method on the super class;
                mv.visitMethodInsn(Opcodes.INVOKESPECIAL, declaringClass.getInternalName(), delegatedMethod.getName(), methodDescriptor);
            }

            generateReturn(mv, delegatedMethod);

            mv.visitMaxs(-1, -1);

    @Override
    public void visit(final String name, final Object value) {
        if ("value".equals(name)) {
            if (value instanceof Type) {
                final Type type = (Type) value;
                final int sort = type.getSort();
                switch (sort) {
                    case Type.OBJECT:
                        if (type.getClassName().equals(ValidationRunner.class.getName())) {
                            classInfos.add(current);
                        }
                        break;
                }
            } else {

    public String getRelatedName() {
        return relatedName;
    }

    public String getDescriptor() {
        Type collectionType = cmrStyle.getCollectionType();
        if (collectionType == null) {
            return type.getDescriptor();
        }
        return collectionType.getDescriptor();
    }

        }
        return collectionType.getDescriptor();
    }

    public String getGenericSignature() {
        Type collectionType = cmrStyle.getCollectionType();
        if (collectionType == null) {
            return null;
        }
        return createSignature(collectionType, type);
    }

        }
        return createSignature(collectionType, type);
    }

    public String getProxyDescriptor() {
        Type collectionType = cmrStyle.getCollectionType();
        if (collectionType == null) {
            return proxyType.getDescriptor();
        }
        return collectionType.getDescriptor();
    }

    public String getAccessorDescriptor() {
        return cmrStyle.getAccessorType().getDescriptor();
    }

    public String getAccessorGenericSignature() {
        Type collectionType = cmrStyle.getCollectionType();
        if (collectionType == null) {
            return null;
        }
        return createSignature(cmrStyle.getAccessorType(), type, proxyType);
    }

                throw new IllegalArgumentException("No such property " + cmpFieldName + " defined on bean class " + beanClassName);
            }
            // if this is an abstract method, then it's one we have to generate
            if (Modifier.isAbstract(getter.getModifiers())) {

                Type type = Type.getType(getter.getReturnType());
                CmpField cmpField = new CmpField(cmpFieldName, type, getter);
                this.cmpFields.put(cmpFieldName, cmpField);
            }
            else {
                // the getter is non-abstract.  We only allow this if the class that

     * @param mv       The method context we're initializing in.
     * @param cmrField The CMR field to process.
     */
    private void initCmrFields(MethodVisitor mv, CmrField cmrField) {
        // this.${cmrField.name} = new ${cmrField.initialValueType}();
        Type initialValueType = cmrField.getInitialValueType();
        if (initialValueType != null) {
            mv.visitVarInsn(ALOAD, 0);
            mv.visitTypeInsn(NEW, initialValueType.getInternalName());
            mv.visitInsn(DUP);
            mv.visitMethodInsn(INVOKESPECIAL, initialValueType.getInternalName(), "<init>", "()V");
            mv.visitFieldInsn(PUTFIELD, implClassName, cmrField.getName(), cmrField.getDescriptor());
        }

        // this.${cmrField.name}Cmr = new ${cmrField.accessorType}<${cmrField.type}, ${cmrField.proxyType}>(this,
        //         ${cmrField.name},

TOP

Related Classes of java.nio.$Type$Buffer

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.