Home
last modified time | relevance | path

Searched refs:encodedValue (Results 1 – 25 of 46) sorted by relevance

12

/external/smali/dexlib2/src/main/java/org/jf/dexlib2/util/
DEncodedValueUtils.java44 public static boolean isDefaultValue(EncodedValue encodedValue) { in isDefaultValue() argument
45 switch (encodedValue.getValueType()) { in isDefaultValue()
47 return !((BooleanEncodedValue)encodedValue).getValue(); in isDefaultValue()
49 return ((ByteEncodedValue)encodedValue).getValue() == 0; in isDefaultValue()
51 return ((CharEncodedValue)encodedValue).getValue() == 0; in isDefaultValue()
53 return ((DoubleEncodedValue)encodedValue).getValue() == 0; in isDefaultValue()
55 return ((FloatEncodedValue)encodedValue).getValue() == 0; in isDefaultValue()
57 return ((IntEncodedValue)encodedValue).getValue() == 0; in isDefaultValue()
59 return ((LongEncodedValue)encodedValue).getValue() == 0; in isDefaultValue()
63 return ((ShortEncodedValue)encodedValue).getValue() == 0; in isDefaultValue()
[all …]
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/immutable/value/
DImmutableEncodedValueFactory.java46 public static ImmutableEncodedValue of(@Nonnull EncodedValue encodedValue) { in of() argument
47 switch (encodedValue.getValueType()) { in of()
49 return ImmutableByteEncodedValue.of((ByteEncodedValue)encodedValue); in of()
51 return ImmutableShortEncodedValue.of((ShortEncodedValue)encodedValue); in of()
53 return ImmutableCharEncodedValue.of((CharEncodedValue)encodedValue); in of()
55 return ImmutableIntEncodedValue.of((IntEncodedValue)encodedValue); in of()
57 return ImmutableLongEncodedValue.of((LongEncodedValue)encodedValue); in of()
59 return ImmutableFloatEncodedValue.of((FloatEncodedValue)encodedValue); in of()
61 return ImmutableDoubleEncodedValue.of((DoubleEncodedValue)encodedValue); in of()
63 return ImmutableStringEncodedValue.of((StringEncodedValue)encodedValue); in of()
[all …]
/external/smali/baksmali/src/main/java/org/jf/baksmali/Adaptors/EncodedValue/
DEncodedValueAdaptor.java44 public static void writeTo(@Nonnull IndentingWriter writer, @Nonnull EncodedValue encodedValue, in writeTo() argument
47 switch (encodedValue.getValueType()) { in writeTo()
49 …AnnotationEncodedValueAdaptor.writeTo(writer, (AnnotationEncodedValue)encodedValue, containingClas… in writeTo()
52 … ArrayEncodedValueAdaptor.writeTo(writer, (ArrayEncodedValue)encodedValue, containingClass); in writeTo()
55 BooleanRenderer.writeTo(writer, ((BooleanEncodedValue)encodedValue).getValue()); in writeTo()
58 ByteRenderer.writeTo(writer, ((ByteEncodedValue)encodedValue).getValue()); in writeTo()
61 CharRenderer.writeTo(writer, ((CharEncodedValue)encodedValue).getValue()); in writeTo()
64 DoubleRenderer.writeTo(writer, ((DoubleEncodedValue)encodedValue).getValue()); in writeTo()
67 EnumEncodedValue enumEncodedValue = (EnumEncodedValue)encodedValue; in writeTo()
76 FieldEncodedValue fieldEncodedValue = (FieldEncodedValue)encodedValue; in writeTo()
[all …]
DArrayEncodedValueAdaptor.java54 for (EncodedValue encodedValue: values) { in writeTo()
60 EncodedValueAdaptor.writeTo(writer, encodedValue, containingClass); in writeTo()
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/writer/pool/
DDexPool.java132 … @Nonnull EncodedValue encodedValue) throws IOException { in writeEncodedValue() argument
133 switch (encodedValue.getValueType()) { in writeEncodedValue()
135 … AnnotationEncodedValue annotationEncodedValue = (AnnotationEncodedValue)encodedValue; in writeEncodedValue()
139 ArrayEncodedValue arrayEncodedValue = (ArrayEncodedValue)encodedValue; in writeEncodedValue()
143 writer.writeBoolean(((BooleanEncodedValue)encodedValue).getValue()); in writeEncodedValue()
146 writer.writeByte(((ByteEncodedValue)encodedValue).getValue()); in writeEncodedValue()
149 writer.writeChar(((CharEncodedValue)encodedValue).getValue()); in writeEncodedValue()
152 writer.writeDouble(((DoubleEncodedValue)encodedValue).getValue()); in writeEncodedValue()
155 writer.writeEnum(((EnumEncodedValue)encodedValue).getValue()); in writeEncodedValue()
158 writer.writeField(((FieldEncodedValue)encodedValue).getValue()); in writeEncodedValue()
[all …]
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/writer/builder/
DDexBuilder.java237 … @Nonnull BuilderEncodedValue encodedValue) throws IOException {
238 switch (encodedValue.getValueType()) {
240 …BuilderAnnotationEncodedValue annotationEncodedValue = (BuilderAnnotationEncodedValue)encodedValue;
244 BuilderArrayEncodedValue arrayEncodedValue = (BuilderArrayEncodedValue)encodedValue;
248 writer.writeBoolean(((BooleanEncodedValue)encodedValue).getValue());
251 writer.writeByte(((ByteEncodedValue)encodedValue).getValue());
254 writer.writeChar(((CharEncodedValue)encodedValue).getValue());
257 writer.writeDouble(((DoubleEncodedValue)encodedValue).getValue());
260 writer.writeEnum(((BuilderEnumEncodedValue)encodedValue).getValue());
263 writer.writeField(((BuilderFieldEncodedValue)encodedValue).fieldReference);
[all …]
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/dexbacked/reference/
DDexBackedCallSiteReference.java76 EncodedValue encodedValue = getCallSiteIterator().getNextOrNull(); in getMethodHandle() local
77 assert encodedValue != null; in getMethodHandle()
78 if (encodedValue.getValueType() != ValueType.METHOD_HANDLE) { in getMethodHandle()
81 encodedValue.getValueType(), callSiteIndex); in getMethodHandle()
83 return ((MethodHandleEncodedValue) encodedValue).getValue(); in getMethodHandle()
95 EncodedValue encodedValue = iter.getNextOrNull(); in getMethodName() local
96 assert encodedValue != null; in getMethodName()
97 if (encodedValue.getValueType() != ValueType.STRING) { in getMethodName()
100 encodedValue.getValueType(), callSiteIndex); in getMethodName()
102 return ((StringEncodedValue) encodedValue).getValue(); in getMethodName()
[all …]
/external/smali/dexlib2/src/test/java/org/jf/dexlib2/writer/
DDexDataWriterTest.java208 … private void testWriteEncodedIntHelper(int integerValue, int... encodedValue) throws IOException { in testWriteEncodedIntHelper() argument
212 int[] arr = new int[encodedValue.length+1]; in testWriteEncodedIntHelper()
213 arr[0] = ValueType.INT | ((encodedValue.length-1) << 5); in testWriteEncodedIntHelper()
214 System.arraycopy(encodedValue, 0, arr, 1, encodedValue.length); in testWriteEncodedIntHelper()
242 …private void testWriteEncodedUintHelper(int integerValue, int... encodedValue) throws IOException { in testWriteEncodedUintHelper() argument
246 int[] arr = new int[encodedValue.length+1]; in testWriteEncodedUintHelper()
247 arr[0] = ValueType.METHOD | ((encodedValue.length-1) << 5); in testWriteEncodedUintHelper()
248 System.arraycopy(encodedValue, 0, arr, 1, encodedValue.length); in testWriteEncodedUintHelper()
280 … private void testWriteEncodedLongHelper(long longValue, int... encodedValue) throws IOException { in testWriteEncodedLongHelper() argument
284 int[] arr = new int[encodedValue.length+1]; in testWriteEncodedLongHelper()
[all …]
DDexWriterUleb128Test.java224 private void performTest(int integerValue, byte[] encodedValue) throws IOException { in performTest() argument
225 performTest(integerValue, encodedValue, encodedValue.length); in performTest()
228 …private void performTest(int integerValue, byte[] encodedValue, int encodedLength) throws IOExcept… in performTest() argument
238 …Assert.assertEquals(String.format("Values not equal at index %d", i), encodedValue[i], writtenData… in performTest()
DDexWriterSleb128Test.java227 private void performTest(int integerValue, byte[] encodedValue) throws IOException { in performTest() argument
228 performTest(integerValue, encodedValue, encodedValue.length); in performTest()
231 …private void performTest(int integerValue, byte[] encodedValue, int encodedLength) throws IOExcept… in performTest() argument
241 byte encoded = encodedValue[i]; in performTest()
/external/cbor-java/src/test/java/co/nstant/in/cbor/model/
DAbstractNumberTest.java22 private final byte[] encodedValue; field in AbstractNumberTest
24 public AbstractNumberTest(long value, byte[] encodedValue) { in AbstractNumberTest() argument
26 this.encodedValue = encodedValue; in AbstractNumberTest()
29 public AbstractNumberTest(BigInteger value, byte[] encodedValue) { in AbstractNumberTest() argument
31 this.encodedValue = encodedValue; in AbstractNumberTest()
40 Assert.assertArrayEquals(encodedValue, byteOutputStream.toByteArray()); in shouldEncode()
45 InputStream inputStream = new ByteArrayInputStream(encodedValue); in shouldDecode()
DAbstractByteStringTest.java19 private final byte[] encodedValue; field in AbstractByteStringTest
21 public AbstractByteStringTest(byte[] value, byte[] encodedValue) { in AbstractByteStringTest() argument
23 this.encodedValue = encodedValue; in AbstractByteStringTest()
31 Assert.assertArrayEquals(encodedValue, byteOutputStream.toByteArray()); in shouldEncode()
36 InputStream inputStream = new ByteArrayInputStream(encodedValue); in shouldDecode()
DAbstractSinglePrecisionFloatTest.java19 private final byte[] encodedValue; field in AbstractSinglePrecisionFloatTest
21 public AbstractSinglePrecisionFloatTest(float value, byte[] encodedValue) { in AbstractSinglePrecisionFloatTest() argument
23 this.encodedValue = encodedValue; in AbstractSinglePrecisionFloatTest()
31 Assert.assertArrayEquals(encodedValue, byteOutputStream.toByteArray()); in shouldEncode()
36 InputStream inputStream = new ByteArrayInputStream(encodedValue); in shouldDecode()
DAbstractHalfPrecisionFloatTest.java19 private final byte[] encodedValue; field in AbstractHalfPrecisionFloatTest
21 public AbstractHalfPrecisionFloatTest(float value, byte[] encodedValue) { in AbstractHalfPrecisionFloatTest() argument
23 this.encodedValue = encodedValue; in AbstractHalfPrecisionFloatTest()
31 Assert.assertArrayEquals(encodedValue, byteOutputStream.toByteArray()); in shouldEncode()
36 InputStream inputStream = new ByteArrayInputStream(encodedValue); in shouldDecode()
DAbstractStringTest.java19 private final byte[] encodedValue; field in AbstractStringTest
21 public AbstractStringTest(String value, byte[] encodedValue) { in AbstractStringTest() argument
23 this.encodedValue = encodedValue; in AbstractStringTest()
31 Assert.assertArrayEquals(encodedValue, byteOutputStream.toByteArray()); in shouldEncode()
36 InputStream inputStream = new ByteArrayInputStream(encodedValue); in shouldDecode()
DAbstractDoublePrecisionFloatTest.java21 private final byte[] encodedValue; field in AbstractDoublePrecisionFloatTest
23 public AbstractDoublePrecisionFloatTest(double value, byte[] encodedValue) { in AbstractDoublePrecisionFloatTest() argument
25 this.encodedValue = encodedValue; in AbstractDoublePrecisionFloatTest()
34 Assert.assertArrayEquals(encodedValue, byteOutputStream.toByteArray()); in shouldEncode()
39 InputStream inputStream = new ByteArrayInputStream(encodedValue); in shouldDecode()
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/rewriter/
DEncodedValueRewriter.java52 @Nonnull @Override public EncodedValue rewrite(@Nonnull EncodedValue encodedValue) { in rewrite() argument
53 switch (encodedValue.getValueType()) { in rewrite()
55 return new RewrittenTypeEncodedValue((TypeEncodedValue)encodedValue); in rewrite()
57 return new RewrittenFieldEncodedValue((FieldEncodedValue)encodedValue); in rewrite()
59 return new RewrittenMethodEncodedValue((MethodEncodedValue)encodedValue); in rewrite()
61 return new RewrittenEnumEncodedValue((EnumEncodedValue)encodedValue); in rewrite()
63 return new RewrittenArrayEncodedValue((ArrayEncodedValue)encodedValue); in rewrite()
65 return new RewrittenAnnotationEncodedValue((AnnotationEncodedValue)encodedValue); in rewrite()
67 return encodedValue; in rewrite()
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/base/
DBaseMethodParameter.java63 EncodedValue encodedValue = annotationElement.getValue(); in getSignature() local
64 if (encodedValue.getValueType() != ValueType.ARRAY) { in getSignature()
67 signatureValues = (ArrayEncodedValue)encodedValue; in getSignature()
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/writer/util/
DStaticInitializerUtil.java81 EncodedValue encodedValue = input.getInitialValue();
82 return encodedValue != null && !EncodedValueUtils.isDefaultValue(encodedValue);
/external/smali/smali/src/main/antlr/
DsmaliTreeWalker.g262 if (!AccessFlags.STATIC.isSet(accessFlags) && $field_initial_value.encodedValue != null) {
267 $field_initial_value.encodedValue, $annotations.annotations);
271 field_initial_value returns[EncodedValue encodedValue]
272 : ^(I_FIELD_INITIAL_VALUE literal) {$encodedValue = $literal.encodedValue;}
275 literal returns[ImmutableEncodedValue encodedValue]
276 : integer_literal { $encodedValue = new ImmutableIntEncodedValue($integer_literal.value); }
277 | long_literal { $encodedValue = new ImmutableLongEncodedValue($long_literal.value); }
278 | short_literal { $encodedValue = new ImmutableShortEncodedValue($short_literal.value); }
279 | byte_literal { $encodedValue = new ImmutableByteEncodedValue($byte_literal.value); }
280 | float_literal { $encodedValue = new ImmutableFloatEncodedValue($float_literal.value); }
[all …]
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/
DUrlComponentEncodingTester.java232 if (!component.encodedValue(url).equals(encoded)) { in testParseAlreadyEncoded()
255 String s = component.encodedValue(url); in testParseOriginal()
335 @Override public String encodedValue(HttpUrl url) { in encodedValue() method
349 @Override public String encodedValue(HttpUrl url) { in encodedValue() method
363 @Override public String encodedValue(HttpUrl url) { in encodedValue() method
379 @Override public String encodedValue(HttpUrl url) { in encodedValue() method
395 @Override public String encodedValue(HttpUrl url) { in encodedValue() method
410 public abstract String encodedValue(HttpUrl url); in encodedValue() method in UrlComponentEncodingTester.Component
/external/bouncycastle/bcpkix/src/main/java/org/bouncycastle/cert/
DX509v3CertificateBuilder.java233 byte[] encodedValue) in addExtension() argument
236 extGenerator.addExtension(oid, isCritical, encodedValue); in addExtension()
302 byte[] encodedValue) in replaceExtension() argument
305 …nerator = CertUtils.doReplaceExtension(extGenerator, new Extension(oid, isCritical, encodedValue)); in replaceExtension()
/external/smali/baksmali/src/main/java/org/jf/baksmali/Adaptors/
DReferenceFormatter.java57 for (EncodedValue encodedValue : callSite.getExtraArguments()) { in writeCallSiteReference()
59 EncodedValueAdaptor.writeTo(writer, encodedValue, null); in writeCallSiteReference()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/x509/extension/
DAuthorityKeyIdentifierStructure.java33 byte[] encodedValue) in AuthorityKeyIdentifierStructure() argument
36 super((ASN1Sequence)X509ExtensionUtil.fromExtensionValue(encodedValue)); in AuthorityKeyIdentifierStructure()
DX509ExtensionUtil.java33 byte[] encodedValue) in fromExtensionValue() argument
36 ASN1OctetString octs = (ASN1OctetString)ASN1Primitive.fromByteArray(encodedValue); in fromExtensionValue()

12