Codota Logo
ObjCClass.isCustom
Code IndexAdd Codota to your IDE (free)

How to use
isCustom
method
in
org.robovm.objc.ObjCClass

Best Java code snippets using org.robovm.objc.ObjCClass.isCustom (Showing top 10 results out of 315)

  • Common ways to obtain ObjCClass
private void myMethod () {
ObjCClass o =
  • Codota IconObjCClass.getByType((Class<? extends ObjCObject>)array[index])
  • Codota IconClass type;ObjCClass.getByType(type)
  • Codota IconClass type;ObjCClass.registerCustomClass(type)
  • Smart code suggestions by Codota
}
origin: robovm/robovm

@SuppressWarnings("unchecked")
protected ObjCSuper getSuper() {
  if (zuper == null) {
    Class<? extends ObjCObject> javaClass = (Class<? extends ObjCObject>) getClass().getSuperclass();
    ObjCClass objCClass = ObjCClass.getByType(javaClass);
    while (objCClass.isCustom()) {
      javaClass = (Class<? extends ObjCObject>) javaClass.getSuperclass();
      objCClass = ObjCClass.getByType(javaClass);
    }
    zuper = new ObjCSuper(this, objCClass);
  }
  return zuper;
}
origin: robovm/robovm

protected ObjCObject(long handle) {
  initObject(handle);
  customClass = getObjCClass().isCustom();
}
origin: robovm/robovm

protected ObjCObject() {
  long handle = alloc();
  setHandle(handle);
  if (handle != 0) {
    // Make sure the peer is set immediately even if a different handle
    // is set later with initObject().
    setPeerObject(handle, this);
  }
  customClass = getObjCClass().isCustom();
}
origin: robovm/robovm

private static void registerCallbackMethod(long cls, long selector, long newSelector, Method method) {
  long superMethod = ObjCRuntime.class_getInstanceMethod(cls, selector);
  long typeEncoding = ObjCRuntime.method_getTypeEncoding(superMethod);
  if (!ObjCRuntime.class_addMethod(cls, selector, VM.getCallbackMethodImpl(method), typeEncoding)) {
    throw new Error(
        "Failed to register callback method on the ObjectOwnershipHelper: class_addMethod(...) failed");
  }
  // find the super class that is a native class and cache it
  long superClass = ObjCRuntime.class_getSuperclass(cls);
  long nativeSuper = 0;
  while (superClass != 0) {
    ObjCClass objCClass = ObjCClass.toObjCClass(superClass);
    if (!objCClass.isCustom()) {
      nativeSuper = superClass;
      break;
    }
    superClass = ObjCRuntime.class_getSuperclass(superClass);
  }
  if (nativeSuper == 0) {
    throw new Error("Couldn't find native super class for "
        + VM.newStringUTF(ObjCRuntime.class_getName(cls)));
  }
  synchronized (customClassToNativeSuper) {
    customClassToNativeSuper.put(cls, nativeSuper);
  }
}
origin: robovm/robovm

/**
 * Creates a new instance of the specified {@link ObjCClass}. If
 * {@code makePeer == true} this method MUST be called while the
 * {@link #objcBridgeLock} is held.
 */
@SuppressWarnings("unchecked")
private static <T extends ObjCObject> T createInstance(ObjCClass objCClass, long handle, int afterMarshaledFlags,
    boolean makePeer) {
  Class<T> c = (Class<T>) objCClass.getType();
  T o = VM.allocateObject(c);
  o.setHandle(handle);
  if (makePeer) {
    setPeerObject(handle, o);
  }
  if (objCClass.isCustom()) {
    VM.setBoolean(VM.getObjectAddress(o) + CUSTOM_CLASS_OFFSET, true);
  }
  o.afterMarshaled(afterMarshaledFlags);
  return o;
}
origin: com.gluonhq/robovm-objc

@SuppressWarnings("unchecked")
protected ObjCSuper getSuper() {
  if (zuper == null) {
    Class<? extends ObjCObject> javaClass = (Class<? extends ObjCObject>) getClass().getSuperclass();
    ObjCClass objCClass = ObjCClass.getByType(javaClass);
    while (objCClass.isCustom()) {
      javaClass = (Class<? extends ObjCObject>) javaClass.getSuperclass();
      objCClass = ObjCClass.getByType(javaClass);
    }
    zuper = new ObjCSuper(this, objCClass);
  }
  return zuper;
}
origin: com.gluonhq/robovm-objc

protected ObjCObject(long handle) {
  initObject(handle);
  customClass = getObjCClass().isCustom();
}
origin: com.gluonhq/robovm-objc

protected ObjCObject() {
  long handle = alloc();
  setHandle(handle);
  if (handle != 0) {
    // Make sure the peer is set immediately even if a different handle
    // is set later with initObject().
    setPeerObject(handle, this);
  }
  customClass = getObjCClass().isCustom();
}
origin: com.gluonhq/robovm-objc

private static void registerCallbackMethod(long cls, long selector, long newSelector, Method method) {
  long superMethod = ObjCRuntime.class_getInstanceMethod(cls, selector);
  long typeEncoding = ObjCRuntime.method_getTypeEncoding(superMethod);
  if (!ObjCRuntime.class_addMethod(cls, selector, VM.getCallbackMethodImpl(method), typeEncoding)) {
    throw new Error(
        "Failed to register callback method on the ObjectOwnershipHelper: class_addMethod(...) failed");
  }
  // find the super class that is a native class and cache it
  long superClass = ObjCRuntime.class_getSuperclass(cls);
  long nativeSuper = 0;
  while (superClass != 0) {
    ObjCClass objCClass = ObjCClass.toObjCClass(superClass);
    if (!objCClass.isCustom()) {
      nativeSuper = superClass;
      break;
    }
    superClass = ObjCRuntime.class_getSuperclass(superClass);
  }
  if (nativeSuper == 0) {
    throw new Error("Couldn't find native super class for "
        + VM.newStringUTF(ObjCRuntime.class_getName(cls)));
  }
  synchronized (customClassToNativeSuper) {
    customClassToNativeSuper.put(cls, nativeSuper);
  }
}
origin: com.gluonhq/robovm-objc

/**
 * Creates a new instance of the specified {@link ObjCClass}. If
 * {@code makePeer == true} this method MUST be called while the
 * {@link #objcBridgeLock} is held.
 */
@SuppressWarnings("unchecked")
private static <T extends ObjCObject> T createInstance(ObjCClass objCClass, long handle, int afterMarshaledFlags,
    boolean makePeer) {
  Class<T> c = (Class<T>) objCClass.getType();
  T o = VM.allocateObject(c);
  o.setHandle(handle);
  if (makePeer) {
    setPeerObject(handle, o);
  }
  if (objCClass.isCustom()) {
    VM.setBoolean(VM.getObjectAddress(o) + CUSTOM_CLASS_OFFSET, true);
  }
  o.afterMarshaled(afterMarshaledFlags);
  return o;
}
org.robovm.objcObjCClassisCustom

Popular methods of ObjCClass

  • getByType
  • getHandle
  • getName
  • getType
  • registerCustomClass
  • <init>
  • findCallbacks
  • getByNameNotLoaded
  • getCallbacks
  • getCustomClassName
  • getFromObject
  • getProtocols
  • getFromObject,
  • getProtocols,
  • isObjCProxy,
  • register,
  • toObjCClass

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • findViewById (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • IsNull (org.hamcrest.core)
    Is the value null?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now