本文整理汇总了Java中com.apple.internal.jobjc.generator.model.Clazz类的典型用法代码示例。如果您正苦于以下问题:Java Clazz类的具体用法?Java Clazz怎么用?Java Clazz使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Clazz类属于com.apple.internal.jobjc.generator.model包,在下文中一共展示了Clazz类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSuperClassFor
import com.apple.internal.jobjc.generator.model.Clazz; //导入依赖的package包/类
public static Clazz getSuperClassFor(final String className, final MacOSXFramework nativeFramework, final Map<String, Clazz> allClasses) throws Throwable {
final NSClass<ID> nativeClass = new NSClass<ID>(className, nativeFramework.getRuntime());
final NSClass<? extends ID> nativeSuperClass = UnsafeRuntimeAccess.getSuperClass(nativeClass);
final String superClassName = UnsafeRuntimeAccess.getClassNameFor(nativeSuperClass);
if ("nil".equals(superClassName)) return null;
final Clazz superClazz = allClasses.get(superClassName);
if (superClazz != null) return superClazz;
final Clazz superClazzX = getSuperClassFor(superClassName, nativeFramework, allClasses);
System.out.print("[Warning] class \"" + superClassName + "\" not found in bridge support files, ");
System.out.println("using \"" + superClazzX.name + "\" as superclass for \"" + className + "\"");
return superClazzX;
}
示例2: addCategoriesAndPatchClasses
import com.apple.internal.jobjc.generator.model.Clazz; //导入依赖的package包/类
private static void addCategoriesAndPatchClasses(final List<Clazz> clazzes, final Clazz clazz) {
final List<String> fwNames = new ArrayList<String>(clazzes.size());
for (final Clazz cls : clazzes) {
if (cls == clazz) continue;
fwNames.add(cls.parent.name);
cls.parent.classes.remove(cls);
cls.parent.categories.add(new Category(cls, clazz));
}
System.out.println("creating categories in: " + Utils.joinWComma(fwNames));
}
示例3: disambiguateMethodNames
import com.apple.internal.jobjc.generator.model.Clazz; //导入依赖的package包/类
static void disambiguateMethodNames() {
// link all subclassers off their parents
for (final Clazz clazz : TypeCache.inst().getAllClasses()) {
final Clazz superClazz = clazz.superClass;
if (superClazz != null) superClazz.subClassers.add(clazz);
}
// recursively call all subclassers, starting from NSObject on down
disambiguateMethodNamesFor(TypeCache.inst().getClassForName("NSObject"));
// NSProxy does not appear to subclass from NSObject, but it is still a real full class...?
disambiguateMethodNamesFor(TypeCache.inst().getClassForName("NSProxy"));
}
示例4: JObject
import com.apple.internal.jobjc.generator.model.Clazz; //导入依赖的package包/类
public JObject(final Type type, final Clazz clazz) {
this.type = type;
this.clazz = clazz;
}
示例5: AbstractObjCClassFile
import com.apple.internal.jobjc.generator.model.Clazz; //导入依赖的package包/类
public AbstractObjCClassFile(final Clazz clazz, final String classname, final String genericArgs, final String superClass) {
super(clazz.getPackage(), classname, genericArgs, superClass);
this.clazz = clazz;
}
示例6: JObjCClassFile
import com.apple.internal.jobjc.generator.model.Clazz; //导入依赖的package包/类
public JObjCClassFile(final Clazz clazz) {
super(clazz, clazz.name,
clazz.superClass == null ? "com.apple.jobjc.ID"
: clazz.superClass.getFullPath());
}
示例7: JObjCClassClassFile
import com.apple.internal.jobjc.generator.model.Clazz; //导入依赖的package包/类
public JObjCClassClassFile(final Clazz clazz) {
super(clazz, clazz.name + "Class", clazz.superClass != null ? clazz.superClass.getFullPath() + "Class" : ClassGenerator.JOBJC_PACKAGE + ".NSClass<" + clazz.name + ">");
}
示例8: disambiguateMethodNamesFor
import com.apple.internal.jobjc.generator.model.Clazz; //导入依赖的package包/类
static void disambiguateMethodNamesFor(final Clazz clazz) {
clazz.disambiguateMethods();
for (final Clazz subClazz : clazz.subClassers) {
disambiguateMethodNamesFor(subClazz);
}
}