Jave parse field type signature signature parser

12 Jave code examples are found related to " parse field type signature signature parser". 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.
Example 1
Source File: SignatureParser.java    From Despector with MIT License 6 votes vote down vote up
private static TypeSignature parseFieldTypeSignature(Parser parser) {
    StringBuilder ident = new StringBuilder();
    while (parser.check('[')) {
        ident.append('[');
    }
    char next = parser.peek();
    if (ident.length() > 0) {
        if (VALID_PRIM.indexOf(next) != -1) {
            ident.append(next);
            parser.skip(1);
            return ClassTypeSignature.of(ident.toString());
        }
    }
    if (next == 'T') {
        parser.skip(1);
        ident.append('T');
        ident.append(parser.nextIdentifier());
        ident.append(';');
        TypeVariableSignature sig = new TypeVariableSignature(ident.toString());
        parser.expect(';');
        return sig;
    }
    checkState(next == 'L');
    return parseClassTypeSignature(parser, ident.toString());
}
 
Example 2
Source File: SignatureParser.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private FieldTypeSignature parseFieldTypeSignature(boolean allowArrays) {
    switch(current()) {
    case 'L':
       return parseClassTypeSignature();
    case 'T':
        return parseTypeVariableSignature();
    case '[':
        if (allowArrays)
            return parseArrayTypeSignature();
        else
            throw error("Array signature not allowed here.");
    default: throw error("Expected Field Type Signature");
    }
}
 
Example 3
Source File: SignatureParser.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private FieldTypeSignature parseFieldTypeSignature(boolean allowArrays) {
    switch(current()) {
    case 'L':
       return parseClassTypeSignature();
    case 'T':
        return parseTypeVariableSignature();
    case '[':
        if (allowArrays)
            return parseArrayTypeSignature();
        else
            throw error("Array signature not allowed here.");
    default: throw error("Expected Field Type Signature");
    }
}
 
Example 4
Source File: SignatureParser.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private FieldTypeSignature parseFieldTypeSignature(boolean allowArrays) {
    switch(current()) {
    case 'L':
       return parseClassTypeSignature();
    case 'T':
        return parseTypeVariableSignature();
    case '[':
        if (allowArrays)
            return parseArrayTypeSignature();
        else
            throw error("Array signature not allowed here.");
    default: throw error("Expected Field Type Signature");
    }
}
 
Example 5
Source File: SignatureParser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private FieldTypeSignature parseFieldTypeSignature(boolean allowArrays) {
    switch(current()) {
    case 'L':
       return parseClassTypeSignature();
    case 'T':
        return parseTypeVariableSignature();
    case '[':
        if (allowArrays)
            return parseArrayTypeSignature();
        else
            throw error("Array signature not allowed here.");
    default: throw error("Expected Field Type Signature");
    }
}
 
Example 6
Source File: SignatureParser.java    From javaide with GNU General Public License v3.0 5 votes vote down vote up
private FieldTypeSignature parseFieldTypeSignature() {
    switch(current()) {
    case 'L':
       return parseClassTypeSignature();
    case 'T':
        return parseTypeVariableSignature();
    case '[':
        return parseArrayTypeSignature();
    default: throw error("Expected Field Type Signature");
    }
}
 
Example 7
Source File: SignatureParser.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
private FieldTypeSignature parseFieldTypeSignature(boolean allowArrays) {
    switch(current()) {
    case 'L':
       return parseClassTypeSignature();
    case 'T':
        return parseTypeVariableSignature();
    case '[':
        if (allowArrays)
            return parseArrayTypeSignature();
        else
            throw error("Array signature not allowed here.");
    default: throw error("Expected Field Type Signature");
    }
}
 
Example 8
Source File: SignatureParser.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
private FieldTypeSignature parseFieldTypeSignature(boolean allowArrays) {
    switch(current()) {
    case 'L':
       return parseClassTypeSignature();
    case 'T':
        return parseTypeVariableSignature();
    case '[':
        if (allowArrays)
            return parseArrayTypeSignature();
        else
            throw error("Array signature not allowed here.");
    default: throw error("Expected Field Type Signature");
    }
}
 
Example 9
Source File: SignatureParser.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private FieldTypeSignature parseFieldTypeSignature(boolean allowArrays) {
    switch(current()) {
    case 'L':
       return parseClassTypeSignature();
    case 'T':
        return parseTypeVariableSignature();
    case '[':
        if (allowArrays)
            return parseArrayTypeSignature();
        else
            throw error("Array signature not allowed here.");
    default: throw error("Expected Field Type Signature");
    }
}
 
Example 10
Source File: SignatureParser.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private FieldTypeSignature parseFieldTypeSignature(boolean allowArrays) {
    switch(current()) {
    case 'L':
       return parseClassTypeSignature();
    case 'T':
        return parseTypeVariableSignature();
    case '[':
        if (allowArrays)
            return parseArrayTypeSignature();
        else
            throw error("Array signature not allowed here.");
    default: throw error("Expected Field Type Signature");
    }
}
 
Example 11
Source File: SignatureParser.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private FieldTypeSignature parseFieldTypeSignature(boolean allowArrays) {
    switch(current()) {
    case 'L':
       return parseClassTypeSignature();
    case 'T':
        return parseTypeVariableSignature();
    case '[':
        if (allowArrays)
            return parseArrayTypeSignature();
        else
            throw error("Array signature not allowed here.");
    default: throw error("Expected Field Type Signature");
    }
}
 
Example 12
Source File: SignatureParser.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private FieldTypeSignature parseFieldTypeSignature(boolean allowArrays) {
    switch(current()) {
    case 'L':
       return parseClassTypeSignature();
    case 'T':
        return parseTypeVariableSignature();
    case '[':
        if (allowArrays)
            return parseArrayTypeSignature();
        else
            throw error("Array signature not allowed here.");
    default: throw error("Expected Field Type Signature");
    }
}