|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- the underlying type being reflected onpublic interface FluentAccess<T>
Reflection access to a class or an object.
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)
Is the parameter assignable from this class? |
FluentClass<T> |
boxedType()
If this class is a primitive type return the wrapped type |
FluentObject<?> |
call(org.hamcrest.Matcher<? super FluentMethod> methodMatcher,
Object... args)
Call a method using a matcher, if one can be found that can also be called with the given arguments |
FluentObject<?> |
call(String name,
Object... args)
Call a method by name if one can be found that can be called with the given arguments |
boolean |
canBeBoxed(Class<?> from)
Determines if this Class object is a primitive wrapper
type, and the unwrapped type can be assigned from the parameter. |
boolean |
canBeUnboxed(Class<?> from)
Determines if this Class object is a primitive
type, and the wrapped type can be assigned from the parameter. |
Class<T> |
classUnderReflection()
Obtain the class being reflected |
List<FluentField> |
declaredFields()
All fields declared by this type |
List<FluentMethod> |
declaredMethods()
All methods declared by this type |
FluentField |
field(ReflectionMatcher<FluentMember> fieldMatcher)
Find field matching the supplied matcher |
List<FluentField> |
fields()
All fields |
List<FluentField> |
fields(ReflectionMatcher<? super FluentField> fieldMatcher)
Find all fields matching the supplied matcher |
List<FluentClass<?>> |
interfaces()
All interfaces implemented by this type |
boolean |
isPrimitive()
Determines if this Class object represents a
primitive type. |
boolean |
isType(ReflectionMatcher<FluentClass<?>> typeMatcher)
Does this type or any of its implemented types match the given matcher? |
boolean |
isUnboxable()
Determines if this Class object represents the wrapper of a
primitive type. |
FluentMethod |
method(org.hamcrest.Matcher<? super FluentMethod> methodMatcher)
Find the first method matching the supplied matcher |
FluentMethod |
method(String name)
Find the first method with the given name |
List<FluentMethod> |
methods()
All methods |
List<FluentMethod> |
methods(org.hamcrest.Matcher<? super FluentMethod> methodMatcher)
Find all methods matching the supplied matcher |
String |
name()
|
String |
simpleName()
|
List<FluentClass<?>> |
superclasses()
Return the list of all superclasses with the immediate parent first |
Type |
type()
|
FluentClass<?> |
typeArgument(int typeParameter)
|
FluentClass<T> |
unboxedType()
If this class is a primitive wrapper type return the unwrapped type |
Methods inherited from interface com.lexicalscope.fluentreflection.FluentAnnotated |
---|
annotatedWith, annotatedWith, annotation, annotation |
Method Detail |
---|
Class<T> classUnderReflection()
List<FluentClass<?>> interfaces()
List<FluentClass<?>> superclasses()
boolean isType(ReflectionMatcher<FluentClass<?>> typeMatcher)
typeMatcher
- matcher on the required type
List<FluentMethod> methods()
List<FluentMethod> declaredMethods()
List<FluentMethod> methods(org.hamcrest.Matcher<? super FluentMethod> methodMatcher)
methodMatcher
- matches the methods
FluentMethod method(org.hamcrest.Matcher<? super FluentMethod> methodMatcher)
methodMatcher
- matches the method
FluentMethod method(String name)
name
- the name of the method
FluentObject<?> call(String name, Object... args)
name
- the name of the methodargs
- the arguments of the method
FluentObject<?> call(org.hamcrest.Matcher<? super FluentMethod> methodMatcher, Object... args)
methodMatcher
- matches the methodargs
- the arguments of the method
List<FluentField> fields()
List<FluentField> fields(ReflectionMatcher<? super FluentField> fieldMatcher)
fieldMatcher
- matches the field
List<FluentField> declaredFields()
FluentField field(ReflectionMatcher<FluentMember> fieldMatcher)
fieldMatcher
- matches the field
boolean isPrimitive()
Class
object represents a
primitive type.
boolean isUnboxable()
Class
object represents the wrapper of a
primitive type.
boolean canBeBoxed(Class<?> from)
Class
object is a primitive wrapper
type, and the unwrapped type can be assigned from the parameter.
Can the parameter be boxed into this type?
from
- the type that maybe be assignable to this type
boolean canBeUnboxed(Class<?> from)
Class
object is a primitive
type, and the wrapped type can be assigned from the parameter.
Can the parameter be unboxed into this type?
from
- the type that maybe be assignable to this type
FluentClass<T> boxedType()
FluentClass<T> unboxedType()
boolean assignableFromObject(Object value)
value
- the value that might be assigned
boolean assignableTo(Class<?> klass)
klass
- the class that may be assignable to
FluentClass<?> typeArgument(int typeParameter)
String name()
String simpleName()
Type type()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |