Java Code Examples for sun.reflect.ConstantPool#getIntAt()

The following examples show how to use sun.reflect.ConstantPool#getIntAt() . These examples are extracted from open source projects. 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
private static Object parseIntArray(int length,
                             ByteBuffer buf, ConstantPool constPool) {
    int[] result = new  int[length];
    boolean typeMismatch = false;
    int tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'I') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = constPool.getIntAt(index);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 2
private static Object parseCharArray(int length,
                              ByteBuffer buf, ConstantPool constPool) {
    char[] result = new char[length];
    boolean typeMismatch = false;
    byte tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'C') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = (char) constPool.getIntAt(index);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 3
private static Object parseIntArray(int length,
                             ByteBuffer buf, ConstantPool constPool) {
    int[] result = new  int[length];
    boolean typeMismatch = false;
    int tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'I') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = constPool.getIntAt(index);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 4
private static Object parseShortArray(int length,
                               ByteBuffer buf, ConstantPool constPool) {
    short[] result = new short[length];
    boolean typeMismatch = false;
    int tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'S') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = (short) constPool.getIntAt(index);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 5
private static Object parseBooleanArray(int length,
                                 ByteBuffer buf, ConstantPool constPool) {
    boolean[] result = new boolean[length];
    boolean typeMismatch = false;
    int tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'Z') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = (constPool.getIntAt(index) != 0);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 6
private static Object parseByteArray(int length,
                              ByteBuffer buf, ConstantPool constPool) {
    byte[] result = new byte[length];
    boolean typeMismatch = false;
    int tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'B') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = (byte) constPool.getIntAt(index);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 7
private static Object parseBooleanArray(int length,
                                 ByteBuffer buf, ConstantPool constPool) {
    boolean[] result = new boolean[length];
    boolean typeMismatch = false;
    int tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'Z') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = (constPool.getIntAt(index) != 0);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 8
private static Object parseBooleanArray(int length,
                                 ByteBuffer buf, ConstantPool constPool) {
    boolean[] result = new boolean[length];
    boolean typeMismatch = false;
    int tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'Z') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = (constPool.getIntAt(index) != 0);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 9
private static Object parseShortArray(int length,
                               ByteBuffer buf, ConstantPool constPool) {
    short[] result = new short[length];
    boolean typeMismatch = false;
    int tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'S') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = (short) constPool.getIntAt(index);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 10
private static Object parseByteArray(int length,
                              ByteBuffer buf, ConstantPool constPool) {
    byte[] result = new byte[length];
    boolean typeMismatch = false;
    int tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'B') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = (byte) constPool.getIntAt(index);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 11
private static Object parseByteArray(int length,
                              ByteBuffer buf, ConstantPool constPool) {
    byte[] result = new byte[length];
    boolean typeMismatch = false;
    int tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'B') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = (byte) constPool.getIntAt(index);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 12
private static Object parseIntArray(int length,
                             ByteBuffer buf, ConstantPool constPool) {
    int[] result = new  int[length];
    boolean typeMismatch = false;
    int tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'I') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = constPool.getIntAt(index);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 13
private static Object parseIntArray(int length,
                             ByteBuffer buf, ConstantPool constPool) {
    int[] result = new  int[length];
    boolean typeMismatch = false;
    int tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'I') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = constPool.getIntAt(index);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 14
private static Object parseCharArray(int length,
                              ByteBuffer buf, ConstantPool constPool) {
    char[] result = new char[length];
    boolean typeMismatch = false;
    byte tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'C') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = (char) constPool.getIntAt(index);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 15
private static Object parseByteArray(int length,
                              ByteBuffer buf, ConstantPool constPool) {
    byte[] result = new byte[length];
    boolean typeMismatch = false;
    int tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'B') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = (byte) constPool.getIntAt(index);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 16
private static Object parseIntArray(int length,
                             ByteBuffer buf, ConstantPool constPool) {
    int[] result = new  int[length];
    boolean typeMismatch = false;
    int tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'I') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = constPool.getIntAt(index);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 17
private static Object parseCharArray(int length,
                              ByteBuffer buf, ConstantPool constPool) {
    char[] result = new char[length];
    boolean typeMismatch = false;
    byte tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'C') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = (char) constPool.getIntAt(index);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 18
private static Object parseCharArray(int length,
                              ByteBuffer buf, ConstantPool constPool) {
    char[] result = new char[length];
    boolean typeMismatch = false;
    byte tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'C') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = (char) constPool.getIntAt(index);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 19
private static Object parseShortArray(int length,
                               ByteBuffer buf, ConstantPool constPool) {
    short[] result = new short[length];
    boolean typeMismatch = false;
    int tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'S') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = (short) constPool.getIntAt(index);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}
 
Example 20
private static Object parseBooleanArray(int length,
                                 ByteBuffer buf, ConstantPool constPool) {
    boolean[] result = new boolean[length];
    boolean typeMismatch = false;
    int tag = 0;

    for (int i = 0; i < length; i++) {
        tag = buf.get();
        if (tag == 'Z') {
            int index = buf.getShort() & 0xFFFF;
            result[i] = (constPool.getIntAt(index) != 0);
        } else {
            skipMemberValue(tag, buf);
            typeMismatch = true;
        }
    }
    return typeMismatch ? exceptionProxy(tag) : result;
}