Examples of MethodData


Examples of avian.Assembler.MethodData

    Assembler.writeClass
      (out, pool, ConstantPool.addClass(pool, name),
       ConstantPool.addClass(pool, "java/lang/Object"),
       new int[0], new MethodData[]
       { new MethodData(Assembler.ACC_STATIC | Assembler.ACC_PUBLIC,
                        ConstantPool.addUtf8(pool, "test"),
                        ConstantPool.addUtf8(pool, "()V"),
                        makeTestCode(pool)) });

    return new MyClassLoader(Subroutine.class.getClassLoader())
View Full Code Here

Examples of avian.Assembler.MethodData

        for (avian.VMMethod m: ivtable) {
          String spec = Classes.toString(m.name) + Classes.toString(m.spec);
          if (specs.contains(spec)) {
            continue;
          }
          methodTable.add(new MethodData
            (Modifier.PUBLIC,
             ConstantPool.addUtf8(pool, Classes.toString(m.name)),
             ConstantPool.addUtf8(pool, Classes.toString(m.spec)),
             makeInvokeCode(pool, name, m.spec, m.parameterCount,
                            m.parameterFootprint, methodTable.size())));
          refs.add(Classes.makeMethod(m));
        }
      }
    }

    methodTable.add(new MethodData
      (Modifier.PUBLIC,
       ConstantPool.addUtf8(pool, "<init>"),
       ConstantPool.addUtf8
       (pool, "(Ljava/lang/reflect/InvocationHandler;)V"),
       makeConstructorCode(pool)));
View Full Code Here

Examples of net.minecraftforge.srg2source.rangeapplier.MethodData

        // rename methods
        for (Entry<MethodData, MethodData> e : extraSrg.methodMap.entrySet())
        {
            String notchName = remapMethodName(e.getValue().name, methodMap);
            String notchSig = remapSig(e.getValue().sig, classMap);
            inSrg.methodMap.put(new MethodData(notchName, notchSig), e.getValue());
            excRemap.put(e.getKey().name, e.getValue().name);
        }
       
        return excRemap;
    }
View Full Code Here

Examples of net.minecraftforge.srg2source.rangeapplier.MethodData

     * @param methodMap  SRG -> notch names.
     * @return
     */
    private static String remapMethodName(String name, Map<MethodData, MethodData> methodMap)
    {
        MethodData key = null;
        for (MethodData data : methodMap.keySet())
        {
            if (data.name.equals(name))
            {
                key = data;
View Full Code Here

Examples of org.apache.directory.shared.kerberos.components.MethodData

           
            Asn1Decoder decoder = new Asn1Decoder();
            MethodDataContainer container = new MethodDataContainer();
            container.setStream( stream );
            decoder.decode( stream, container );
            MethodData padata = container.getMethodData();
            assertEquals( 2, padata.getPaDatas().length );
            assertEquals( PaDataType.PA_ENCTYPE_INFO2, padata.getPaDatas()[1].getPaDataType() );
            assertEquals( PaDataType.PA_ENC_TIMESTAMP, padata.getPaDatas()[0].getPaDataType() );
        }
    }
View Full Code Here

Examples of org.apache.directory.shared.kerberos.components.MethodData

            Asn1Decoder decoder = new Asn1Decoder();
            MethodDataContainer container = new MethodDataContainer();
            container.setStream( stream );
            decoder.decode( stream, container );
           
            MethodData methodData = container.getMethodData();
           
            for( PaData pd : methodData.getPaDatas() )
            {
                if( pd.getPaDataType() == PaDataType.PA_ENCTYPE_INFO2 )
                {
                    return parseEtpeInfo2( pd.getPaDataValue() );
                }
View Full Code Here

Examples of org.apache.directory.shared.kerberos.components.MethodData

        catch ( EncoderException ioe )
        {
            return null;
        }

        MethodData methodData = new MethodData();

        methodData.addPaData( new PaData( PaDataType.PA_ENC_TIMESTAMP, null ) );

        if ( !isNewEtype )
        {
            methodData.addPaData( new PaData( PaDataType.PA_ENCTYPE_INFO, encTypeInfo ) );
        }

        methodData.addPaData( new PaData( PaDataType.PA_ENCTYPE_INFO2, encTypeInfo2 ) );

        try
        {
            ByteBuffer buffer = ByteBuffer.allocate( methodData.computeLength() );
            return methodData.encode( buffer ).array();
        }
        catch ( EncoderException ee )
        {
            LOG_KRB.warn( "Failed to encode the etype information", ee );
            return null;
View Full Code Here

Examples of org.apache.directory.shared.kerberos.components.MethodData

        {
            fail( de.getMessage() );
        }

        // Check the decoded ETypeInfo
        MethodData methodData = ( ( MethodDataContainer ) methodDataContainer ).getMethodData();

        assertEquals( 2, methodData.getPaDatas().length );

        String[] expected = new String[]
            { "abcdef", "ghijkl" };
        int i = 0;

        for ( PaData paData : methodData.getPaDatas() )
        {
            assertEquals( PaDataType.PA_ENC_TIMESTAMP, paData.getPaDataType() );
            assertTrue( Arrays.equals( Strings.getBytesUtf8( expected[i] ), paData.getPaDataValue() ) );
            i++;
        }

        // Check the encoding
        ByteBuffer bb = ByteBuffer.allocate( methodData.computeLength() );

        try
        {
            bb = methodData.encode( bb );

            // Check the length
            assertEquals( 0x24, bb.limit() );

            String encodedPdu = Strings.dumpBytes( bb.array() );
View Full Code Here

Examples of org.apache.directory.shared.kerberos.components.MethodData

        catch ( EncoderException ioe )
        {
            return null;
        }

        MethodData methodData = new MethodData();

        methodData.addPaData( new PaData( PaDataType.PA_ENC_TIMESTAMP, null ) );

        if ( !isNewEtype )
        {
            methodData.addPaData( new PaData( PaDataType.PA_ENCTYPE_INFO, encTypeInfo ) );
        }

        methodData.addPaData( new PaData( PaDataType.PA_ENCTYPE_INFO2, encTypeInfo2 ) );

        try
        {
            ByteBuffer buffer = ByteBuffer.allocate( methodData.computeLength() );
            return methodData.encode( buffer ).array();
        }
        catch ( EncoderException ee )
        {
            LOG.warn( "Failed to encode the etype information", ee );
            return null;
View Full Code Here

Examples of org.apache.directory.shared.kerberos.components.MethodData

        {
            fail( de.getMessage() );
        }

        // Check the decoded ETypeInfo
        MethodData methodData = ( ( MethodDataContainer ) methodDataContainer ).getMethodData();

        assertEquals( 2, methodData.getPaDatas().length );

        String[] expected = new String[]
            { "abcdef", "ghijkl" };
        int i = 0;

        for ( PaData paData : methodData.getPaDatas() )
        {
            assertEquals( PaDataType.PA_ENC_TIMESTAMP, paData.getPaDataType() );
            assertTrue( Arrays.equals( Strings.getBytesUtf8( expected[i] ), paData.getPaDataValue() ) );
            i++;
        }

        // Check the encoding
        ByteBuffer bb = ByteBuffer.allocate( methodData.computeLength() );

        try
        {
            bb = methodData.encode( bb );

            // Check the length
            assertEquals( 0x24, bb.limit() );

            String encodedPdu = Strings.dumpBytes( bb.array() );
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.