Java 类com.sun.tools.classfile.Type 实例源码

项目:OpenJSharp    文件:ClassWriter.java   
public StringBuilder visitTypeParamType(TypeParamType type, StringBuilder sb) {
    sb.append(type.name);
    String sep = " extends ";
    if (type.classBound != null
            && (options.verbose || !type.classBound.isObject())) {
        sb.append(sep);
        append(sb, type.classBound);
        sep = " & ";
    }
    if (type.interfaceBounds != null) {
        for (Type bound: type.interfaceBounds) {
            sb.append(sep);
            append(sb, bound);
            sep = " & ";
        }
    }
    return sb;
}
项目:openjdk-jdk10    文件:ClassWriter.java   
@Override
public StringBuilder visitTypeParamType(TypeParamType type, StringBuilder sb) {
    sb.append(type.name);
    String sep = " extends ";
    if (type.classBound != null
            && (options.verbose || !type.classBound.isObject())) {
        sb.append(sep);
        append(sb, type.classBound);
        sep = " & ";
    }
    if (type.interfaceBounds != null) {
        for (Type bound: type.interfaceBounds) {
            sb.append(sep);
            append(sb, bound);
            sep = " & ";
        }
    }
    return sb;
}
项目:openjdk9    文件:ClassWriter.java   
public StringBuilder visitTypeParamType(TypeParamType type, StringBuilder sb) {
    sb.append(type.name);
    String sep = " extends ";
    if (type.classBound != null
            && (options.verbose || !type.classBound.isObject())) {
        sb.append(sep);
        append(sb, type.classBound);
        sep = " & ";
    }
    if (type.interfaceBounds != null) {
        for (Type bound: type.interfaceBounds) {
            sb.append(sep);
            append(sb, bound);
            sep = " & ";
        }
    }
    return sb;
}
项目:lookaside_java-1.8.0-openjdk    文件:ClassWriter.java   
public StringBuilder visitTypeParamType(TypeParamType type, StringBuilder sb) {
    sb.append(type.name);
    String sep = " extends ";
    if (type.classBound != null
            && (options.verbose || !type.classBound.isObject())) {
        sb.append(sep);
        append(sb, type.classBound);
        sep = " & ";
    }
    if (type.interfaceBounds != null) {
        for (Type bound: type.interfaceBounds) {
            sb.append(sep);
            append(sb, bound);
            sep = " & ";
        }
    }
    return sb;
}
项目:jsr308-langtools    文件:ClassWriter.java   
public StringBuilder visitTypeParamType(TypeParamType type, StringBuilder sb) {
    sb.append(type.name);
    String sep = " extends ";
    if (type.classBound != null
            && (options.verbose || !type.classBound.isObject())) {
        sb.append(sep);
        append(sb, type.classBound);
        sep = " & ";
    }
    if (type.interfaceBounds != null) {
        for (Type bound: type.interfaceBounds) {
            sb.append(sep);
            append(sb, bound);
            sep = " & ";
        }
    }
    return sb;
}
项目:infobip-open-jdk-8    文件:ClassWriter.java   
public StringBuilder visitTypeParamType(TypeParamType type, StringBuilder sb) {
    sb.append(type.name);
    String sep = " extends ";
    if (type.classBound != null
            && (options.verbose || !type.classBound.isObject())) {
        sb.append(sep);
        append(sb, type.classBound);
        sep = " & ";
    }
    if (type.interfaceBounds != null) {
        for (Type bound: type.interfaceBounds) {
            sb.append(sep);
            append(sb, bound);
            sep = " & ";
        }
    }
    return sb;
}
项目:openjdk-source-code-learn    文件:ClassWriter.java   
public StringBuilder visitTypeParamType(TypeParamType type, StringBuilder sb) {
    sb.append(type.name);
    String sep = " extends ";
    if (type.classBound != null
            && (options.verbose || !type.classBound.isObject())) {
        sb.append(sep);
        append(sb, type.classBound);
        sep = " & ";
    }
    if (type.interfaceBounds != null) {
        for (Type bound: type.interfaceBounds) {
            sb.append(sep);
            append(sb, bound);
            sep = " & ";
        }
    }
    return sb;
}
项目:OLD-OpenJDK8    文件:ClassWriter.java   
public StringBuilder visitTypeParamType(TypeParamType type, StringBuilder sb) {
    sb.append(type.name);
    String sep = " extends ";
    if (type.classBound != null
            && (options.verbose || !type.classBound.isObject())) {
        sb.append(sep);
        append(sb, type.classBound);
        sep = " & ";
    }
    if (type.interfaceBounds != null) {
        for (Type bound: type.interfaceBounds) {
            sb.append(sep);
            append(sb, bound);
            sep = " & ";
        }
    }
    return sb;
}
项目:s4j    文件:ClassWriter.java   
public StringBuilder visitTypeParamType(TypeParamType type, StringBuilder sb) {
    sb.append(type.name);
    String sep = " extends ";
    if (type.classBound != null
            && (options.verbose || !type.classBound.isObject())) {
        sb.append(sep);
        append(sb, type.classBound);
        sep = " & ";
    }
    if (type.interfaceBounds != null) {
        for (Type bound: type.interfaceBounds) {
            sb.append(sep);
            append(sb, bound);
            sep = " & ";
        }
    }
    return sb;
}
项目:jdk7-langtools    文件:ClassWriter.java   
public StringBuilder visitTypeParamType(TypeParamType type, StringBuilder sb) {
    sb.append(type.name);
    String sep = " extends ";
    if (type.classBound != null
            && (options.verbose || !type.classBound.isObject())) {
        sb.append(sep);
        append(sb, type.classBound);
        sep = " & ";
    }
    if (type.interfaceBounds != null) {
        for (Type bound: type.interfaceBounds) {
            sb.append(sep);
            append(sb, bound);
            sep = " & ";
        }
    }
    return sb;
}
项目:javap    文件:ClassWriter.java   
public StringBuilder visitTypeParamType(TypeParamType type, StringBuilder sb) {
    sb.append(type.name);
    String sep = " extends ";
    if (type.classBound != null
            && (options.verbose || !type.classBound.isObject())) {
        sb.append(sep);
        append(sb, type.classBound);
        sep = " & ";
    }
    if (type.interfaceBounds != null) {
        for (Type bound: type.interfaceBounds) {
            sb.append(sep);
            append(sb, bound);
            sep = " & ";
        }
    }
    return sb;
}
项目:openjdk-icedtea7    文件:ClassWriter.java   
public StringBuilder visitTypeParamType(TypeParamType type, StringBuilder sb) {
    sb.append(type.name);
    String sep = " extends ";
    if (type.classBound != null
            && (options.verbose || !type.classBound.isObject())) {
        sb.append(sep);
        append(sb, type.classBound);
        sep = " & ";
    }
    if (type.interfaceBounds != null) {
        for (Type bound: type.interfaceBounds) {
            sb.append(sep);
            append(sb, bound);
            sep = " & ";
        }
    }
    return sb;
}
项目:INF5000-StaticProxy    文件:ClassWriter.java   
public StringBuilder visitTypeParamType(TypeParamType type, StringBuilder sb) {
    sb.append(type.name);
    String sep = " extends ";
    if (type.classBound != null
            && (options.verbose || !type.classBound.isObject())) {
        sb.append(sep);
        append(sb, type.classBound);
        sep = " & ";
    }
    if (type.interfaceBounds != null) {
        for (Type bound: type.interfaceBounds) {
            sb.append(sep);
            append(sb, bound);
            sep = " & ";
        }
    }
    return sb;
}
项目:OpenJSharp    文件:ClassWriter.java   
private void append(StringBuilder sb, String prefix, List<? extends Type> list, String suffix) {
    sb.append(prefix);
    String sep = "";
    for (Type t: list) {
        sb.append(sep);
        append(sb, t);
        sep = ", ";
    }
    sb.append(suffix);
}
项目:openjdk-jdk10    文件:ClassWriter.java   
private void append(StringBuilder sb, String prefix, List<? extends Type> list, String suffix) {
    sb.append(prefix);
    String sep = "";
    for (Type t: list) {
        sb.append(sep);
        append(sb, t);
        sep = ", ";
    }
    sb.append(suffix);
}
项目:openjdk9    文件:ClassWriter.java   
private void append(StringBuilder sb, String prefix, List<? extends Type> list, String suffix) {
    sb.append(prefix);
    String sep = "";
    for (Type t: list) {
        sb.append(sep);
        append(sb, t);
        sep = ", ";
    }
    sb.append(suffix);
}
项目:lookaside_java-1.8.0-openjdk    文件:ClassWriter.java   
private void append(StringBuilder sb, String prefix, List<? extends Type> list, String suffix) {
    sb.append(prefix);
    String sep = "";
    for (Type t: list) {
        sb.append(sep);
        append(sb, t);
        sep = ", ";
    }
    sb.append(suffix);
}
项目:jsr308-langtools    文件:ClassWriter.java   
private void append(StringBuilder sb, String prefix, List<? extends Type> list, String suffix) {
    sb.append(prefix);
    String sep = "";
    for (Type t: list) {
        sb.append(sep);
        append(sb, t);
        sep = ", ";
    }
    sb.append(suffix);
}
项目:infobip-open-jdk-8    文件:ClassWriter.java   
private void append(StringBuilder sb, String prefix, List<? extends Type> list, String suffix) {
    sb.append(prefix);
    String sep = "";
    for (Type t: list) {
        sb.append(sep);
        append(sb, t);
        sep = ", ";
    }
    sb.append(suffix);
}
项目:openjdk-source-code-learn    文件:ClassWriter.java   
private void append(StringBuilder sb, String prefix, List<? extends Type> list, String suffix) {
    sb.append(prefix);
    String sep = "";
    for (Type t: list) {
        sb.append(sep);
        append(sb, t);
        sep = ", ";
    }
    sb.append(suffix);
}
项目:OLD-OpenJDK8    文件:ClassWriter.java   
private void append(StringBuilder sb, String prefix, List<? extends Type> list, String suffix) {
    sb.append(prefix);
    String sep = "";
    for (Type t: list) {
        sb.append(sep);
        append(sb, t);
        sep = ", ";
    }
    sb.append(suffix);
}
项目:s4j    文件:ClassWriter.java   
private void append(StringBuilder sb, String prefix, List<? extends Type> list, String suffix) {
    sb.append(prefix);
    String sep = "";
    for (Type t: list) {
        sb.append(sep);
        append(sb, t);
        sep = ", ";
    }
    sb.append(suffix);
}
项目:jdk7-langtools    文件:ClassWriter.java   
private void append(StringBuilder sb, String prefix, List<? extends Type> list, String suffix) {
    sb.append(prefix);
    String sep = "";
    for (Type t: list) {
        sb.append(sep);
        append(sb, t);
        sep = ", ";
    }
    sb.append(suffix);
}
项目:javap    文件:ClassWriter.java   
private void append(StringBuilder sb, String prefix, List<? extends Type> list, String suffix) {
    sb.append(prefix);
    String sep = "";
    for (Type t: list) {
        sb.append(sep);
        append(sb, t);
        sep = ", ";
    }
    sb.append(suffix);
}
项目:openjdk-icedtea7    文件:ClassWriter.java   
private void append(StringBuilder sb, String prefix, List<? extends Type> list, String suffix) {
    sb.append(prefix);
    String sep = "";
    for (Type t: list) {
        sb.append(sep);
        append(sb, t);
        sep = ", ";
    }
    sb.append(suffix);
}
项目:INF5000-StaticProxy    文件:ClassWriter.java   
private void append(StringBuilder sb, String prefix, List<? extends Type> list, String suffix) {
    sb.append(prefix);
    String sep = "";
    for (Type t: list) {
        sb.append(sep);
        append(sb, t);
        sep = ", ";
    }
    sb.append(suffix);
}
项目:OpenJSharp    文件:ClassWriter.java   
String print(Type t) {
    return t.accept(this, new StringBuilder()).toString();
}
项目:OpenJSharp    文件:ClassWriter.java   
private void append(StringBuilder sb, Type t) {
    t.accept(this, sb);
}
项目:OpenJSharp    文件:ClassWriter.java   
private void appendIfNotEmpty(StringBuilder sb, String prefix, List<? extends Type> list, String suffix) {
    if (!isEmpty(list))
        append(sb, prefix, list, suffix);
}
项目:OpenJSharp    文件:ClassWriter.java   
private boolean isEmpty(List<? extends Type> list) {
    return (list == null || list.isEmpty());
}
项目:OpenJSharp    文件:ClassWriter.java   
protected void writeField(Field f) {
    if (!options.checkAccess(f.access_flags))
        return;

    AccessFlags flags = f.access_flags;
    writeModifiers(flags.getFieldModifiers());
    Signature_attribute sigAttr = getSignature(f.attributes);
    if (sigAttr == null)
        print(getJavaFieldType(f.descriptor));
    else {
        try {
            Type t = sigAttr.getParsedSignature().getType(constant_pool);
            print(getJavaName(t.toString()));
        } catch (ConstantPoolException e) {
            // report error?
            // fall back on non-generic descriptor
            print(getJavaFieldType(f.descriptor));
        }
    }
    print(" ");
    print(getFieldName(f));
    if (options.showConstants) {
        Attribute a = f.attributes.get(Attribute.ConstantValue);
        if (a instanceof ConstantValue_attribute) {
            print(" = ");
            ConstantValue_attribute cv = (ConstantValue_attribute) a;
            print(getConstantValue(f.descriptor, cv.constantvalue_index));
        }
    }
    print(";");
    println();

    indent(+1);

    boolean showBlank = false;

    if (options.showDescriptors)
        println("descriptor: " + getValue(f.descriptor));

    if (options.verbose)
        writeList("flags: ", flags.getFieldFlags(), "\n");

    if (options.showAllAttrs) {
        for (Attribute attr: f.attributes)
            attrWriter.write(f, attr, constant_pool);
        showBlank = true;
    }

    indent(-1);

    if (showBlank || options.showDisassembled || options.showLineAndLocalVariableTables)
        println();
}
项目:openjdk-jdk10    文件:ClassWriter.java   
String print(Type t) {
    return t.accept(this, new StringBuilder()).toString();
}
项目:openjdk-jdk10    文件:ClassWriter.java   
private void append(StringBuilder sb, Type t) {
    t.accept(this, sb);
}
项目:openjdk-jdk10    文件:ClassWriter.java   
private void appendIfNotEmpty(StringBuilder sb, String prefix, List<? extends Type> list, String suffix) {
    if (!isEmpty(list))
        append(sb, prefix, list, suffix);
}
项目:openjdk-jdk10    文件:ClassWriter.java   
private boolean isEmpty(List<? extends Type> list) {
    return (list == null || list.isEmpty());
}
项目:openjdk-jdk10    文件:ClassWriter.java   
protected void writeField(Field f) {
    if (!options.checkAccess(f.access_flags))
        return;

    AccessFlags flags = f.access_flags;
    writeModifiers(flags.getFieldModifiers());
    Signature_attribute sigAttr = getSignature(f.attributes);
    if (sigAttr == null)
        print(getJavaFieldType(f.descriptor));
    else {
        try {
            Type t = sigAttr.getParsedSignature().getType(constant_pool);
            print(getJavaName(t.toString()));
        } catch (ConstantPoolException e) {
            // report error?
            // fall back on non-generic descriptor
            print(getJavaFieldType(f.descriptor));
        }
    }
    print(" ");
    print(getFieldName(f));
    if (options.showConstants) {
        Attribute a = f.attributes.get(Attribute.ConstantValue);
        if (a instanceof ConstantValue_attribute) {
            print(" = ");
            ConstantValue_attribute cv = (ConstantValue_attribute) a;
            print(getConstantValue(f.descriptor, cv.constantvalue_index));
        }
    }
    print(";");
    println();

    indent(+1);

    boolean showBlank = false;

    if (options.showDescriptors)
        println("descriptor: " + getValue(f.descriptor));

    if (options.verbose)
        writeList(String.format("flags: (0x%04x) ", flags.flags), flags.getFieldFlags(), "\n");

    if (options.showAllAttrs) {
        for (Attribute attr: f.attributes)
            attrWriter.write(f, attr, constant_pool);
        showBlank = true;
    }

    indent(-1);

    if (showBlank || options.showDisassembled || options.showLineAndLocalVariableTables)
        println();
}
项目:openjdk9    文件:ClassWriter.java   
String print(Type t) {
    return t.accept(this, new StringBuilder()).toString();
}
项目:openjdk9    文件:ClassWriter.java   
private void append(StringBuilder sb, Type t) {
    t.accept(this, sb);
}
项目:openjdk9    文件:ClassWriter.java   
private void appendIfNotEmpty(StringBuilder sb, String prefix, List<? extends Type> list, String suffix) {
    if (!isEmpty(list))
        append(sb, prefix, list, suffix);
}
项目:openjdk9    文件:ClassWriter.java   
private boolean isEmpty(List<? extends Type> list) {
    return (list == null || list.isEmpty());
}