com.apple.internal.jobjc.generator.model.types.JType.JStruct Java Examples
The following examples show how to use
com.apple.internal.jobjc.generator.model.types.JType.JStruct.
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: StructClassFile.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
private void writeStructField(final Struct.Field field, final PrintStream out){ if(field.type.getJType() == null || !(field.type.getJType() instanceof JStruct)){ out.println("\t// Found bad JavaType (" + field.type.getJType() + ") for field (" + field.name + ") of type (" + field.type + ")"); return; } String privName = field.name + "__"; String offsetName = field.name.toUpperCase() + "_OFFSET"; JStruct jstype = (JStruct) field.type.getJType(); String retTypeName = jstype.getJavaReturnTypeName(); out.println(); out.println("\tprivate static final int " + offsetName + " = " + JObjCRuntime.class.getName() + ".IS64" + " ? " + field.field64.offset64() + " : " + field.field32.offset32() + ";"); out.println("\tprivate " + retTypeName + " " + privName + " = null;"); out.println("\tpublic " + retTypeName + " " + getterName(field) + "(){"); out.println("\t\tif(null==" + privName + "){"); out.println("\t\t\tthis.raw.position(" + offsetName + ");"); out.println("\t\t\t" + privName + " = " + RootJObjCClass.runtimeFrameworkInstR(struct.parent.name) + ".make" + jstype.struct.name + "(this.raw.slice());"); out.println("\t\t}"); out.println("\t\treturn " + privName + ";"); out.println("\t}"); }
Example #2
Source File: StructClassFile.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
private void writeStructField(final Struct.Field field, final PrintStream out){ if(field.type.getJType() == null || !(field.type.getJType() instanceof JStruct)){ out.println("\t// Found bad JavaType (" + field.type.getJType() + ") for field (" + field.name + ") of type (" + field.type + ")"); return; } String privName = field.name + "__"; String offsetName = field.name.toUpperCase() + "_OFFSET"; JStruct jstype = (JStruct) field.type.getJType(); String retTypeName = jstype.getJavaReturnTypeName(); out.println(); out.println("\tprivate static final int " + offsetName + " = " + JObjCRuntime.class.getName() + ".IS64" + " ? " + field.field64.offset64() + " : " + field.field32.offset32() + ";"); out.println("\tprivate " + retTypeName + " " + privName + " = null;"); out.println("\tpublic " + retTypeName + " " + getterName(field) + "(){"); out.println("\t\tif(null==" + privName + "){"); out.println("\t\t\tthis.raw.position(" + offsetName + ");"); out.println("\t\t\t" + privName + " = " + RootJObjCClass.runtimeFrameworkInstR(struct.parent.name) + ".make" + jstype.struct.name + "(this.raw.slice());"); out.println("\t\t}"); out.println("\t\treturn " + privName + ";"); out.println("\t}"); }
Example #3
Source File: StructClassFile.java From hottub with GNU General Public License v2.0 | 6 votes |
private void writeStructField(final Struct.Field field, final PrintStream out){ if(field.type.getJType() == null || !(field.type.getJType() instanceof JStruct)){ out.println("\t// Found bad JavaType (" + field.type.getJType() + ") for field (" + field.name + ") of type (" + field.type + ")"); return; } String privName = field.name + "__"; String offsetName = field.name.toUpperCase() + "_OFFSET"; JStruct jstype = (JStruct) field.type.getJType(); String retTypeName = jstype.getJavaReturnTypeName(); out.println(); out.println("\tprivate static final int " + offsetName + " = " + JObjCRuntime.class.getName() + ".IS64" + " ? " + field.field64.offset64() + " : " + field.field32.offset32() + ";"); out.println("\tprivate " + retTypeName + " " + privName + " = null;"); out.println("\tpublic " + retTypeName + " " + getterName(field) + "(){"); out.println("\t\tif(null==" + privName + "){"); out.println("\t\t\tthis.raw.position(" + offsetName + ");"); out.println("\t\t\t" + privName + " = " + RootJObjCClass.runtimeFrameworkInstR(struct.parent.name) + ".make" + jstype.struct.name + "(this.raw.slice());"); out.println("\t\t}"); out.println("\t\treturn " + privName + ";"); out.println("\t}"); }
Example #4
Source File: StructClassFile.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private void writeStructField(final Struct.Field field, final PrintStream out){ if(field.type.getJType() == null || !(field.type.getJType() instanceof JStruct)){ out.println("\t// Found bad JavaType (" + field.type.getJType() + ") for field (" + field.name + ") of type (" + field.type + ")"); return; } String privName = field.name + "__"; String offsetName = field.name.toUpperCase() + "_OFFSET"; JStruct jstype = (JStruct) field.type.getJType(); String retTypeName = jstype.getJavaReturnTypeName(); out.println(); out.println("\tprivate static final int " + offsetName + " = " + JObjCRuntime.class.getName() + ".IS64" + " ? " + field.field64.offset64() + " : " + field.field32.offset32() + ";"); out.println("\tprivate " + retTypeName + " " + privName + " = null;"); out.println("\tpublic " + retTypeName + " " + getterName(field) + "(){"); out.println("\t\tif(null==" + privName + "){"); out.println("\t\t\tthis.raw.position(" + offsetName + ");"); out.println("\t\t\t" + privName + " = " + RootJObjCClass.runtimeFrameworkInstR(struct.parent.name) + ".make" + jstype.struct.name + "(this.raw.slice());"); out.println("\t\t}"); out.println("\t\treturn " + privName + ";"); out.println("\t}"); }
Example #5
Source File: StructClassFile.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private void writeStructField(final Struct.Field field, final PrintStream out){ if(field.type.getJType() == null || !(field.type.getJType() instanceof JStruct)){ out.println("\t// Found bad JavaType (" + field.type.getJType() + ") for field (" + field.name + ") of type (" + field.type + ")"); return; } String privName = field.name + "__"; String offsetName = field.name.toUpperCase() + "_OFFSET"; JStruct jstype = (JStruct) field.type.getJType(); String retTypeName = jstype.getJavaReturnTypeName(); out.println(); out.println("\tprivate static final int " + offsetName + " = " + JObjCRuntime.class.getName() + ".IS64" + " ? " + field.field64.offset64() + " : " + field.field32.offset32() + ";"); out.println("\tprivate " + retTypeName + " " + privName + " = null;"); out.println("\tpublic " + retTypeName + " " + getterName(field) + "(){"); out.println("\t\tif(null==" + privName + "){"); out.println("\t\t\tthis.raw.position(" + offsetName + ");"); out.println("\t\t\t" + privName + " = " + RootJObjCClass.runtimeFrameworkInstR(struct.parent.name) + ".make" + jstype.struct.name + "(this.raw.slice());"); out.println("\t\t}"); out.println("\t\treturn " + privName + ";"); out.println("\t}"); }
Example #6
Source File: StructClassFile.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private void writeStructField(final Struct.Field field, final PrintStream out){ if(field.type.getJType() == null || !(field.type.getJType() instanceof JStruct)){ out.println("\t// Found bad JavaType (" + field.type.getJType() + ") for field (" + field.name + ") of type (" + field.type + ")"); return; } String privName = field.name + "__"; String offsetName = field.name.toUpperCase() + "_OFFSET"; JStruct jstype = (JStruct) field.type.getJType(); String retTypeName = jstype.getJavaReturnTypeName(); out.println(); out.println("\tprivate static final int " + offsetName + " = " + JObjCRuntime.class.getName() + ".IS64" + " ? " + field.field64.offset64() + " : " + field.field32.offset32() + ";"); out.println("\tprivate " + retTypeName + " " + privName + " = null;"); out.println("\tpublic " + retTypeName + " " + getterName(field) + "(){"); out.println("\t\tif(null==" + privName + "){"); out.println("\t\t\tthis.raw.position(" + offsetName + ");"); out.println("\t\t\t" + privName + " = " + RootJObjCClass.runtimeFrameworkInstR(struct.parent.name) + ".make" + jstype.struct.name + "(this.raw.slice());"); out.println("\t\t}"); out.println("\t\treturn " + privName + ";"); out.println("\t}"); }
Example #7
Source File: StructClassFile.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private void writeStructField(final Struct.Field field, final PrintStream out){ if(field.type.getJType() == null || !(field.type.getJType() instanceof JStruct)){ out.println("\t// Found bad JavaType (" + field.type.getJType() + ") for field (" + field.name + ") of type (" + field.type + ")"); return; } String privName = field.name + "__"; String offsetName = field.name.toUpperCase() + "_OFFSET"; JStruct jstype = (JStruct) field.type.getJType(); String retTypeName = jstype.getJavaReturnTypeName(); out.println(); out.println("\tprivate static final int " + offsetName + " = " + JObjCRuntime.class.getName() + ".IS64" + " ? " + field.field64.offset64() + " : " + field.field32.offset32() + ";"); out.println("\tprivate " + retTypeName + " " + privName + " = null;"); out.println("\tpublic " + retTypeName + " " + getterName(field) + "(){"); out.println("\t\tif(null==" + privName + "){"); out.println("\t\t\tthis.raw.position(" + offsetName + ");"); out.println("\t\t\t" + privName + " = " + RootJObjCClass.runtimeFrameworkInstR(struct.parent.name) + ".make" + jstype.struct.name + "(this.raw.slice());"); out.println("\t\t}"); out.println("\t\treturn " + privName + ";"); out.println("\t}"); }
Example #8
Source File: StructClassFile.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private void writeStructField(final Struct.Field field, final PrintStream out){ if(field.type.getJType() == null || !(field.type.getJType() instanceof JStruct)){ out.println("\t// Found bad JavaType (" + field.type.getJType() + ") for field (" + field.name + ") of type (" + field.type + ")"); return; } String privName = field.name + "__"; String offsetName = field.name.toUpperCase() + "_OFFSET"; JStruct jstype = (JStruct) field.type.getJType(); String retTypeName = jstype.getJavaReturnTypeName(); out.println(); out.println("\tprivate static final int " + offsetName + " = " + JObjCRuntime.class.getName() + ".IS64" + " ? " + field.field64.offset64() + " : " + field.field32.offset32() + ";"); out.println("\tprivate " + retTypeName + " " + privName + " = null;"); out.println("\tpublic " + retTypeName + " " + getterName(field) + "(){"); out.println("\t\tif(null==" + privName + "){"); out.println("\t\t\tthis.raw.position(" + offsetName + ");"); out.println("\t\t\t" + privName + " = " + RootJObjCClass.runtimeFrameworkInstR(struct.parent.name) + ".make" + jstype.struct.name + "(this.raw.slice());"); out.println("\t\t}"); out.println("\t\treturn " + privName + ";"); out.println("\t}"); }
Example #9
Source File: StructClassFile.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
private void writeStructField(final Struct.Field field, final PrintStream out){ if(field.type.getJType() == null || !(field.type.getJType() instanceof JStruct)){ out.println("\t// Found bad JavaType (" + field.type.getJType() + ") for field (" + field.name + ") of type (" + field.type + ")"); return; } String privName = field.name + "__"; String offsetName = field.name.toUpperCase() + "_OFFSET"; JStruct jstype = (JStruct) field.type.getJType(); String retTypeName = jstype.getJavaReturnTypeName(); out.println(); out.println("\tprivate static final int " + offsetName + " = " + JObjCRuntime.class.getName() + ".IS64" + " ? " + field.field64.offset64() + " : " + field.field32.offset32() + ";"); out.println("\tprivate " + retTypeName + " " + privName + " = null;"); out.println("\tpublic " + retTypeName + " " + getterName(field) + "(){"); out.println("\t\tif(null==" + privName + "){"); out.println("\t\t\tthis.raw.position(" + offsetName + ");"); out.println("\t\t\t" + privName + " = " + RootJObjCClass.runtimeFrameworkInstR(struct.parent.name) + ".make" + jstype.struct.name + "(this.raw.slice());"); out.println("\t\t}"); out.println("\t\treturn " + privName + ";"); out.println("\t}"); }
Example #10
Source File: StructClassFile.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private void writeStructField(final Struct.Field field, final PrintStream out){ if(field.type.getJType() == null || !(field.type.getJType() instanceof JStruct)){ out.println("\t// Found bad JavaType (" + field.type.getJType() + ") for field (" + field.name + ") of type (" + field.type + ")"); return; } String privName = field.name + "__"; String offsetName = field.name.toUpperCase() + "_OFFSET"; JStruct jstype = (JStruct) field.type.getJType(); String retTypeName = jstype.getJavaReturnTypeName(); out.println(); out.println("\tprivate static final int " + offsetName + " = " + JObjCRuntime.class.getName() + ".IS64" + " ? " + field.field64.offset64() + " : " + field.field32.offset32() + ";"); out.println("\tprivate " + retTypeName + " " + privName + " = null;"); out.println("\tpublic " + retTypeName + " " + getterName(field) + "(){"); out.println("\t\tif(null==" + privName + "){"); out.println("\t\t\tthis.raw.position(" + offsetName + ");"); out.println("\t\t\t" + privName + " = " + RootJObjCClass.runtimeFrameworkInstR(struct.parent.name) + ".make" + jstype.struct.name + "(this.raw.slice());"); out.println("\t\t}"); out.println("\t\treturn " + privName + ";"); out.println("\t}"); }
Example #11
Source File: StructClassFile.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
private void writeStructField(final Struct.Field field, final PrintStream out){ if(field.type.getJType() == null || !(field.type.getJType() instanceof JStruct)){ out.println("\t// Found bad JavaType (" + field.type.getJType() + ") for field (" + field.name + ") of type (" + field.type + ")"); return; } String privName = field.name + "__"; String offsetName = field.name.toUpperCase() + "_OFFSET"; JStruct jstype = (JStruct) field.type.getJType(); String retTypeName = jstype.getJavaReturnTypeName(); out.println(); out.println("\tprivate static final int " + offsetName + " = " + JObjCRuntime.class.getName() + ".IS64" + " ? " + field.field64.offset64() + " : " + field.field32.offset32() + ";"); out.println("\tprivate " + retTypeName + " " + privName + " = null;"); out.println("\tpublic " + retTypeName + " " + getterName(field) + "(){"); out.println("\t\tif(null==" + privName + "){"); out.println("\t\t\tthis.raw.position(" + offsetName + ");"); out.println("\t\t\t" + privName + " = " + RootJObjCClass.runtimeFrameworkInstR(struct.parent.name) + ".make" + jstype.struct.name + "(this.raw.slice());"); out.println("\t\t}"); out.println("\t\treturn " + privName + ";"); out.println("\t}"); }
Example #12
Source File: StructClassFile.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
private void writeStructField(final Struct.Field field, final PrintStream out){ if(field.type.getJType() == null || !(field.type.getJType() instanceof JStruct)){ out.println("\t// Found bad JavaType (" + field.type.getJType() + ") for field (" + field.name + ") of type (" + field.type + ")"); return; } String privName = field.name + "__"; String offsetName = field.name.toUpperCase() + "_OFFSET"; JStruct jstype = (JStruct) field.type.getJType(); String retTypeName = jstype.getJavaReturnTypeName(); out.println(); out.println("\tprivate static final int " + offsetName + " = " + JObjCRuntime.class.getName() + ".IS64" + " ? " + field.field64.offset64() + " : " + field.field32.offset32() + ";"); out.println("\tprivate " + retTypeName + " " + privName + " = null;"); out.println("\tpublic " + retTypeName + " " + getterName(field) + "(){"); out.println("\t\tif(null==" + privName + "){"); out.println("\t\t\tthis.raw.position(" + offsetName + ");"); out.println("\t\t\t" + privName + " = " + RootJObjCClass.runtimeFrameworkInstR(struct.parent.name) + ".make" + jstype.struct.name + "(this.raw.slice());"); out.println("\t\t}"); out.println("\t\treturn " + privName + ";"); out.println("\t}"); }
Example #13
Source File: TypeToJType.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
protected JType accept(Type type, NStruct nt32, NStruct nt64){ Struct st = TypeCache.inst().getStructForName(type.name); return st != null ? new JStruct(st) : new JUnknown(type); // TODO We could probably generate a struct here based on the type. But we need access to its parent framework. // Maybe we could use a fallback anonymous struct, but we need the SIZEOF. }
Example #14
Source File: TypeToJType.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
protected JType accept(Type type, NStruct nt32, NStruct nt64){ Struct st = TypeCache.inst().getStructForName(type.name); return st != null ? new JStruct(st) : new JUnknown(type); // TODO We could probably generate a struct here based on the type. But we need access to its parent framework. // Maybe we could use a fallback anonymous struct, but we need the SIZEOF. }
Example #15
Source File: TypeToJType.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
protected JType accept(Type type, NStruct nt32, NStruct nt64){ Struct st = TypeCache.inst().getStructForName(type.name); return st != null ? new JStruct(st) : new JUnknown(type); // TODO We could probably generate a struct here based on the type. But we need access to its parent framework. // Maybe we could use a fallback anonymous struct, but we need the SIZEOF. }
Example #16
Source File: TypeToJType.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
protected JType accept(Type type, NStruct nt32, NStruct nt64){ Struct st = TypeCache.inst().getStructForName(type.name); return st != null ? new JStruct(st) : new JUnknown(type); // TODO We could probably generate a struct here based on the type. But we need access to its parent framework. // Maybe we could use a fallback anonymous struct, but we need the SIZEOF. }
Example #17
Source File: TypeToJType.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
protected JType accept(Type type, NStruct nt32, NStruct nt64){ Struct st = TypeCache.inst().getStructForName(type.name); return st != null ? new JStruct(st) : new JUnknown(type); // TODO We could probably generate a struct here based on the type. But we need access to its parent framework. // Maybe we could use a fallback anonymous struct, but we need the SIZEOF. }
Example #18
Source File: TypeToJType.java From hottub with GNU General Public License v2.0 | 4 votes |
protected JType accept(Type type, NStruct nt32, NStruct nt64){ Struct st = TypeCache.inst().getStructForName(type.name); return st != null ? new JStruct(st) : new JUnknown(type); // TODO We could probably generate a struct here based on the type. But we need access to its parent framework. // Maybe we could use a fallback anonymous struct, but we need the SIZEOF. }
Example #19
Source File: TypeToJType.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
protected JType accept(Type type, NStruct nt32, NStruct nt64){ Struct st = TypeCache.inst().getStructForName(type.name); return st != null ? new JStruct(st) : new JUnknown(type); // TODO We could probably generate a struct here based on the type. But we need access to its parent framework. // Maybe we could use a fallback anonymous struct, but we need the SIZEOF. }
Example #20
Source File: TypeToJType.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
protected JType accept(Type type, NStruct nt32, NStruct nt64){ Struct st = TypeCache.inst().getStructForName(type.name); return st != null ? new JStruct(st) : new JUnknown(type); // TODO We could probably generate a struct here based on the type. But we need access to its parent framework. // Maybe we could use a fallback anonymous struct, but we need the SIZEOF. }
Example #21
Source File: TypeToJType.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
protected JType accept(Type type, NStruct nt32, NStruct nt64){ Struct st = TypeCache.inst().getStructForName(type.name); return st != null ? new JStruct(st) : new JUnknown(type); // TODO We could probably generate a struct here based on the type. But we need access to its parent framework. // Maybe we could use a fallback anonymous struct, but we need the SIZEOF. }
Example #22
Source File: TypeToJType.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
protected JType accept(Type type, NStruct nt32, NStruct nt64){ Struct st = TypeCache.inst().getStructForName(type.name); return st != null ? new JStruct(st) : new JUnknown(type); // TODO We could probably generate a struct here based on the type. But we need access to its parent framework. // Maybe we could use a fallback anonymous struct, but we need the SIZEOF. }
Example #23
Source File: TypeToJType.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
protected JType accept(Type type, NStruct nt32, NStruct nt64){ Struct st = TypeCache.inst().getStructForName(type.name); return st != null ? new JStruct(st) : new JUnknown(type); // TODO We could probably generate a struct here based on the type. But we need access to its parent framework. // Maybe we could use a fallback anonymous struct, but we need the SIZEOF. }
Example #24
Source File: TypeToJType.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
protected JType accept(Type type, NStruct nt32, NStruct nt64){ Struct st = TypeCache.inst().getStructForName(type.name); return st != null ? new JStruct(st) : new JUnknown(type); // TODO We could probably generate a struct here based on the type. But we need access to its parent framework. // Maybe we could use a fallback anonymous struct, but we need the SIZEOF. }
Example #25
Source File: CoderDescriptor.java From dragonwell8_jdk with GNU General Public License v2.0 | votes |
public StructCoderDescriptor(JStruct jst) { this.jstruct = jst; }
Example #26
Source File: CoderDescriptor.java From jdk8u-dev-jdk with GNU General Public License v2.0 | votes |
public StructCoderDescriptor(JStruct jst) { this.jstruct = jst; }
Example #27
Source File: CoderDescriptor.java From TencentKona-8 with GNU General Public License v2.0 | votes |
public StructCoderDescriptor(JStruct jst) { this.jstruct = jst; }
Example #28
Source File: CoderDescriptor.java From jdk8u-jdk with GNU General Public License v2.0 | votes |
public StructCoderDescriptor(JStruct jst) { this.jstruct = jst; }
Example #29
Source File: CoderDescriptor.java From jdk8u60 with GNU General Public License v2.0 | votes |
public StructCoderDescriptor(JStruct jst) { this.jstruct = jst; }
Example #30
Source File: CoderDescriptor.java From jdk8u_jdk with GNU General Public License v2.0 | votes |
public StructCoderDescriptor(JStruct jst) { this.jstruct = jst; }