public static ObjCClass registerCustomClass(Class<? extends ObjCObject> type) { if (type.getAnnotation(NativeClass.class) != null) { throw new IllegalArgumentException("@NativeClass annotated class " + type.getName() + " can not be registered as a custom class"); } if (type.getAnnotation(NativeProtocolProxy.class) != null) { throw new IllegalArgumentException("@NativeProtocolProxy annotated class " + type.getName() + " can not be registered as a custom class"); } synchronized (objcBridgeLock) { ObjCClass c = typeToClass.get(type); if (c == null) { String name = getCustomClassName(type); c = register(type, name); typeToClass.put(type, c); nameToClass.put(name, c); } return c; } }
name = getCustomClassName(type); c = register(type, name);
public static ObjCClass registerCustomClass(Class<? extends ObjCObject> type) { if (type.getAnnotation(NativeClass.class) != null) { throw new IllegalArgumentException("@NativeClass annotated class " + type.getName() + " can not be registered as a custom class"); } if (type.getAnnotation(NativeProtocolProxy.class) != null) { throw new IllegalArgumentException("@NativeProtocolProxy annotated class " + type.getName() + " can not be registered as a custom class"); } synchronized (objcBridgeLock) { ObjCClass c = typeToClass.get(type); if (c == null) { String name = getCustomClassName(type); c = register(type, name); typeToClass.put(type, c); nameToClass.put(name, c); } return c; } }
name = getCustomClassName(type); c = register(type, name);