com.apple.internal.jobjc.generator.model.types.Type Java Examples

The following examples show how to use com.apple.internal.jobjc.generator.model.types.Type. 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: Struct.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public Field(String name, NField field32, NField field64) {
    QA.nonNull(name);
    this.name = name;
    // TODO <field> really should have a declared_type attr. See if BS patch is possible.
    this.type = Type.getType(null, field32.type, field64.type);
    this.field32 = field32;
    this.field64 = field64;
}
 
Example #2
Source File: ElementWType.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public ElementWType(final Node node, final String declType, final P parent) {
    super(node, parent);
    final String type32 = getAttr(node, "type");
    final String type64 = getAttr(node, "type64");
    this.type = Type.getType(declType,
                    type32 == null ? NType.NUnknown.inst() : NTypeParser.parseFrom(type32),
                    type64 == null ? null : NTypeParser.parseFrom(type64));
}
 
Example #3
Source File: ElementWType.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
public ElementWType(final Node node, final String declType, final P parent) {
    super(node, parent);
    final String type32 = getAttr(node, "type");
    final String type64 = getAttr(node, "type64");
    this.type = Type.getType(declType,
                    type32 == null ? NType.NUnknown.inst() : NTypeParser.parseFrom(type32),
                    type64 == null ? null : NTypeParser.parseFrom(type64));
}
 
Example #4
Source File: ElementWType.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
public ElementWType(final Node node, final String declType, final P parent) {
    super(node, parent);
    final String type32 = getAttr(node, "type");
    final String type64 = getAttr(node, "type64");
    this.type = Type.getType(declType,
                    type32 == null ? NType.NUnknown.inst() : NTypeParser.parseFrom(type32),
                    type64 == null ? null : NTypeParser.parseFrom(type64));
}
 
Example #5
Source File: NativeEnum.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
private static Type typeForEnum(String name, String value32, String value64, String le_value, String be_value, String ignore){
    if("true".equals(ignore)) return Type.getType(null, NPrimitive.inst('i'), null);

    NumTest[] tests = new NumTest[]{new IntTest(), new LongTest(), new FloatTest(), new DoubleTest()};
    for(NumTest t : tests)
        if(t.confirm(value32, value64, le_value, be_value))
            return t.getType();

    throw new NumberFormatException(String.format("Failed to parse type for enum: %1$s = 32: %2$s / 64: %3$s / le: %4$s / be: %5$s\n",
            name, value32, value64, le_value, be_value));
}
 
Example #6
Source File: ElementWType.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public ElementWType(final Node node, final String declType, final P parent) {
    super(node, parent);
    final String type32 = getAttr(node, "type");
    final String type64 = getAttr(node, "type64");
    this.type = Type.getType(declType,
                    type32 == null ? NType.NUnknown.inst() : NTypeParser.parseFrom(type32),
                    type64 == null ? null : NTypeParser.parseFrom(type64));
}
 
Example #7
Source File: Struct.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
public Field(String name, NField field32, NField field64) {
    QA.nonNull(name);
    this.name = name;
    // TODO <field> really should have a declared_type attr. See if BS patch is possible.
    this.type = Type.getType(null, field32.type, field64.type);
    this.field32 = field32;
    this.field64 = field64;
}
 
Example #8
Source File: Struct.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public Field(String name, NField field32, NField field64) {
    QA.nonNull(name);
    this.name = name;
    // TODO <field> really should have a declared_type attr. See if BS patch is possible.
    this.type = Type.getType(null, field32.type, field64.type);
    this.field32 = field32;
    this.field64 = field64;
}
 
Example #9
Source File: ElementWType.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public ElementWType(final Node node, final String declType, final P parent) {
    super(node, parent);
    final String type32 = getAttr(node, "type");
    final String type64 = getAttr(node, "type64");
    this.type = Type.getType(declType,
                    type32 == null ? NType.NUnknown.inst() : NTypeParser.parseFrom(type32),
                    type64 == null ? null : NTypeParser.parseFrom(type64));
}
 
Example #10
Source File: Struct.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public Field(String name, NField field32, NField field64) {
    QA.nonNull(name);
    this.name = name;
    // TODO <field> really should have a declared_type attr. See if BS patch is possible.
    this.type = Type.getType(null, field32.type, field64.type);
    this.field32 = field32;
    this.field64 = field64;
}
 
Example #11
Source File: NativeEnum.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static Type typeForEnum(String name, String value32, String value64, String le_value, String be_value, String ignore){
    if("true".equals(ignore)) return Type.getType(null, NPrimitive.inst('i'), null);

    NumTest[] tests = new NumTest[]{new IntTest(), new LongTest(), new FloatTest(), new DoubleTest()};
    for(NumTest t : tests)
        if(t.confirm(value32, value64, le_value, be_value))
            return t.getType();

    throw new NumberFormatException(String.format("Failed to parse type for enum: %1$s = 32: %2$s / 64: %3$s / le: %4$s / be: %5$s\n",
            name, value32, value64, le_value, be_value));
}
 
Example #12
Source File: NativeEnum.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private static Type typeForEnum(String name, String value32, String value64, String le_value, String be_value, String ignore){
    if("true".equals(ignore)) return Type.getType(null, NPrimitive.inst('i'), null);

    NumTest[] tests = new NumTest[]{new IntTest(), new LongTest(), new FloatTest(), new DoubleTest()};
    for(NumTest t : tests)
        if(t.confirm(value32, value64, le_value, be_value))
            return t.getType();

    throw new NumberFormatException(String.format("Failed to parse type for enum: %1$s = 32: %2$s / 64: %3$s / le: %4$s / be: %5$s\n",
            name, value32, value64, le_value, be_value));
}
 
Example #13
Source File: NativeEnum.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private static Type typeForEnum(String name, String value32, String value64, String le_value, String be_value, String ignore){
    if("true".equals(ignore)) return Type.getType(null, NPrimitive.inst('i'), null);

    NumTest[] tests = new NumTest[]{new IntTest(), new LongTest(), new FloatTest(), new DoubleTest()};
    for(NumTest t : tests)
        if(t.confirm(value32, value64, le_value, be_value))
            return t.getType();

    throw new NumberFormatException(String.format("Failed to parse type for enum: %1$s = 32: %2$s / 64: %3$s / le: %4$s / be: %5$s\n",
            name, value32, value64, le_value, be_value));
}
 
Example #14
Source File: NativeEnum.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private static Type typeForEnum(String name, String value32, String value64, String le_value, String be_value, String ignore){
    if("true".equals(ignore)) return Type.getType(null, NPrimitive.inst('i'), null);

    NumTest[] tests = new NumTest[]{new IntTest(), new LongTest(), new FloatTest(), new DoubleTest()};
    for(NumTest t : tests)
        if(t.confirm(value32, value64, le_value, be_value))
            return t.getType();

    throw new NumberFormatException(String.format("Failed to parse type for enum: %1$s = 32: %2$s / 64: %3$s / le: %4$s / be: %5$s\n",
            name, value32, value64, le_value, be_value));
}
 
Example #15
Source File: Struct.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
public Field(String name, NField field32, NField field64) {
    QA.nonNull(name);
    this.name = name;
    // TODO <field> really should have a declared_type attr. See if BS patch is possible.
    this.type = Type.getType(null, field32.type, field64.type);
    this.field32 = field32;
    this.field64 = field64;
}
 
Example #16
Source File: Struct.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public Field(String name, NField field32, NField field64) {
    QA.nonNull(name);
    this.name = name;
    // TODO <field> really should have a declared_type attr. See if BS patch is possible.
    this.type = Type.getType(null, field32.type, field64.type);
    this.field32 = field32;
    this.field64 = field64;
}
 
Example #17
Source File: NativeEnum.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private static Type typeForEnum(String name, String value32, String value64, String le_value, String be_value, String ignore){
    if("true".equals(ignore)) return Type.getType(null, NPrimitive.inst('i'), null);

    NumTest[] tests = new NumTest[]{new IntTest(), new LongTest(), new FloatTest(), new DoubleTest()};
    for(NumTest t : tests)
        if(t.confirm(value32, value64, le_value, be_value))
            return t.getType();

    throw new NumberFormatException(String.format("Failed to parse type for enum: %1$s = 32: %2$s / 64: %3$s / le: %4$s / be: %5$s\n",
            name, value32, value64, le_value, be_value));
}
 
Example #18
Source File: NativeEnum.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private static Type typeForEnum(String name, String value32, String value64, String le_value, String be_value, String ignore){
    if("true".equals(ignore)) return Type.getType(null, NPrimitive.inst('i'), null);

    NumTest[] tests = new NumTest[]{new IntTest(), new LongTest(), new FloatTest(), new DoubleTest()};
    for(NumTest t : tests)
        if(t.confirm(value32, value64, le_value, be_value))
            return t.getType();

    throw new NumberFormatException(String.format("Failed to parse type for enum: %1$s = 32: %2$s / 64: %3$s / le: %4$s / be: %5$s\n",
            name, value32, value64, le_value, be_value));
}
 
Example #19
Source File: ElementWType.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public ElementWType(final Node node, final String declType, final P parent) {
    super(node, parent);
    final String type32 = getAttr(node, "type");
    final String type64 = getAttr(node, "type64");
    this.type = Type.getType(declType,
                    type32 == null ? NType.NUnknown.inst() : NTypeParser.parseFrom(type32),
                    type64 == null ? null : NTypeParser.parseFrom(type64));
}
 
Example #20
Source File: NativeEnum.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
private static Type typeForEnum(String name, String value32, String value64, String le_value, String be_value, String ignore){
    if("true".equals(ignore)) return Type.getType(null, NPrimitive.inst('i'), null);

    NumTest[] tests = new NumTest[]{new IntTest(), new LongTest(), new FloatTest(), new DoubleTest()};
    for(NumTest t : tests)
        if(t.confirm(value32, value64, le_value, be_value))
            return t.getType();

    throw new NumberFormatException(String.format("Failed to parse type for enum: %1$s = 32: %2$s / 64: %3$s / le: %4$s / be: %5$s\n",
            name, value32, value64, le_value, be_value));
}
 
Example #21
Source File: ElementWType.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public ElementWType(final Node node, final String declType, final P parent) {
    super(node, parent);
    final String type32 = getAttr(node, "type");
    final String type64 = getAttr(node, "type64");
    this.type = Type.getType(declType,
                    type32 == null ? NType.NUnknown.inst() : NTypeParser.parseFrom(type32),
                    type64 == null ? null : NTypeParser.parseFrom(type64));
}
 
Example #22
Source File: Struct.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public Field(String name, NField field32, NField field64) {
    QA.nonNull(name);
    this.name = name;
    // TODO <field> really should have a declared_type attr. See if BS patch is possible.
    this.type = Type.getType(null, field32.type, field64.type);
    this.field32 = field32;
    this.field64 = field64;
}
 
Example #23
Source File: Element.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Element(final String name, final P parent) {
    this.name = Type.cleanName(name);
    this.parent = parent;
}
 
Example #24
Source File: ElementWType.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public ElementWType(final Node node, final Type t, final P parent) {
    super(node, parent);
    this.type = t;
}
 
Example #25
Source File: ElementWType.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
public ElementWType(final String name, final Type t, final P parent) {
    super(name, parent);
    this.type = t;
}
 
Example #26
Source File: ReturnValue.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public ReturnValue(Type type) {
    super("return value", type, null); // TODO bad style, the null might lead to trouble
}
 
Example #27
Source File: ElementWType.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
public ElementWType(final Node node, final Type t, final P parent) {
    super(node, parent);
    this.type = t;
}
 
Example #28
Source File: ReturnValue.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
public ReturnValue(Type type) {
    super("return value", type, null); // TODO bad style, the null might lead to trouble
}
 
Example #29
Source File: Element.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public Element(final String name, final P parent) {
    this.name = Type.cleanName(name);
    this.parent = parent;
}
 
Example #30
Source File: TypeElement.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public TypeElement(String name, Type type, final P parent) {
    super(name, type, parent);
}