Package fj
Class Class<T>
- java.lang.Object
-
- fj.Class<T>
-
public final class Class<T> extends java.lang.Object
A wrapper for aClass
that provides additional methods.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<T>
clas()
Returns the underlying class.static <T> Class<T>
clas(java.lang.Class<T> c)
Constructs a class from the given argument.Tree<java.lang.reflect.Type>
classParameters()
Provides this class's type parameter information as a Tree of the type expression.List<Class<? super T>>
inheritance()
Returns the inheritance hierarchy of this class.List<Tree<java.lang.reflect.Type>>
interfaceParameters()
Provides this class's interface type parameter information as a list of trees.Tree<java.lang.reflect.Type>
superclassParameters()
Provides this class's superclass type parameter information as a Tree of the type expression.static Tree<java.lang.reflect.Type>
typeParameterTree(java.lang.reflect.Type t)
Provides type parameter information as a Tree of the type expression.
-
-
-
Field Detail
-
c
private final java.lang.Class<T> c
-
-
Constructor Detail
-
Class
private Class(java.lang.Class<T> c)
-
-
Method Detail
-
inheritance
public List<Class<? super T>> inheritance()
Returns the inheritance hierarchy of this class.- Returns:
- The inheritance hierarchy of this class.
-
classParameters
public Tree<java.lang.reflect.Type> classParameters()
Provides this class's type parameter information as a Tree of the type expression. Only descends into Parameterized classes. Non-abstract classes, or classes that don't implement an interface, are treated as raw types. Arrays, Type Variables, and Wildcards are treated as opaque Types.- Returns:
- The rose tree representing the type expression for this class.
-
superclassParameters
public Tree<java.lang.reflect.Type> superclassParameters()
Provides this class's superclass type parameter information as a Tree of the type expression. Only descends into Parameterized classes. Non-abstract classes, or classes that don't implement an interface, are treated as raw types. Arrays, Type Variables, and Wildcards are treated as opaque Types.- Returns:
- The Tree representing the type expression for this class's superclass.
-
interfaceParameters
public List<Tree<java.lang.reflect.Type>> interfaceParameters()
Provides this class's interface type parameter information as a list of trees.- Returns:
- A list of trees representing the type expressions for this class's interfaces.
-
typeParameterTree
public static Tree<java.lang.reflect.Type> typeParameterTree(java.lang.reflect.Type t)
Provides type parameter information as a Tree of the type expression. Only descends into Parameterized classes. Non-abstract classes, or classes that don't implement an interface, are treated as raw types. Arrays, Type Variables, and Wildcards are treated as opaque Types.- Parameters:
t
- The type (class) for which to get the generic type information.- Returns:
- Type parameter information as a rose tree of the type expression.
-
clas
public java.lang.Class<T> clas()
Returns the underlying class.- Returns:
- The underlying class.
-
clas
public static <T> Class<T> clas(java.lang.Class<T> c)
Constructs a class from the given argument.- Parameters:
c
- The argument to construct this class with.- Returns:
- A class from the given argument.
-
-