Package org.jf.dexlib2

Examples of org.jf.dexlib2.ReferenceType$InvalidReferenceTypeException


public class CustomMethodInlineTableTest {
    @Test
    public void testCustomMethodInlineTable_Virtual() {
        List<ImmutableInstruction> instructions = Lists.newArrayList(
                new ImmutableInstruction35mi(Opcode.EXECUTE_INLINE, 1, 0, 0, 0, 0, 0, 0),
                new ImmutableInstruction10x(Opcode.RETURN_VOID));

        ImmutableMethodImplementation methodImpl = new ImmutableMethodImplementation(1, instructions, null, null);
        ImmutableMethod method = new ImmutableMethod("Lblah;", "blah", null, "V", AccessFlags.PUBLIC.getValue(), null,
                methodImpl);
View Full Code Here


    @Test
    public void testCustomMethodInlineTable_Static() {
        List<ImmutableInstruction> instructions = Lists.newArrayList(
                new ImmutableInstruction35mi(Opcode.EXECUTE_INLINE, 1, 0, 0, 0, 0, 0, 0),
                new ImmutableInstruction10x(Opcode.RETURN_VOID));

        ImmutableMethodImplementation methodImpl = new ImmutableMethodImplementation(1, instructions, null, null);
        ImmutableMethod method = new ImmutableMethod("Lblah;", "blah", null, "V", AccessFlags.STATIC.getValue(), null,
                methodImpl);
View Full Code Here

    @Test
    public void testCustomMethodInlineTable_Direct() {
        List<ImmutableInstruction> instructions = Lists.newArrayList(
                new ImmutableInstruction35mi(Opcode.EXECUTE_INLINE, 1, 0, 0, 0, 0, 0, 0),
                new ImmutableInstruction10x(Opcode.RETURN_VOID));

        ImmutableMethodImplementation methodImpl = new ImmutableMethodImplementation(1, instructions, null, null);
        ImmutableMethod method = new ImmutableMethod("Lblah;", "blah", null, "V", AccessFlags.PRIVATE.getValue(), null,
                methodImpl);
View Full Code Here

public class CustomMethodInlineTableTest {
    @Test
    public void testCustomMethodInlineTable_Virtual() {
        List<ImmutableInstruction> instructions = Lists.newArrayList(
                new ImmutableInstruction35mi(Opcode.EXECUTE_INLINE, 1, 0, 0, 0, 0, 0, 0),
                new ImmutableInstruction10x(Opcode.RETURN_VOID));

        ImmutableMethodImplementation methodImpl = new ImmutableMethodImplementation(1, instructions, null, null);
        ImmutableMethod method = new ImmutableMethod("Lblah;", "blah", null, "V", AccessFlags.PUBLIC.getValue(), null,
                methodImpl);
View Full Code Here

    }

    @Test
    public void testCustomMethodInlineTable_Static() {
        List<ImmutableInstruction> instructions = Lists.newArrayList(
                new ImmutableInstruction35mi(Opcode.EXECUTE_INLINE, 1, 0, 0, 0, 0, 0, 0),
                new ImmutableInstruction10x(Opcode.RETURN_VOID));

        ImmutableMethodImplementation methodImpl = new ImmutableMethodImplementation(1, instructions, null, null);
        ImmutableMethod method = new ImmutableMethod("Lblah;", "blah", null, "V", AccessFlags.STATIC.getValue(), null,
                methodImpl);
View Full Code Here

    }

    @Test
    public void testCustomMethodInlineTable_Direct() {
        List<ImmutableInstruction> instructions = Lists.newArrayList(
                new ImmutableInstruction35mi(Opcode.EXECUTE_INLINE, 1, 0, 0, 0, 0, 0, 0),
                new ImmutableInstruction10x(Opcode.RETURN_VOID));

        ImmutableMethodImplementation methodImpl = new ImmutableMethodImplementation(1, instructions, null, null);
        ImmutableMethod method = new ImmutableMethod("Lblah;", "blah", null, "V", AccessFlags.PRIVATE.getValue(), null,
                methodImpl);
View Full Code Here

               
                // References
                List<Reference> modelReferenceList = modelSignedInfo.getReference();
                List<ReferenceType> apiReferenceList = apiSignedInfoType.getReference();
                for (Reference modelRef : modelReferenceList) {
                    ReferenceType apiRef = new ReferenceType();
                    String refUri = modelRef.getUri();
                    if (refUri == null) {
                        refUri = "";
                    }
                    apiRef.setURI(refUri);
                   
                    List<SignatureTransform> modelSigTransformList = modelRef.getTransforms();
                    TransformsType apiTransformsType = apiRef.getTransforms();
                    if (apiTransformsType == null) {
                        apiTransformsType = new TransformsType();
                        apiRef.setTransforms(apiTransformsType);
                    }
                    List<TransformType> apiTransformList = apiTransformsType.getTransform();
                    for (SignatureTransform modelSigTransform : modelSigTransformList) {
                        String modelTransformAlgStr = modelSigTransform.getTransform();
                        TransformType apiTransform = new TransformType();
                        apiTransform.setAlgorithm(modelTransformAlgStr);
                       
                        List<SignatureTransformDataValue> sigTransformSDVList = modelSigTransform.getSignatureTransformDataValue();
                        for (SignatureTransformDataValue sigTransformSDV : sigTransformSDVList) {
                            String type = sigTransformSDV.getContentType();
                            byte[] xformBytes = sigTransformSDV.getContentBytes();
                            Object transformObject = convertDataToTransformContent(type, xformBytes);
                            apiTransform.getContent().add(transformObject);
                        }
                       
                        apiTransformList.add(apiTransform);
                    }
                   
                    String digestMethodStr = modelRef.getDigestMethod();
                    byte[] digestValBytes = modelRef.getDigestValue();
                   
                    DigestMethodType apiDigestMethod = new DigestMethodType();
                    apiDigestMethod.setAlgorithm(digestMethodStr);
                    apiRef.setDigestMethod(apiDigestMethod);
                    apiRef.setDigestValue(digestValBytes);
                   
                    apiReferenceList.add(apiRef);
                }
               
                // Signature Value
View Full Code Here

            assertEquals(r1List.size(), r2List.size());
           
            Iterator<ReferenceType> rList1Itr = r1List.iterator();
            Iterator<ReferenceType> rList2Itr = r2List.iterator();
            while (rList1Itr.hasNext()) {
                    ReferenceType r1 = rList1Itr.next();
                    ReferenceType r2 = rList2Itr.next();
                    checkReference(r1, r2);
            }
        }
View Full Code Here

               
                // References
                List<Reference> modelReferenceList = modelSignedInfo.getReference();
                List<ReferenceType> apiReferenceList = apiSignedInfoType.getReference();
                for (Reference modelRef : modelReferenceList) {
                    ReferenceType apiRef = new ReferenceType();
                    String refUri = modelRef.getUri();
                    if (refUri == null) {
                        refUri = "";
                    }
                    apiRef.setURI(refUri);
                   
                    List<SignatureTransform> modelSigTransformList = modelRef.getTransforms();
                    TransformsType apiTransformsType = apiRef.getTransforms();
                    if (apiTransformsType == null) {
                        apiTransformsType = new TransformsType();
                        apiRef.setTransforms(apiTransformsType);
                    }
                    List<TransformType> apiTransformList = apiTransformsType.getTransform();
                    for (SignatureTransform modelSigTransform : modelSigTransformList) {
                        String modelTransformAlgStr = modelSigTransform.getTransform();
                        TransformType apiTransform = new TransformType();
                        apiTransform.setAlgorithm(modelTransformAlgStr);
                       
                        List<SignatureTransformDataValue> sigTransformSDVList = modelSigTransform.getSignatureTransformDataValue();
                        for (SignatureTransformDataValue sigTransformSDV : sigTransformSDVList) {
                            String type = sigTransformSDV.getContentType();
                            byte[] xformBytes = sigTransformSDV.getContentBytes();
                            Object transformObject = convertDataToTransformContent(type, xformBytes);
                            apiTransform.getContent().add(transformObject);
                        }
                       
                        apiTransformList.add(apiTransform);
                    }
                   
                    String digestMethodStr = modelRef.getDigestMethod();
                    byte[] digestValBytes = modelRef.getDigestValue();
                   
                    DigestMethodType apiDigestMethod = new DigestMethodType();
                    apiDigestMethod.setAlgorithm(digestMethodStr);
                    apiRef.setDigestMethod(apiDigestMethod);
                    apiRef.setDigestValue(digestValBytes);
                   
                    apiReferenceList.add(apiRef);
                }
               
                // Signature Value
View Full Code Here

               
                // References
                List<Reference> modelReferenceList = modelSignedInfo.getReference();
                List<ReferenceType> apiReferenceList = apiSignedInfoType.getReference();
                for (Reference modelRef : modelReferenceList) {
                    ReferenceType apiRef = new ReferenceType();
                    String refUri = modelRef.getUri();
                    if (refUri == null) {
                        refUri = "";
                    }
                    apiRef.setURI(refUri);
                   
                    List<SignatureTransform> modelSigTransformList = modelRef.getTransforms();
                    TransformsType apiTransformsType = apiRef.getTransforms();
                    if (apiTransformsType == null) {
                        apiTransformsType = new TransformsType();
                        apiRef.setTransforms(apiTransformsType);
                    }
                    List<TransformType> apiTransformList = apiTransformsType.getTransform();
                    for (SignatureTransform modelSigTransform : modelSigTransformList) {
                        String modelTransformAlgStr = modelSigTransform.getTransform();
                        TransformType apiTransform = new TransformType();
                        apiTransform.setAlgorithm(modelTransformAlgStr);
                       
                        List<SignatureTransformDataValue> sigTransformSDVList = modelSigTransform.getSignatureTransformDataValue();
                        for (SignatureTransformDataValue sigTransformSDV : sigTransformSDVList) {
                            String type = sigTransformSDV.getContentType();
                            byte[] xformBytes = sigTransformSDV.getContentBytes();
                            Object transformObject = convertDataToTransformContent(type, xformBytes);
                            apiTransform.getContent().add(transformObject);
                        }
                       
                        apiTransformList.add(apiTransform);
                    }
                   
                    String digestMethodStr = modelRef.getDigestMethod();
                    byte[] digestValBytes = modelRef.getDigestValue();
                   
                    DigestMethodType apiDigestMethod = new DigestMethodType();
                    apiDigestMethod.setAlgorithm(digestMethodStr);
                    apiRef.setDigestMethod(apiDigestMethod);
                    apiRef.setDigestValue(digestValBytes);
                   
                    apiReferenceList.add(apiRef);
                }
               
                // Signature Value
View Full Code Here

TOP

Related Classes of org.jf.dexlib2.ReferenceType$InvalidReferenceTypeException

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.