Tabnine Logo
ObjCClass.isCustom
Code IndexAdd Tabnine 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)

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
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setRequestProperty (URLConnection)
  • startActivity (Activity)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • JTextField (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Join (org.hibernate.mapping)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now