|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ReflectedClass<T>
Method Summary | |
---|---|
boolean |
assignableFromObject(Object value)
True if the given object can be assigned to a variable of the type represented by this class |
boolean |
assignableTo(Class<?> klass)
|
ReflectedClass<?> |
asType(org.hamcrest.Matcher<ReflectedClass<?>> typeMatcher)
Get this type as the first matching the supplied matcher. |
ReflectedClass<T> |
boxedType()
|
ReflectedObject<T> |
construct(Object... args)
Construct an object of the type under reflection |
ReflectedConstructor<T> |
constructor(org.hamcrest.Matcher<? super ReflectedConstructor<?>> constructorMatcher)
Find the first constructor method matching the supplied matcher |
List<ReflectedConstructor<T>> |
constructors(org.hamcrest.Matcher<? super ReflectedConstructor<?>> constructorMatcher)
Find all constructors matching the supplied matcher |
T |
constructRaw(Object... args)
Construct an object of the type under reflection |
List<ReflectedClass<?>> |
interfaces()
All interfaces implemented by this type |
boolean |
isInterface()
True iff the type is an interface |
boolean |
isPrimitive()
|
boolean |
isType(ReflectionMatcher<ReflectedClass<?>> typeMatcher)
Does this type or any of its implemented types match the given matcher? |
String |
name()
|
String |
simpleName()
|
ReflectedMethod |
staticMethod(org.hamcrest.Matcher<? super ReflectedMethod> methodNamed)
Find the first static method matching the supplied matcher |
List<ReflectedClass<?>> |
superclasses()
Return the list of all superclasses with the immediate parent first |
Type |
type()
|
ReflectedClass<?> |
typeArgument(int typeParameter)
|
Methods inherited from interface com.lexicalscope.fluentreflection.ReflectedType |
---|
canBeBoxed, canBeUnboxed, classUnderReflection, declaredMethods, method, method, methods, methods |
Methods inherited from interface com.lexicalscope.fluentreflection.ReflectedAnnotated |
---|
annotatedWith, annotation, annotation |
Method Detail |
---|
boolean isInterface()
List<ReflectedClass<?>> interfaces()
List<ReflectedClass<?>> superclasses()
ReflectedClass<?> asType(org.hamcrest.Matcher<ReflectedClass<?>> typeMatcher)
typeMatcher
- matcher on the required type
boolean isType(ReflectionMatcher<ReflectedClass<?>> typeMatcher)
typeMatcher
- matcher on the required type
T constructRaw(Object... args)
ReflectedObject<T> construct(Object... args)
List<ReflectedConstructor<T>> constructors(org.hamcrest.Matcher<? super ReflectedConstructor<?>> constructorMatcher)
constructorMatcher
- matches the constructors
ReflectedConstructor<T> constructor(org.hamcrest.Matcher<? super ReflectedConstructor<?>> constructorMatcher)
constructorMatcher
- matches the method
ReflectedMethod staticMethod(org.hamcrest.Matcher<? super ReflectedMethod> methodNamed)
methodNamed
- matches the method
boolean assignableFromObject(Object value)
value
- the value that might be assigned
boolean assignableTo(Class<?> klass)
ReflectedClass<?> typeArgument(int typeParameter)
boolean isPrimitive()
ReflectedClass<T> boxedType()
String name()
String simpleName()
Type type()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |