Package org.jf.dexlib2.iface.reference

Examples of org.jf.dexlib2.iface.reference.TypeReference


        MethodAnalyzer methodAnalyzer = new MethodAnalyzer(classPath, method, inlineMethodResolver);

        Instruction deodexedInstruction = methodAnalyzer.getInstructions().get(0);
        Assert.assertEquals(Opcode.INVOKE_DIRECT, deodexedInstruction.getOpcode());

        MethodReference methodReference = (MethodReference)((Instruction35c)deodexedInstruction).getReference();
        Assert.assertEquals(method, methodReference);
    }
View Full Code Here


        }

        if (instruction instanceof ReferenceInstruction) {
            ReferenceInstruction referenceInstruction = (ReferenceInstruction)instruction;
            try {
                Reference reference = referenceInstruction.getReference();

                String classContext = null;
                if (methodDef.classDef.options.useImplicitReferences) {
                    classContext = methodDef.method.getDefiningClass();
                }
View Full Code Here

        @Override @Nullable public StringReference getNameReference() {
            return debugItem.getNameReference();
        }

        @Override @Nullable public TypeReference getTypeReference() {
            TypeReference typeReference = debugItem.getTypeReference();
            if (typeReference == null) {
                return null;
            }

            return RewriterUtils.rewriteTypeReference(rewriters.getTypeRewriter(), typeReference);
View Full Code Here

        setDestinationRegisterTypeAndPropagateChanges(analyzedInstruction, classType);
    }

    private void analyzeCheckCast(@Nonnull AnalyzedInstruction analyzedInstruction) {
        ReferenceInstruction instruction = (ReferenceInstruction)analyzedInstruction.instruction;
        TypeReference reference = (TypeReference)instruction.getReference();
        RegisterType castRegisterType = RegisterType.getRegisterType(classPath, reference);
        setDestinationRegisterTypeAndPropagateChanges(analyzedInstruction, castRegisterType);
    }
View Full Code Here

            //successors and nothing else needs to be done.
            assert destRegisterType.category == RegisterType.UNINIT_REF;
            return;
        }

        TypeReference typeReference = (TypeReference)instruction.getReference();

        RegisterType classType = RegisterType.getRegisterType(classPath, typeReference);

        setDestinationRegisterTypeAndPropagateChanges(analyzedInstruction,
                RegisterType.getRegisterType(RegisterType.UNINIT_REF, classType.type));
View Full Code Here

    }

    private void analyzeNewArray(@Nonnull AnalyzedInstruction analyzedInstruction) {
        ReferenceInstruction instruction = (ReferenceInstruction)analyzedInstruction.instruction;

        TypeReference type = (TypeReference)instruction.getReference();
        if (type.getType().charAt(0) != '[') {
            throw new AnalysisException("new-array used with non-array type");
        }

        RegisterType arrayType = RegisterType.getRegisterType(classPath, type);
View Full Code Here

    }

    @Override
    public boolean equals(@Nullable Object o) {
        if (o instanceof AnnotationEncodedValue) {
            AnnotationEncodedValue other = (AnnotationEncodedValue)o;
            return getType().equals(other.getType()) &&
                    getElements().equals(other.getElements());
        }
        return false;
    }
View Full Code Here

    @Override
    public int compareTo(@Nonnull EncodedValue o) {
        int res = Ints.compare(getValueType(), o.getValueType());
        if (res != 0) return res;
        AnnotationEncodedValue other = (AnnotationEncodedValue)o;
        res = getType().compareTo(other.getType());
        if (res != 0) return res;
        return CollectionUtils.compareAsSet(getElements(), other.getElements());
    }
View Full Code Here

        }
        if (signatureAnnotation == null) {
            return null;
        }

        ArrayEncodedValue signatureValues = null;
        for (AnnotationElement annotationElement: signatureAnnotation.getElements()) {
            if (annotationElement.getName().equals("value")) {
                EncodedValue encodedValue = annotationElement.getValue();
                if (encodedValue.getValueType() != ValueType.ARRAY) {
                    return null;
                }
                signatureValues = (ArrayEncodedValue)encodedValue;
                break;
            }
        }
        if (signatureValues == null) {
            return null;
        }

        StringBuilder sb = new StringBuilder();
        for (EncodedValue signatureValue: signatureValues.getValue()) {
            if (signatureValue.getValueType() != ValueType.STRING) {
                return null;
            }
            sb.append(((StringEncodedValue)signatureValue).getValue());
        }
View Full Code Here

        }

        ArrayEncodedValue signatureValues = null;
        for (AnnotationElement annotationElement: signatureAnnotation.getElements()) {
            if (annotationElement.getName().equals("value")) {
                EncodedValue encodedValue = annotationElement.getValue();
                if (encodedValue.getValueType() != ValueType.ARRAY) {
                    return null;
                }
                signatureValues = (ArrayEncodedValue)encodedValue;
                break;
            }
View Full Code Here

TOP

Related Classes of org.jf.dexlib2.iface.reference.TypeReference

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.