Tabnine Logo
Class.getClassCache
Code IndexAdd Tabnine to your IDE (free)

How to use
getClassCache
method
in
java.lang.Class

Best Java code snippets using java.lang.Class.getClassCache (Showing top 20 results out of 315)

origin: robovm/robovm

/**
 * Returns an array containing {@code Class} objects for all public classes
 * and interfaces that are members of this class. This includes public
 * members inherited from super classes and interfaces. If there are no such
 * class members or if this object represents a primitive type then an array
 * of length 0 is returned.
 *
 * @return the public class members of the class represented by this object.
 */
public Class<?>[] getClasses() {
  return getClassCache().getClasses(true);
}
origin: robovm/robovm

/**
 * Returns an array containing all the annotations of this class. If there are no annotations
 * then an empty array is returned.
 *
 * @see #getDeclaredAnnotations()
 */
public Annotation[] getAnnotations() {
  return getClassCache().getAnnotations(true);
}
origin: robovm/robovm

/**
 * Returns the annotations that are directly defined on the class
 * represented by this {@code Class}. Annotations that are inherited are not
 * included in the result. If there are no annotations at all, an empty
 * array is returned.
 *
 * @see #getAnnotations()
 */
public Annotation[] getDeclaredAnnotations() {
  return getClassCache().getDeclaredAnnotations(true);
}
origin: robovm/robovm

/**
 * Returns an array containing {@code Constructor} objects for all
 * constructors declared in the class represented by this {@code Class}. If
 * there are no constructors or if this {@code Class} represents an array
 * class, a primitive type, or void then an empty array is returned.
 *
 * @see #getConstructors()
 */
public Constructor<?>[] getDeclaredConstructors() {
  return getClassCache().getDeclaredConstructors(true);
}
origin: robovm/robovm

/**
 * Returns the name of the class represented by this {@code Class}. For a
 * description of the format which is used, see the class definition of
 * {@link Class}.
 */
public String getName() {
  return getClassCache().getName();
}
origin: robovm/robovm

private List<Class<?>> buildClassesList(List<Class<?>> result, Set<String> seen, boolean publicOnly) {
  for (Class<?> c = clazz; c != null; c = c.getSuperclass()) {
    for (Class<?> f : c.getClassCache().getDeclaredClasses(false, publicOnly)) {
      String s = f.toString();
      if (!seen.contains(s)) {
        result.add(f);
        seen.add(s);
      }
    }
  }
  return result;
}

origin: robovm/robovm

/**
 * Returns an array containing {@code Constructor} objects for all public
 * constructors for this {@code Class}. If there
 * are no public constructors or if this {@code Class} represents an array
 * class, a primitive type or void then an empty array is returned.
 *
 * @see #getDeclaredConstructors()
 */
public Constructor<?>[] getConstructors() {
  return getClassCache().getDeclaredPublicConstructors(true);
}
origin: robovm/robovm

/**
 * Returns an array containing {@code Method} objects for all methods
 * declared in the class represented by this {@code Class}. If there are no
 * methods or if this {@code Class} represents an array class, a primitive
 * type or void then an empty array is returned.
 *
 * @see #getMethods()
 */
public Method[] getDeclaredMethods() {
  return getClassCache().getDeclaredMethods(true);
}
origin: robovm/robovm

/**
 * Returns a {@code Field} object for the field with the given name
 * which is declared in the class represented by this {@code Class}.
 *
 * @throws NoSuchFieldException if the requested field can not be found.
 * @see #getField(String)
 */
public Field getDeclaredField(String name) throws NoSuchFieldException {
  if (name == null) {
    throw new NullPointerException("name == null");
  }
  return getClassCache().getDeclaredField(true, name);        
}
origin: robovm/robovm

/**
 * Returns an array containing {@code Class} objects for all classes and
 * interfaces that are declared as members of the class which this {@code
 * Class} represents. If there are no classes or interfaces declared or if
 * this class represents an array class, a primitive type or void, then an
 * empty array is returned.
 */
public Class<?>[] getDeclaredClasses() {
  return getClassCache().getDeclaredClasses(true);
}
origin: robovm/robovm

/**
 * Returns an array containing {@code Field} objects for all fields declared
 * in the class represented by this {@code Class}. If there are no fields or
 * if this {@code Class} represents an array class, a primitive type or void
 * then an empty array is returned.
 *
 * @see #getFields()
 */
public Field[] getDeclaredFields() {
  return getClassCache().getDeclaredFields(true);
}
origin: robovm/robovm

/**
 * Returns an array containing {@code Field} objects for all public fields
 * for the class C represented by this {@code Class}. Fields may be declared
 * in C, the interfaces it implements or in the superclasses of C. The
 * elements in the returned array are in no particular order.
 *
 * <p>If there are no public fields or if this class represents an array class,
 * a primitive type or {@code void} then an empty array is returned.
 *
 * @see #getDeclaredFields()
 */
public Field[] getFields() {
  return getClassCache().getFields(true);
}
origin: robovm/robovm

/**
 * Returns a {@code Constructor} object which represents the public
 * constructor matching the given parameter types.
 * {@code (Class[]) null} is equivalent to the empty array.
 *
 * <p>See {@link #getMethod} for details of the search order.
 * Use {@link #getDeclaredConstructor} if you don't want to search superclasses.
 *
 * @throws NoSuchMethodException
 *             if the constructor can not be found.
 */
@SuppressWarnings("unchecked")
public Constructor<T> getConstructor(Class<?>... parameterTypes) throws NoSuchMethodException {
  return getClassCache().getConstructor(true, parameterTypes);
}
origin: robovm/robovm

/**
 * Returns an array containing {@code Method} objects for all public methods
 * for the class C represented by this {@code Class}. Methods may be
 * declared in C, the interfaces it implements or in the superclasses of C.
 * The elements in the returned array are in no particular order.
 *
 * <p>If there are no public methods or if this {@code Class} represents a
 * primitive type or {@code void} then an empty array is returned.
 *
 * @see #getDeclaredMethods()
 */
public Method[] getMethods() {
  return getClassCache().getMethods(true);
}
origin: robovm/robovm

private List<Field> buildFieldsList(List<Field> result, Set<String> seen, boolean publicOnly) {
  for (Class<?> c = clazz; c != null; c = c.getSuperclass()) {
    for (Field f : c.getClassCache().getDeclaredFields(false, publicOnly)) {
      String s = f.toString();
      if (!seen.contains(s)) {
        result.add(f);
        seen.add(s);
      }
    }
    for (Class<?> intf : c.getInterfaces()) {
      intf.getClassCache().buildFieldsList(result, seen, publicOnly);
    }
  }
  return result;
}
origin: robovm/robovm

/**
 * Returns the annotation if it exists.
 */
private <A extends Annotation> A getDeclaredAnnotation(Class<A> annotationClass) {
  if (annotationClass == null) {
    throw new NullPointerException("annotationClass == null");
  }
  Annotation[] annos = getClassCache().getDeclaredAnnotations(false);
  for (int i = annos.length-1; i >= 0; --i) {
    if (annos[i].annotationType() == annotationClass) {
      return (A) annos[i];
    }
  }
  return null;
}
origin: robovm/robovm

/**
 * Returns a {@code Constructor} object which represents the constructor
 * matching the given parameter types that is declared by the class
 * represented by this {@code Class}.
 * {@code (Class[]) null} is equivalent to the empty array.
 *
 * <p>Use {@link #getConstructor} if you want to search superclasses.
 *
 * @throws NoSuchMethodException
 *             if the requested constructor can not be found.
 */
@SuppressWarnings("unchecked")
public Constructor<T> getDeclaredConstructor(Class<?>... parameterTypes)
    throws NoSuchMethodException {
  return getClassCache().getDeclaredConstructor(true, parameterTypes);
}
origin: robovm/robovm

/**
 * Returns a {@code Field} object which represents the public field with the
 * given name. This method first searches the class C represented by
 * this {@code Class}, then the interfaces implemented by C and finally the
 * superclasses of C.
 *
 * @throws NoSuchFieldException
 *             if the field can not be found.
 * @see #getDeclaredField(String)
 */
public Field getField(String name) throws NoSuchFieldException {
  if (name == null) {
    throw new NullPointerException("name == null");
  }
  return getClassCache().getField(true, name);
}
origin: robovm/robovm

/**
 * Returns a {@code Method} object which represents the method matching the
 * given name and parameter types that is declared by the class
 * represented by this {@code Class}.
 * {@code (Class[]) null} is equivalent to the empty array.
 *
 * <p>See {@link #getMethod} if you want to search superclasses.
 *
 * @throws NoSuchMethodException
 *             if the requested method can not be found.
 * @throws NullPointerException
 *             if {@code name} is {@code null}.
 */
public Method getDeclaredMethod(String name, Class<?>... parameterTypes)
    throws NoSuchMethodException {
  return getClassCache().getDeclaredMethod(true, name, parameterTypes);
}
origin: robovm/robovm

private List<Method> buildMethodsList(List<Method> result, Set<MethodHashKey> seen, boolean publicOnly) {
  for (Class<?> c = clazz; c != null; c = c.getSuperclass()) {
    for (Method m : c.getClassCache().getDeclaredMethods(false, publicOnly)) {
      MethodHashKey key = new MethodHashKey(m);
      if (!seen.contains(key)) {
        result.add(m);
        seen.add(key);
      }
    }
  }
  
  for (Class<?> c = clazz; c != null; c = c.getSuperclass()) {
    for (Class<?> intf : c.getInterfaces()) {
      intf.getClassCache().buildMethodsList(result, seen, publicOnly);
    }
  }
  return result;
}

java.langClassgetClassCache

Popular methods of Class

  • getName
    Returns the name of the class represented by this Class. For a description of the format which is us
  • getSimpleName
  • getClassLoader
  • isAssignableFrom
    Determines if the class or interface represented by this Class object is either the same as, or is a
  • forName
    Returns the Class object associated with the class or interface with the given string name, using th
  • newInstance
    Returns a new instance of the class represented by this Class, created by invoking the default (that
  • getMethod
    Returns a Method object that reflects the specified public member method of the class or interface r
  • getResourceAsStream
  • getSuperclass
    Returns the Class representing the superclass of the entity (class, interface, primitive type or voi
  • getConstructor
  • cast
    Casts an object to the class or interface represented by this Class object.
  • isInstance
  • cast,
  • isInstance,
  • getCanonicalName,
  • getDeclaredField,
  • isArray,
  • getAnnotation,
  • getDeclaredFields,
  • getResource,
  • getDeclaredMethod,
  • getMethods

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • notifyDataSetChanged (ArrayAdapter)
  • getSharedPreferences (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • JFileChooser (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top Vim plugins
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