Java Code Examples for jdk.internal.org.objectweb.asm.Opcodes#H_PUTFIELD

The following examples show how to use jdk.internal.org.objectweb.asm.Opcodes#H_PUTFIELD . 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: Textifier.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Appends the information about the given handle to {@link #buf buf}.
 *
 * @param h
 *            a handle, non null.
 */
protected void appendHandle(final Handle h) {
    int tag = h.getTag();
    buf.append("// handle kind 0x").append(Integer.toHexString(tag))
            .append(" : ");
    boolean isMethodHandle = false;
    switch (tag) {
    case Opcodes.H_GETFIELD:
        buf.append("GETFIELD");
        break;
    case Opcodes.H_GETSTATIC:
        buf.append("GETSTATIC");
        break;
    case Opcodes.H_PUTFIELD:
        buf.append("PUTFIELD");
        break;
    case Opcodes.H_PUTSTATIC:
        buf.append("PUTSTATIC");
        break;
    case Opcodes.H_INVOKEINTERFACE:
        buf.append("INVOKEINTERFACE");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESPECIAL:
        buf.append("INVOKESPECIAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESTATIC:
        buf.append("INVOKESTATIC");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKEVIRTUAL:
        buf.append("INVOKEVIRTUAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_NEWINVOKESPECIAL:
        buf.append("NEWINVOKESPECIAL");
        isMethodHandle = true;
        break;
    }
    buf.append('\n');
    buf.append(tab3);
    appendDescriptor(INTERNAL_NAME, h.getOwner());
    buf.append('.');
    buf.append(h.getName());
    if(!isMethodHandle){
        buf.append('(');
    }
    appendDescriptor(HANDLE_DESCRIPTOR, h.getDesc());
    if(!isMethodHandle){
        buf.append(')');
    }
}
 
Example 2
Source File: Textifier.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Appends the information about the given handle to {@link #buf buf}.
 *
 * @param h
 *            a handle, non null.
 */
protected void appendHandle(final Handle h) {
    int tag = h.getTag();
    buf.append("// handle kind 0x").append(Integer.toHexString(tag))
            .append(" : ");
    boolean isMethodHandle = false;
    switch (tag) {
    case Opcodes.H_GETFIELD:
        buf.append("GETFIELD");
        break;
    case Opcodes.H_GETSTATIC:
        buf.append("GETSTATIC");
        break;
    case Opcodes.H_PUTFIELD:
        buf.append("PUTFIELD");
        break;
    case Opcodes.H_PUTSTATIC:
        buf.append("PUTSTATIC");
        break;
    case Opcodes.H_INVOKEINTERFACE:
        buf.append("INVOKEINTERFACE");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESPECIAL:
        buf.append("INVOKESPECIAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESTATIC:
        buf.append("INVOKESTATIC");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKEVIRTUAL:
        buf.append("INVOKEVIRTUAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_NEWINVOKESPECIAL:
        buf.append("NEWINVOKESPECIAL");
        isMethodHandle = true;
        break;
    }
    buf.append('\n');
    buf.append(tab3);
    appendDescriptor(INTERNAL_NAME, h.getOwner());
    buf.append('.');
    buf.append(h.getName());
    if(!isMethodHandle){
        buf.append('(');
    }
    appendDescriptor(HANDLE_DESCRIPTOR, h.getDesc());
    if(!isMethodHandle){
        buf.append(')');
    }
}
 
Example 3
Source File: Textifier.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Appends the information about the given handle to {@link #buf buf}.
 *
 * @param h
 *            a handle, non null.
 */
protected void appendHandle(final Handle h) {
    int tag = h.getTag();
    buf.append("// handle kind 0x").append(Integer.toHexString(tag))
            .append(" : ");
    boolean isMethodHandle = false;
    switch (tag) {
    case Opcodes.H_GETFIELD:
        buf.append("GETFIELD");
        break;
    case Opcodes.H_GETSTATIC:
        buf.append("GETSTATIC");
        break;
    case Opcodes.H_PUTFIELD:
        buf.append("PUTFIELD");
        break;
    case Opcodes.H_PUTSTATIC:
        buf.append("PUTSTATIC");
        break;
    case Opcodes.H_INVOKEINTERFACE:
        buf.append("INVOKEINTERFACE");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESPECIAL:
        buf.append("INVOKESPECIAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESTATIC:
        buf.append("INVOKESTATIC");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKEVIRTUAL:
        buf.append("INVOKEVIRTUAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_NEWINVOKESPECIAL:
        buf.append("NEWINVOKESPECIAL");
        isMethodHandle = true;
        break;
    }
    buf.append('\n');
    buf.append(tab3);
    appendDescriptor(INTERNAL_NAME, h.getOwner());
    buf.append('.');
    buf.append(h.getName());
    if(!isMethodHandle){
        buf.append('(');
    }
    appendDescriptor(HANDLE_DESCRIPTOR, h.getDesc());
    if(!isMethodHandle){
        buf.append(')');
    }
}
 
Example 4
Source File: Textifier.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Appends the information about the given handle to {@link #buf buf}.
 *
 * @param h
 *            a handle, non null.
 */
protected void appendHandle(final Handle h) {
    int tag = h.getTag();
    buf.append("// handle kind 0x").append(Integer.toHexString(tag))
            .append(" : ");
    boolean isMethodHandle = false;
    switch (tag) {
    case Opcodes.H_GETFIELD:
        buf.append("GETFIELD");
        break;
    case Opcodes.H_GETSTATIC:
        buf.append("GETSTATIC");
        break;
    case Opcodes.H_PUTFIELD:
        buf.append("PUTFIELD");
        break;
    case Opcodes.H_PUTSTATIC:
        buf.append("PUTSTATIC");
        break;
    case Opcodes.H_INVOKEINTERFACE:
        buf.append("INVOKEINTERFACE");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESPECIAL:
        buf.append("INVOKESPECIAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESTATIC:
        buf.append("INVOKESTATIC");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKEVIRTUAL:
        buf.append("INVOKEVIRTUAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_NEWINVOKESPECIAL:
        buf.append("NEWINVOKESPECIAL");
        isMethodHandle = true;
        break;
    }
    buf.append('\n');
    buf.append(tab3);
    appendDescriptor(INTERNAL_NAME, h.getOwner());
    buf.append('.');
    buf.append(h.getName());
    if(!isMethodHandle){
        buf.append('(');
    }
    appendDescriptor(HANDLE_DESCRIPTOR, h.getDesc());
    if(!isMethodHandle){
        buf.append(')');
    }
}
 
Example 5
Source File: Textifier.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Appends the information about the given handle to {@link #buf buf}.
 *
 * @param h
 *            a handle, non null.
 */
protected void appendHandle(final Handle h) {
    int tag = h.getTag();
    buf.append("// handle kind 0x").append(Integer.toHexString(tag))
            .append(" : ");
    boolean isMethodHandle = false;
    switch (tag) {
    case Opcodes.H_GETFIELD:
        buf.append("GETFIELD");
        break;
    case Opcodes.H_GETSTATIC:
        buf.append("GETSTATIC");
        break;
    case Opcodes.H_PUTFIELD:
        buf.append("PUTFIELD");
        break;
    case Opcodes.H_PUTSTATIC:
        buf.append("PUTSTATIC");
        break;
    case Opcodes.H_INVOKEINTERFACE:
        buf.append("INVOKEINTERFACE");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESPECIAL:
        buf.append("INVOKESPECIAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESTATIC:
        buf.append("INVOKESTATIC");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKEVIRTUAL:
        buf.append("INVOKEVIRTUAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_NEWINVOKESPECIAL:
        buf.append("NEWINVOKESPECIAL");
        isMethodHandle = true;
        break;
    }
    buf.append('\n');
    buf.append(tab3);
    appendDescriptor(INTERNAL_NAME, h.getOwner());
    buf.append('.');
    buf.append(h.getName());
    if(!isMethodHandle){
        buf.append('(');
    }
    appendDescriptor(HANDLE_DESCRIPTOR, h.getDesc());
    if(!isMethodHandle){
        buf.append(')');
    }
}
 
Example 6
Source File: Textifier.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
/**
  * Appends a string representation of the given handle to {@link #stringBuilder}.
  *
  * @param handle a handle.
  */
protected void appendHandle(final Handle handle) {
    int tag = handle.getTag();
    stringBuilder.append("// handle kind 0x").append(Integer.toHexString(tag)).append(" : ");
    boolean isMethodHandle = false;
    switch (tag) {
        case Opcodes.H_GETFIELD:
            stringBuilder.append("GETFIELD");
            break;
        case Opcodes.H_GETSTATIC:
            stringBuilder.append("GETSTATIC");
            break;
        case Opcodes.H_PUTFIELD:
            stringBuilder.append("PUTFIELD");
            break;
        case Opcodes.H_PUTSTATIC:
            stringBuilder.append("PUTSTATIC");
            break;
        case Opcodes.H_INVOKEINTERFACE:
            stringBuilder.append("INVOKEINTERFACE");
            isMethodHandle = true;
            break;
        case Opcodes.H_INVOKESPECIAL:
            stringBuilder.append("INVOKESPECIAL");
            isMethodHandle = true;
            break;
        case Opcodes.H_INVOKESTATIC:
            stringBuilder.append("INVOKESTATIC");
            isMethodHandle = true;
            break;
        case Opcodes.H_INVOKEVIRTUAL:
            stringBuilder.append("INVOKEVIRTUAL");
            isMethodHandle = true;
            break;
        case Opcodes.H_NEWINVOKESPECIAL:
            stringBuilder.append("NEWINVOKESPECIAL");
            isMethodHandle = true;
            break;
        default:
            throw new IllegalArgumentException();
    }
    stringBuilder.append('\n');
    stringBuilder.append(tab3);
    appendDescriptor(INTERNAL_NAME, handle.getOwner());
    stringBuilder.append('.');
    stringBuilder.append(handle.getName());
    if (!isMethodHandle) {
        stringBuilder.append('(');
    }
    appendDescriptor(HANDLE_DESCRIPTOR, handle.getDesc());
    if (!isMethodHandle) {
        stringBuilder.append(')');
    }
    if (handle.isInterface()) {
        stringBuilder.append(" itf");
    }
}
 
Example 7
Source File: Textifier.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Appends the information about the given handle to {@link #buf buf}.
 *
 * @param h
 *            a handle, non null.
 */
protected void appendHandle(final Handle h) {
    int tag = h.getTag();
    buf.append("// handle kind 0x").append(Integer.toHexString(tag))
            .append(" : ");
    boolean isMethodHandle = false;
    switch (tag) {
    case Opcodes.H_GETFIELD:
        buf.append("GETFIELD");
        break;
    case Opcodes.H_GETSTATIC:
        buf.append("GETSTATIC");
        break;
    case Opcodes.H_PUTFIELD:
        buf.append("PUTFIELD");
        break;
    case Opcodes.H_PUTSTATIC:
        buf.append("PUTSTATIC");
        break;
    case Opcodes.H_INVOKEINTERFACE:
        buf.append("INVOKEINTERFACE");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESPECIAL:
        buf.append("INVOKESPECIAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESTATIC:
        buf.append("INVOKESTATIC");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKEVIRTUAL:
        buf.append("INVOKEVIRTUAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_NEWINVOKESPECIAL:
        buf.append("NEWINVOKESPECIAL");
        isMethodHandle = true;
        break;
    }
    buf.append('\n');
    buf.append(tab3);
    appendDescriptor(INTERNAL_NAME, h.getOwner());
    buf.append('.');
    buf.append(h.getName());
    if(!isMethodHandle){
        buf.append('(');
    }
    appendDescriptor(HANDLE_DESCRIPTOR, h.getDesc());
    if(!isMethodHandle){
        buf.append(')');
    }
}
 
Example 8
Source File: Textifier.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Appends the information about the given handle to {@link #buf buf}.
 *
 * @param h
 *            a handle, non null.
 */
protected void appendHandle(final Handle h) {
    int tag = h.getTag();
    buf.append("// handle kind 0x").append(Integer.toHexString(tag))
            .append(" : ");
    boolean isMethodHandle = false;
    switch (tag) {
    case Opcodes.H_GETFIELD:
        buf.append("GETFIELD");
        break;
    case Opcodes.H_GETSTATIC:
        buf.append("GETSTATIC");
        break;
    case Opcodes.H_PUTFIELD:
        buf.append("PUTFIELD");
        break;
    case Opcodes.H_PUTSTATIC:
        buf.append("PUTSTATIC");
        break;
    case Opcodes.H_INVOKEINTERFACE:
        buf.append("INVOKEINTERFACE");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESPECIAL:
        buf.append("INVOKESPECIAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESTATIC:
        buf.append("INVOKESTATIC");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKEVIRTUAL:
        buf.append("INVOKEVIRTUAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_NEWINVOKESPECIAL:
        buf.append("NEWINVOKESPECIAL");
        isMethodHandle = true;
        break;
    }
    buf.append('\n');
    buf.append(tab3);
    appendDescriptor(INTERNAL_NAME, h.getOwner());
    buf.append('.');
    buf.append(h.getName());
    if(!isMethodHandle){
        buf.append('(');
    }
    appendDescriptor(HANDLE_DESCRIPTOR, h.getDesc());
    if(!isMethodHandle){
        buf.append(')');
    }
}
 
Example 9
Source File: Textifier.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Appends the information about the given handle to {@link #buf buf}.
 *
 * @param h
 *            a handle, non null.
 */
protected void appendHandle(final Handle h) {
    int tag = h.getTag();
    buf.append("// handle kind 0x").append(Integer.toHexString(tag))
            .append(" : ");
    boolean isMethodHandle = false;
    switch (tag) {
    case Opcodes.H_GETFIELD:
        buf.append("GETFIELD");
        break;
    case Opcodes.H_GETSTATIC:
        buf.append("GETSTATIC");
        break;
    case Opcodes.H_PUTFIELD:
        buf.append("PUTFIELD");
        break;
    case Opcodes.H_PUTSTATIC:
        buf.append("PUTSTATIC");
        break;
    case Opcodes.H_INVOKEINTERFACE:
        buf.append("INVOKEINTERFACE");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESPECIAL:
        buf.append("INVOKESPECIAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESTATIC:
        buf.append("INVOKESTATIC");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKEVIRTUAL:
        buf.append("INVOKEVIRTUAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_NEWINVOKESPECIAL:
        buf.append("NEWINVOKESPECIAL");
        isMethodHandle = true;
        break;
    }
    buf.append('\n');
    buf.append(tab3);
    appendDescriptor(INTERNAL_NAME, h.getOwner());
    buf.append('.');
    buf.append(h.getName());
    if(!isMethodHandle){
        buf.append('(');
    }
    appendDescriptor(HANDLE_DESCRIPTOR, h.getDesc());
    if(!isMethodHandle){
        buf.append(')');
    }
}
 
Example 10
Source File: Textifier.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Appends the information about the given handle to {@link #buf buf}.
 *
 * @param h
 *            a handle, non null.
 */
protected void appendHandle(final Handle h) {
    buf.append('\n').append(tab3);
    int tag = h.getTag();
    buf.append("// handle kind 0x").append(Integer.toHexString(tag))
            .append(" : ");
    switch (tag) {
    case Opcodes.H_GETFIELD:
        buf.append("GETFIELD");
        break;
    case Opcodes.H_GETSTATIC:
        buf.append("GETSTATIC");
        break;
    case Opcodes.H_PUTFIELD:
        buf.append("PUTFIELD");
        break;
    case Opcodes.H_PUTSTATIC:
        buf.append("PUTSTATIC");
        break;
    case Opcodes.H_INVOKEINTERFACE:
        buf.append("INVOKEINTERFACE");
        break;
    case Opcodes.H_INVOKESPECIAL:
        buf.append("INVOKESPECIAL");
        break;
    case Opcodes.H_INVOKESTATIC:
        buf.append("INVOKESTATIC");
        break;
    case Opcodes.H_INVOKEVIRTUAL:
        buf.append("INVOKEVIRTUAL");
        break;
    case Opcodes.H_NEWINVOKESPECIAL:
        buf.append("NEWINVOKESPECIAL");
        break;
    }
    buf.append('\n');
    buf.append(tab3);
    appendDescriptor(INTERNAL_NAME, h.getOwner());
    buf.append('.');
    buf.append(h.getName());
    buf.append('(');
    appendDescriptor(HANDLE_DESCRIPTOR, h.getDesc());
    buf.append(')').append('\n');
}
 
Example 11
Source File: Textifier.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Appends the information about the given handle to {@link #buf buf}.
 *
 * @param h
 *            a handle, non null.
 */
protected void appendHandle(final Handle h) {
    buf.append('\n').append(tab3);
    int tag = h.getTag();
    buf.append("// handle kind 0x").append(Integer.toHexString(tag))
            .append(" : ");
    switch (tag) {
    case Opcodes.H_GETFIELD:
        buf.append("GETFIELD");
        break;
    case Opcodes.H_GETSTATIC:
        buf.append("GETSTATIC");
        break;
    case Opcodes.H_PUTFIELD:
        buf.append("PUTFIELD");
        break;
    case Opcodes.H_PUTSTATIC:
        buf.append("PUTSTATIC");
        break;
    case Opcodes.H_INVOKEINTERFACE:
        buf.append("INVOKEINTERFACE");
        break;
    case Opcodes.H_INVOKESPECIAL:
        buf.append("INVOKESPECIAL");
        break;
    case Opcodes.H_INVOKESTATIC:
        buf.append("INVOKESTATIC");
        break;
    case Opcodes.H_INVOKEVIRTUAL:
        buf.append("INVOKEVIRTUAL");
        break;
    case Opcodes.H_NEWINVOKESPECIAL:
        buf.append("NEWINVOKESPECIAL");
        break;
    }
    buf.append('\n');
    buf.append(tab3);
    appendDescriptor(INTERNAL_NAME, h.getOwner());
    buf.append('.');
    buf.append(h.getName());
    buf.append('(');
    appendDescriptor(HANDLE_DESCRIPTOR, h.getDesc());
    buf.append(')').append('\n');
}
 
Example 12
Source File: Textifier.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Appends the information about the given handle to {@link #buf buf}.
 *
 * @param h
 *            a handle, non null.
 */
protected void appendHandle(final Handle h) {
    int tag = h.getTag();
    buf.append("// handle kind 0x").append(Integer.toHexString(tag))
            .append(" : ");
    boolean isMethodHandle = false;
    switch (tag) {
    case Opcodes.H_GETFIELD:
        buf.append("GETFIELD");
        break;
    case Opcodes.H_GETSTATIC:
        buf.append("GETSTATIC");
        break;
    case Opcodes.H_PUTFIELD:
        buf.append("PUTFIELD");
        break;
    case Opcodes.H_PUTSTATIC:
        buf.append("PUTSTATIC");
        break;
    case Opcodes.H_INVOKEINTERFACE:
        buf.append("INVOKEINTERFACE");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESPECIAL:
        buf.append("INVOKESPECIAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESTATIC:
        buf.append("INVOKESTATIC");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKEVIRTUAL:
        buf.append("INVOKEVIRTUAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_NEWINVOKESPECIAL:
        buf.append("NEWINVOKESPECIAL");
        isMethodHandle = true;
        break;
    }
    buf.append('\n');
    buf.append(tab3);
    appendDescriptor(INTERNAL_NAME, h.getOwner());
    buf.append('.');
    buf.append(h.getName());
    if(!isMethodHandle){
        buf.append('(');
    }
    appendDescriptor(HANDLE_DESCRIPTOR, h.getDesc());
    if(!isMethodHandle){
        buf.append(')');
    }
}
 
Example 13
Source File: Textifier.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Appends the information about the given handle to {@link #buf buf}.
 *
 * @param h
 *            a handle, non null.
 */
protected void appendHandle(final Handle h) {
    int tag = h.getTag();
    buf.append("// handle kind 0x").append(Integer.toHexString(tag))
            .append(" : ");
    boolean isMethodHandle = false;
    switch (tag) {
    case Opcodes.H_GETFIELD:
        buf.append("GETFIELD");
        break;
    case Opcodes.H_GETSTATIC:
        buf.append("GETSTATIC");
        break;
    case Opcodes.H_PUTFIELD:
        buf.append("PUTFIELD");
        break;
    case Opcodes.H_PUTSTATIC:
        buf.append("PUTSTATIC");
        break;
    case Opcodes.H_INVOKEINTERFACE:
        buf.append("INVOKEINTERFACE");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESPECIAL:
        buf.append("INVOKESPECIAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESTATIC:
        buf.append("INVOKESTATIC");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKEVIRTUAL:
        buf.append("INVOKEVIRTUAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_NEWINVOKESPECIAL:
        buf.append("NEWINVOKESPECIAL");
        isMethodHandle = true;
        break;
    }
    buf.append('\n');
    buf.append(tab3);
    appendDescriptor(INTERNAL_NAME, h.getOwner());
    buf.append('.');
    buf.append(h.getName());
    if(!isMethodHandle){
        buf.append('(');
    }
    appendDescriptor(HANDLE_DESCRIPTOR, h.getDesc());
    if(!isMethodHandle){
        buf.append(')');
    }
}
 
Example 14
Source File: Textifier.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Appends the information about the given handle to {@link #buf buf}.
 *
 * @param h
 *            a handle, non null.
 */
protected void appendHandle(final Handle h) {
    int tag = h.getTag();
    buf.append("// handle kind 0x").append(Integer.toHexString(tag))
            .append(" : ");
    boolean isMethodHandle = false;
    switch (tag) {
    case Opcodes.H_GETFIELD:
        buf.append("GETFIELD");
        break;
    case Opcodes.H_GETSTATIC:
        buf.append("GETSTATIC");
        break;
    case Opcodes.H_PUTFIELD:
        buf.append("PUTFIELD");
        break;
    case Opcodes.H_PUTSTATIC:
        buf.append("PUTSTATIC");
        break;
    case Opcodes.H_INVOKEINTERFACE:
        buf.append("INVOKEINTERFACE");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESPECIAL:
        buf.append("INVOKESPECIAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKESTATIC:
        buf.append("INVOKESTATIC");
        isMethodHandle = true;
        break;
    case Opcodes.H_INVOKEVIRTUAL:
        buf.append("INVOKEVIRTUAL");
        isMethodHandle = true;
        break;
    case Opcodes.H_NEWINVOKESPECIAL:
        buf.append("NEWINVOKESPECIAL");
        isMethodHandle = true;
        break;
    }
    buf.append('\n');
    buf.append(tab3);
    appendDescriptor(INTERNAL_NAME, h.getOwner());
    buf.append('.');
    buf.append(h.getName());
    if(!isMethodHandle){
        buf.append('(');
    }
    appendDescriptor(HANDLE_DESCRIPTOR, h.getDesc());
    if(!isMethodHandle){
        buf.append(')');
    }
}
 
Example 15
Source File: Textifier.java    From nashorn with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Appends the information about the given handle to {@link #buf buf}.
 *
 * @param h a handle, non null.
 */
protected void appendHandle(final Handle h) {
    buf.append('\n').append(tab3);
    int tag = h.getTag();
    buf.append("// handle kind 0x").append(Integer.toHexString(tag)).append(" : ");
    switch (tag) {
        case Opcodes.H_GETFIELD:
            buf.append("GETFIELD");
            break;
        case Opcodes.H_GETSTATIC:
            buf.append("GETSTATIC");
            break;
        case Opcodes.H_PUTFIELD:
            buf.append("PUTFIELD");
            break;
        case Opcodes.H_PUTSTATIC:
            buf.append("PUTSTATIC");
            break;
        case Opcodes.H_INVOKEINTERFACE:
            buf.append("INVOKEINTERFACE");
            break;
        case Opcodes.H_INVOKESPECIAL:
            buf.append("INVOKESPECIAL");
            break;
        case Opcodes.H_INVOKESTATIC:
            buf.append("INVOKESTATIC");
            break;
        case Opcodes.H_INVOKEVIRTUAL:
            buf.append("INVOKEVIRTUAL");
            break;
        case Opcodes.H_NEWINVOKESPECIAL:
            buf.append("NEWINVOKESPECIAL");
            break;
    }
    buf.append('\n');
    buf.append(tab3);
    appendDescriptor(INTERNAL_NAME, h.getOwner());
    buf.append('.');
    buf.append(h.getName());
    buf.append('(');
    appendDescriptor(HANDLE_DESCRIPTOR, h.getDesc());
    buf.append(')').append('\n');
}