Java Code Examples for org.jf.dexlib2.iface.value.ArrayEncodedValue#getValue()

The following examples show how to use org.jf.dexlib2.iface.value.ArrayEncodedValue#getValue() . 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: ArrayEncodedValueAdaptor.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
public static void writeTo(IndentingWriter writer, ArrayEncodedValue arrayEncodedValue) throws IOException {
    writer.write('{');
    Collection<? extends EncodedValue> values = arrayEncodedValue.getValue();
    if (values.size() == 0) {
        writer.write('}');
        return;
    }

    writer.write('\n');
    writer.indent(4);
    boolean first = true;
    for (EncodedValue encodedValue: values) {
        if (!first) {
            writer.write(",\n");
        }
        first = false;

        EncodedValueAdaptor.writeTo(writer, encodedValue);
    }
    writer.deindent(4);
    writer.write("\n}");
}
 
Example 2
Source File: ArrayEncodedValueAdaptor.java    From atlas with Apache License 2.0 6 votes vote down vote up
public static void writeTo(@Nonnull IndentingWriter writer,
                           @Nonnull ArrayEncodedValue arrayEncodedValue,
                           @Nullable String containingClass) throws IOException {
    writer.write('{');
    Collection<? extends EncodedValue> values = arrayEncodedValue.getValue();
    if (values.size() == 0) {
        writer.write('}');
        return;
    }

    writer.write('\n');
    writer.indent(4);
    boolean first = true;
    for (EncodedValue encodedValue: values) {
        if (!first) {
            writer.write(",\n");
        }
        first = false;

        EncodedValueAdaptor.writeTo(writer, encodedValue, containingClass);
    }
    writer.deindent(4);
    writer.write("\n}");
}
 
Example 3
Source File: ArrayEncodedValueAdaptor.java    From zjdroid with Apache License 2.0 6 votes vote down vote up
public static void writeTo(IndentingWriter writer, ArrayEncodedValue arrayEncodedValue) throws IOException {
    writer.write('{');
    Collection<? extends EncodedValue> values = arrayEncodedValue.getValue();
    if (values.size() == 0) {
        writer.write('}');
        return;
    }

    writer.write('\n');
    writer.indent(4);
    boolean first = true;
    for (EncodedValue encodedValue: values) {
        if (!first) {
            writer.write(",\n");
        }
        first = false;

        EncodedValueAdaptor.writeTo(writer, encodedValue);
    }
    writer.deindent(4);
    writer.write("\n}");
}
 
Example 4
Source File: ArrayEncodedValueAdaptor.java    From HeyGirl with Apache License 2.0 6 votes vote down vote up
public static void writeTo(IndentingWriter writer, ArrayEncodedValue arrayEncodedValue) throws IOException {
    writer.write('{');
    Collection<? extends EncodedValue> values = arrayEncodedValue.getValue();
    if (values.size() == 0) {
        writer.write('}');
        return;
    }

    writer.write('\n');
    writer.indent(4);
    boolean first = true;
    for (EncodedValue encodedValue: values) {
        if (!first) {
            writer.write(",\n");
        }
        first = false;

        EncodedValueAdaptor.writeTo(writer, encodedValue);
    }
    writer.deindent(4);
    writer.write("\n}");
}
 
Example 5
Source File: ArrayEncodedValueAdaptor.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
public static void writeTo(IndentingWriter writer, ArrayEncodedValue arrayEncodedValue) throws IOException {
    writer.write('{');
    Collection<? extends EncodedValue> values = arrayEncodedValue.getValue();
    if (values.size() == 0) {
        writer.write('}');
        return;
    }

    writer.write('\n');
    writer.indent(4);
    boolean first = true;
    for (EncodedValue encodedValue: values) {
        if (!first) {
            writer.write(",\n");
        }
        first = false;

        EncodedValueAdaptor.writeTo(writer, encodedValue);
    }
    writer.deindent(4);
    writer.write("\n}");
}
 
Example 6
Source File: ImmutableArrayEncodedValue.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
public static ImmutableArrayEncodedValue of(@Nonnull ArrayEncodedValue arrayEncodedValue) {
    if (arrayEncodedValue instanceof ImmutableArrayEncodedValue) {
        return (ImmutableArrayEncodedValue)arrayEncodedValue;
    }
    return new ImmutableArrayEncodedValue(arrayEncodedValue.getValue());
}
 
Example 7
Source File: ImmutableArrayEncodedValue.java    From zjdroid with Apache License 2.0 4 votes vote down vote up
public static ImmutableArrayEncodedValue of(@Nonnull ArrayEncodedValue arrayEncodedValue) {
    if (arrayEncodedValue instanceof ImmutableArrayEncodedValue) {
        return (ImmutableArrayEncodedValue)arrayEncodedValue;
    }
    return new ImmutableArrayEncodedValue(arrayEncodedValue.getValue());
}
 
Example 8
Source File: ImmutableArrayEncodedValue.java    From HeyGirl with Apache License 2.0 4 votes vote down vote up
public static ImmutableArrayEncodedValue of(@Nonnull ArrayEncodedValue arrayEncodedValue) {
    if (arrayEncodedValue instanceof ImmutableArrayEncodedValue) {
        return (ImmutableArrayEncodedValue)arrayEncodedValue;
    }
    return new ImmutableArrayEncodedValue(arrayEncodedValue.getValue());
}
 
Example 9
Source File: ImmutableArrayEncodedValue.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
public static ImmutableArrayEncodedValue of(@Nonnull ArrayEncodedValue arrayEncodedValue) {
    if (arrayEncodedValue instanceof ImmutableArrayEncodedValue) {
        return (ImmutableArrayEncodedValue)arrayEncodedValue;
    }
    return new ImmutableArrayEncodedValue(arrayEncodedValue.getValue());
}