Jave Code Examples for 'parse field type signature signature parser'

12 Jave code examples are found related to "parse field type signature signature parser". 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.
Example 1
Project: Despector   Author: Despector   File: SignatureParser.java    License: 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
Project: hottub   Author: dsrg-uoft   File: SignatureParser.java    License: 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
Project: openjdk-8-source   Author: keerath   File: SignatureParser.java    License: 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
Project: jdk8u60   Author: chenghanpeng   File: SignatureParser.java    License: 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
Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: SignatureParser.java    License: 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
Project: javaide   Author: tranleduy2000   File: SignatureParser.java    License: 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
Project: Bytecoder   Author: mirkosertic   File: SignatureParser.java    License: 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
Project: jdk8u_jdk   Author: JetBrains   File: SignatureParser.java    License: 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
Project: jdk8u-jdk   Author: frohoff   File: SignatureParser.java    License: 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
Project: jdk8u-jdk   Author: lambdalab-mirror   File: SignatureParser.java    License: 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
Project: TencentKona-8   Author: Tencent   File: SignatureParser.java    License: 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
Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: SignatureParser.java    License: 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");
    }
}