本文整理汇总了Java中com.apple.internal.jobjc.generator.model.types.Type类的典型用法代码示例。如果您正苦于以下问题:Java Type类的具体用法?Java Type怎么用?Java Type使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Type类属于com.apple.internal.jobjc.generator.model.types包,在下文中一共展示了Type类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ElementWType
import com.apple.internal.jobjc.generator.model.types.Type; //导入依赖的package包/类
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));
}
示例2: Field
import com.apple.internal.jobjc.generator.model.types.Type; //导入依赖的package包/类
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;
}
示例3: typeForEnum
import com.apple.internal.jobjc.generator.model.types.Type; //导入依赖的package包/类
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));
}
示例4: ReturnValue
import com.apple.internal.jobjc.generator.model.types.Type; //导入依赖的package包/类
public ReturnValue(Type type) {
super("return value", type, null); // TODO bad style, the null might lead to trouble
}
示例5: Element
import com.apple.internal.jobjc.generator.model.types.Type; //导入依赖的package包/类
public Element(final String name, final P parent) {
this.name = Type.cleanName(name);
this.parent = parent;
}
示例6: TypeElement
import com.apple.internal.jobjc.generator.model.types.Type; //导入依赖的package包/类
public TypeElement(String name, Type type, final P parent) {
super(name, type, parent);
}