public class

ClassUtils

extends Object
java.lang.Object
   ↳ com.atlassian.plugin.util.ClassUtils

Class Overview

Class utility methods

Summary

Public Methods
static void findAllTypes(Class cls, Set<Class> types)
Finds all super classes and interfaces for a given class
static Set<Class> findAllTypes(Class cls)
Finds all super classes and interfaces for a given class
static <T> List<Class<?>> getTypeArguments(Class<T> baseClass, Class<? extends T> childClass)
Get the actual type arguments a child class has used to extend a generic base class.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static void findAllTypes (Class cls, Set<Class> types)

Finds all super classes and interfaces for a given class

Parameters
cls The class to scan
types The collected related classes found

public static Set<Class> findAllTypes (Class cls)

Finds all super classes and interfaces for a given class

Parameters
cls The class to scan
Returns
  • The collected related classes found

public static List<Class<?>> getTypeArguments (Class<T> baseClass, Class<? extends T> childClass)

Get the actual type arguments a child class has used to extend a generic base class.

Parameters
baseClass the base class
childClass the child class
Returns
  • a list of the raw classes for the actual type arguments.
Throws
IllegalArgumentException If the child class is not the base of the baseClass