Java Code Examples for org.jf.dexlib2.iface.reference.FieldReference#getDefiningClass()

The following examples show how to use org.jf.dexlib2.iface.reference.FieldReference#getDefiningClass() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ReferenceUtil.java    From atlas with Apache License 2.0 6 votes vote down vote up
public static void writeFieldDescriptor(Writer writer, FieldReference fieldReference,
                                        boolean implicitReference) throws IOException {
    if (!implicitReference) {
        String clazz = fieldReference.getDefiningClass();
        if (DexDiffInfo.getModifiedClasses(clazz) != null) {
            if (isStaticFiled(DexDiffInfo.getModifiedClasses(clazz), fieldReference)) {//静态变量要访问以前的
            } else {
                clazz = TypeGenUtil.newType(clazz);
            }
        }
        writer.write(clazz);
        writer.write("->");
    }
    writer.write(fieldReference.getName());
    writer.write(':');
    writer.write(fieldReference.getType());
}
 
Example 2
Source File: ImmutableFieldReference.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
@Nonnull
public static ImmutableFieldReference of(@Nonnull FieldReference fieldReference) {
    if (fieldReference instanceof ImmutableFieldReference) {
        return (ImmutableFieldReference)fieldReference;
    }
    return new ImmutableFieldReference(
            fieldReference.getDefiningClass(),
            fieldReference.getName(),
            fieldReference.getType());
}
 
Example 3
Source File: ImmutableFieldReference.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
@Nonnull
public static ImmutableFieldReference of(@Nonnull FieldReference fieldReference) {
    if (fieldReference instanceof ImmutableFieldReference) {
        return (ImmutableFieldReference)fieldReference;
    }
    return new ImmutableFieldReference(
            fieldReference.getDefiningClass(),
            fieldReference.getName(),
            fieldReference.getType());
}
 
Example 4
Source File: ImmutableFieldReference.java    From HeyGirl with Apache License 2.0 5 votes vote down vote up
@Nonnull
public static ImmutableFieldReference of(@Nonnull FieldReference fieldReference) {
    if (fieldReference instanceof ImmutableFieldReference) {
        return (ImmutableFieldReference)fieldReference;
    }
    return new ImmutableFieldReference(
            fieldReference.getDefiningClass(),
            fieldReference.getName(),
            fieldReference.getType());
}
 
Example 5
Source File: ImmutableFieldReference.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
@Nonnull
public static ImmutableFieldReference of(@Nonnull FieldReference fieldReference) {
    if (fieldReference instanceof ImmutableFieldReference) {
        return (ImmutableFieldReference)fieldReference;
    }
    return new ImmutableFieldReference(
            fieldReference.getDefiningClass(),
            fieldReference.getName(),
            fieldReference.getType());
}
 
Example 6
Source File: FieldPool.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
@Nonnull @Override public CharSequence getDefiningClass(@Nonnull FieldReference fieldReference) {
    return fieldReference.getDefiningClass();
}
 
Example 7
Source File: FieldPool.java    From zjdroid with Apache License 2.0 4 votes vote down vote up
@Nonnull @Override public CharSequence getDefiningClass(@Nonnull FieldReference fieldReference) {
    return fieldReference.getDefiningClass();
}
 
Example 8
Source File: FieldPool.java    From HeyGirl with Apache License 2.0 4 votes vote down vote up
@Nonnull @Override public CharSequence getDefiningClass(@Nonnull FieldReference fieldReference) {
    return fieldReference.getDefiningClass();
}
 
Example 9
Source File: FieldPool.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
@Nonnull @Override public CharSequence getDefiningClass(@Nonnull FieldReference fieldReference) {
    return fieldReference.getDefiningClass();
}