Java Code Examples for com.apple.internal.jobjc.generator.model.types.Type#getType()

The following examples show how to use com.apple.internal.jobjc.generator.model.types.Type#getType() . 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: 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 2
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 3
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 4
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 5
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 6
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 7
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 8
Source File: Struct.java    From openjdk-8-source 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: NativeEnum.java    From openjdk-8-source with GNU General Public License v2.0 votes vote down vote up
@Override public Type getType() { return Type.getType(null, NPrimitive.inst('i'), null); } 
Example 10
Source File: NativeEnum.java    From openjdk-8-source with GNU General Public License v2.0 votes vote down vote up
@Override public Type getType() { return Type.getType(null, NPrimitive.inst('f'), null); } 
Example 11
Source File: NativeEnum.java    From jdk8u60 with GNU General Public License v2.0 votes vote down vote up
@Override public Type getType() { return Type.getType(null, NPrimitive.inst('l'), null); } 
Example 12
Source File: NativeEnum.java    From jdk8u_jdk with GNU General Public License v2.0 votes vote down vote up
@Override public Type getType() { return Type.getType(null, NPrimitive.inst('i'), null); } 
Example 13
Source File: NativeEnum.java    From jdk8u-jdk with GNU General Public License v2.0 votes vote down vote up
@Override public Type getType() { return Type.getType(null, NPrimitive.inst('f'), null); } 
Example 14
Source File: NativeEnum.java    From jdk8u60 with GNU General Public License v2.0 votes vote down vote up
@Override public Type getType() { return Type.getType(null, NPrimitive.inst('d'), null); } 
Example 15
Source File: NativeEnum.java    From openjdk-jdk8u with GNU General Public License v2.0 votes vote down vote up
@Override public Type getType() { return Type.getType(null, NPrimitive.inst('d'), null); } 
Example 16
Source File: NativeEnum.java    From TencentKona-8 with GNU General Public License v2.0 votes vote down vote up
@Override public Type getType() { return Type.getType(null, NPrimitive.inst('i'), null); } 
Example 17
Source File: NativeEnum.java    From dragonwell8_jdk with GNU General Public License v2.0 votes vote down vote up
@Override public Type getType() { return Type.getType(null, NPrimitive.inst('d'), null); } 
Example 18
Source File: NativeEnum.java    From hottub with GNU General Public License v2.0 votes vote down vote up
@Override public Type getType() { return Type.getType(null, NPrimitive.inst('f'), null); } 
Example 19
Source File: NativeEnum.java    From jdk8u-dev-jdk with GNU General Public License v2.0 votes vote down vote up
@Override public Type getType() { return Type.getType(null, NPrimitive.inst('l'), null); } 
Example 20
Source File: NativeEnum.java    From dragonwell8_jdk with GNU General Public License v2.0 votes vote down vote up
@Override public Type getType() { return Type.getType(null, NPrimitive.inst('i'), null); }