/** {@inheritDoc} */ @Override public int byteLength() { // Add 6 for the standard attribute header: the attribute name // index (2 bytes) and the attribute length (4 bytes). return 6 + smapString.getUtf8Size(); }
/** {@inheritDoc} */ @Override public int byteLength() { // Add 6 for the standard attribute header: the attribute name // index (2 bytes) and the attribute length (4 bytes). return 6 + smapString.getUtf8Size(); }
/** * Gets whether this instance has the name of a signature * polymorphic method. * * @return {@code true} iff the name suggest it could be * signature polymorphic method. */ public final boolean isSignaturePolymorphic() { final String INVOKE = "invoke"; final String INVOKE_EXACT = "invokeExact"; int nameLength = name.getUtf8Size(); if (nameLength == INVOKE.length()) { return name.getString().equals(INVOKE); } else if (nameLength == INVOKE_EXACT.length()) { return name.getString().equals(INVOKE_EXACT); } return false; } }
/** * Gets the write size for a given value. * * @param value {@code non-null;} the string value * @return {@code >= 2}; the write size, in bytes */ private static int writeSize(CstString value) { int utf16Size = value.getUtf16Size(); // The +1 is for the '\0' termination byte. return Leb128Utils.unsignedLeb128Size(utf16Size) + value.getUtf8Size() + 1; }
/** * Gets the write size for a given value. * * @param value {@code non-null;} the string value * @return {@code >= 2}; the write size, in bytes */ private static int writeSize(CstString value) { int utf16Size = value.getUtf16Size(); // The +1 is for the '\0' termination byte. return Leb128.unsignedLeb128Size(utf16Size) + value.getUtf8Size() + 1; }
/** * Gets the write size for a given value. * * @param value {@code non-null;} the string value * @return {@code >= 2}; the write size, in bytes */ private static int writeSize(CstString value) { int utf16Size = value.getUtf16Size(); // The +1 is for the '\0' termination byte. return Leb128Utils.unsignedLeb128Size(utf16Size) + value.getUtf8Size() + 1; }
/** * Gets the write size for a given value. * * @param value {@code non-null;} the string value * @return {@code >= 2}; the write size, in bytes */ private static int writeSize(CstString value) { int utf16Size = value.getUtf16Size(); // The +1 is for the '\0' termination byte. return Leb128.unsignedLeb128Size(utf16Size) + value.getUtf8Size() + 1; }
/** * Gets the write size for a given value. * * @param value {@code non-null;} the string value * @return {@code >= 2}; the write size, in bytes */ private static int writeSize(CstString value) { int utf16Size = value.getUtf16Size(); // The +1 is for the '\0' termination byte. return Leb128.unsignedLeb128Size(utf16Size) + value.getUtf8Size() + 1; }
/** * Gets the write size for a given value. * * @param value {@code non-null;} the string value * @return {@code >= 2}; the write size, in bytes */ private static int writeSize(CstString value) { int utf16Size = value.getUtf16Size(); // The +1 is for the '\0' termination byte. return Leb128.unsignedLeb128Size(utf16Size) + value.getUtf8Size() + 1; }
/** * Gets the write size for a given value. * * @param value {@code non-null;} the string value * @return {@code >= 2}; the write size, in bytes */ private static int writeSize(CstString value) { int utf16Size = value.getUtf16Size(); // The +1 is for the '\0' termination byte. return Leb128Utils.unsignedLeb128Size(utf16Size) + value.getUtf8Size() + 1; }