Package org.drools.asm

Examples of org.drools.asm.Type


            locals.add( typeInfo );
        }

        final Type[] types = Type.getArgumentTypes( methodDesc );
        for ( int i = 0; i < types.length; i++ ) {
            final Type t = types[i];
            StackMapType smt;
            switch ( t.getSort() ) {
                case Type.LONG :
                    smt = StackMapType.getTypeInfo( StackMapType.ITEM_Long );
                    break;
                case Type.DOUBLE :
                    smt = StackMapType.getTypeInfo( StackMapType.ITEM_Double );
                    break;

                case Type.FLOAT :
                    smt = StackMapType.getTypeInfo( StackMapType.ITEM_Float );
                    break;

                case Type.ARRAY :
                case Type.OBJECT :
                    smt = StackMapType.getTypeInfo( StackMapType.ITEM_Object );
                    smt.setObject( t.getDescriptor() ); // TODO verify name
                    break;

                default :
                    smt = StackMapType.getTypeInfo( StackMapType.ITEM_Integer );
                    break;
View Full Code Here


                           ShadowProxyFactory.DELEGATE_FIELD_NAME,
                           Type.getDescriptor( clazz ) );

        final Class[] parameters = method.getParameterTypes();
        for ( int i = 0, offset = 1; i < parameters.length; i++ ) {
            Type type = Type.getType( parameters[i] );
            mv.visitVarInsn( type.getOpcode( Opcodes.ILOAD ),
                             offset );
            offset += type.getSize();
        }
        if ( clazz.isInterface() ) {
            mv.visitMethodInsn( Opcodes.INVOKEINTERFACE,
                                Type.getInternalName( clazz ),
                                method.getName(),
View Full Code Here

            return;
        }
        if ( type == Type.VOID_TYPE ) {
            push( (String) null );
        } else {
            Type boxed = type;
            switch ( type.getSort() ) {
                case Type.BYTE :
                    boxed = GeneratorAdapter.BYTE_TYPE;
                    break;
                case Type.BOOLEAN :
View Full Code Here

     * replaced by its unboxed equivalent on top of the stack.
     *
     * @param type the type of the top stack value.
     */
    public void unbox(final Type type) {
        Type t = GeneratorAdapter.NUMBER_TYPE;
        Method sig = null;
        switch ( type.getSort() ) {
            case Type.VOID :
                return;
            case Type.CHAR :
View Full Code Here

                        this.constructor = false;
                    }
                    break;
            }

            final Type returnType = Type.getReturnType( desc );
            if ( returnType != Type.VOID_TYPE ) {
                pushValue( AdviceAdapter.OTHER );
                if ( returnType.getSize() == 2 ) {
                    pushValue( AdviceAdapter.OTHER );
                }
            }
        }
    }
View Full Code Here

     */
    public void loadArgs(final int arg,
                         final int count) {
        int index = getArgIndex( arg );
        for ( int i = 0; i < count; ++i ) {
            final Type t = this.argumentTypes[arg + i];
            loadInsn( t,
                      index );
            index += t.getSize();
        }
    }
View Full Code Here

TOP

Related Classes of org.drools.asm.Type

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.