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

How to use
getClasses
method
in
java.lang.Class

Best Java code snippets using java.lang.Class.getClasses (Showing top 20 results out of 2,565)

origin: google/j2objc

  /**
   * Only called reflectively. Do not use programmatically.
   */
  public Enclosed(Class<?> klass, RunnerBuilder builder) throws Throwable {
    super(builder, klass, klass.getClasses());
  }
}
origin: spring-projects/spring-loaded

public static Class[] callGetClasses(Class thiz)
{
  return thiz.getClasses();
}
origin: junit-team/junit4

/**
 * Only called reflectively. Do not use programmatically.
 */
public Enclosed(Class<?> klass, RunnerBuilder builder) throws Throwable {
  super(builder, klass, filterAbstractClasses(klass.getClasses()));
}

origin: org.testng/testng

private void registerClass(Class<?> cl, XmlClass xmlClass) {
 m_map.put(cl, xmlClass);
 if (includeNestedClasses) {
  for (Class<?> c : cl.getClasses()) {
   if (!m_map.containsKey(c)) {
    registerClass(c, xmlClass);
   }
  }
 }
}
origin: stackoverflow.com

 Class serviceManagerClass = Class.forName("android.os.ServiceManager");
Method getService = serviceManagerClass.getMethod("getService", String.class);
IBinder retbinder = (IBinder) getService.invoke(serviceManagerClass, "statusbar");
Class statusBarClass = Class.forName(retbinder.getInterfaceDescriptor());
Object statusBarObject = statusBarClass.getClasses()[0].getMethod("asInterface", IBinder.class).invoke(null, new Object[] { retbinder });
Method clearAll = statusBarClass.getMethod("toggleRecentApps");
clearAll.setAccessible(true);
clearAll.invoke(statusBarObject);
origin: cbeust/testng

private void registerClass(Class<?> cl, XmlClass xmlClass) {
 m_map.put(cl, xmlClass);
 if (includeNestedClasses) {
  for (Class<?> c : cl.getClasses()) {
   if (!m_map.containsKey(c)) {
    registerClass(c, xmlClass);
   }
  }
 }
}
origin: robolectric/robolectric

private void addRClassValues(PackageResourceTable resourceTable, Class<?> rClass) {
 for (Class innerClass : rClass.getClasses()) {
  String resourceType = innerClass.getSimpleName();
  if (!resourceType.equals("styleable")) {
   for (Field field : innerClass.getDeclaredFields()) {
    if (field.getType().equals(Integer.TYPE) && Modifier.isStatic(field.getModifiers())) {
     int id;
     try {
      id = field.getInt(null);
     } catch (IllegalAccessException e) {
      throw new RuntimeException(e);
     }
     String resourceName = field.getName();
     resourceTable.addResource(id, resourceType, resourceName);
    }
   }
  }
 }
}
origin: plantuml/plantuml

public TeXIconBuilder(String tex, Color foregroundColor) throws ClassNotFoundException, NoSuchMethodException,
    SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException,
    InvocationTargetException {
  // TeXFormula formula = new TeXFormula(latex);
  final Class<?> clTeXFormula = Class.forName("org.scilab.forge.jlatexmath.TeXFormula");
  final Object formula = clTeXFormula.getConstructor(String.class).newInstance(tex);
  // TeXIcon icon = formula.new TeXIconBuilder().setStyle(TeXConstants.STYLE_DISPLAY).setSize(20).build();
  final Class<?> clTeXIconBuilder = clTeXFormula.getClasses()[0];
  final Object builder = clTeXIconBuilder.getConstructors()[0].newInstance(formula);
  clTeXIconBuilder.getMethod("setStyle", int.class).invoke(builder, 0);
  clTeXIconBuilder.getMethod("setSize", float.class).invoke(builder, (float) 20);
  icon = (Icon) clTeXIconBuilder.getMethod("build").invoke(builder);
  final int margin = 1;
  final Insets insets = new Insets(margin, margin, margin, margin);
  icon.getClass().getMethod("setInsets", insets.getClass()).invoke(icon, insets);
  icon.getClass().getMethod("setForeground", foregroundColor.getClass()).invoke(icon, foregroundColor);
}
origin: stackoverflow.com

r = Class.forName(packageName + ".R");
Class[] classes = r.getClasses();
Class desireClass = null;
origin: robolectric/robolectric

for (Class innerClass : rClass.getClasses()) {
 if (innerClass.getSimpleName().equals("styleable")) {
origin: stackoverflow.com

Object serviceManagerObject;
telephonyClass = Class.forName(telephonyName);
telephonyStubClass = telephonyClass.getClasses()[0];
serviceManagerClass = Class.forName(serviceManagerName);
serviceManagerNativeClass = Class.forName(serviceManagerNativeName);
origin: querydsl/querydsl

  @Test
  public void iteration() throws SecurityException, NoSuchMethodException {
    List<Class<?>> types = new ArrayList<Class<?>>();
//        types.addAll(Arrays.<Class<?>>asList(Alias.class.getClasses()));
    types.addAll(Arrays.asList(Operation.class.getClasses()));
    types.addAll(Arrays.asList(Path.class.getClasses()));
    for (Class<?> innerType : types) {
      if (!innerType.isInterface() && Expression.class.isAssignableFrom(innerType)) {
        Visitor.class.getDeclaredMethod("visit",innerType);
      }
    }
    System.out.println("successful for " + types.size() + " types");
  }

origin: jdbi/jdbi

  private Optional<Method> getImplementation(Class<?> type, Method method) {
    return Stream.of(type.getClasses())
        .filter(c -> c.getSimpleName().equals("DefaultImpls"))
        .flatMap(c -> Stream.of(c.getMethods()).filter(m -> m.getName().equals(method.getName())))
        .findAny();
  }
};
origin: neo4j/neo4j

for ( Class<?> cmd : Command.class.getClasses() )
for ( Class<?> cmd : IndexCommand.class.getClasses() )
origin: querydsl/querydsl

@Test
public void testExpr() {
  for (Class<?> cl : Expression.class.getClasses()) {
    assertTrue(cl.getName(), Expression.class.isAssignableFrom(cl));
  }
}
origin: querydsl/querydsl

@Test
public void testPath() {
  for (Class<?> cl : Path.class.getClasses()) {
    assertTrue(cl.getName(), Path.class.isAssignableFrom(cl));
    if (!cl.isInterface()) {
      assertTrue(cl.getName(), Expression.class.isAssignableFrom(cl));
    }
  }
}
origin: querydsl/querydsl

@Test
public void test() {
  GenericExporter exporter = new GenericExporter();
  exporter.setTargetFolder(new File("target/" + getClass().getSimpleName()));
  exporter.export(getClass().getClasses());
}
origin: querydsl/querydsl

@Test
public void test() {
  GenericExporter exporter = new GenericExporter();
  exporter.setTargetFolder(new File("target/" + getClass().getSimpleName()));
  exporter.export(getClass().getClasses());
}
origin: querydsl/querydsl

@SuppressWarnings("unchecked")
@Test
public void patternAvailability() throws IllegalArgumentException, IllegalAccessException {
  Templates ops = new DummyTemplates();
  Set<Field> missing = new HashSet<Field>();
  for (Field field : Ops.class.getFields()) {
    if (field.getType().equals(Operator.class)) {
      Operator op = (Operator) field.get(null);
      if (ops.getTemplate(op) == null) {
        missing.add(field);
      }
    }
  }
  for (Class<?> cl : Ops.class.getClasses()) {
    for (Field field : cl.getFields()) {
      if (field.getType().equals(Operator.class)) {
        Operator op = (Operator) field.get(null);
        if (ops.getTemplate(op) == null) {
          missing.add(field);
        }
      }
    }
  }
  if (!missing.isEmpty()) {
    for (Field field : missing) {
      System.err.println(field.getName());
    }
    fail();
  }
}
origin: querydsl/querydsl

  @Test
  public void export() {
    GenericExporter exporter = new GenericExporter();
    exporter.setTargetFolder(new File("target/Generic2Test"));
    exporter.export(Generic2Test.class.getClasses());
  }
}
java.langClassgetClasses

Javadoc

Returns an array containing 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.

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
    Finds a resource with a given name. The rules for searching resources associated with a given class
  • 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
  • Best plugins for Eclipse
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