com.lexicalscope.fluentreflection
Interface FluentClass<T>

Type Parameters:
T - the underlying type being reflected on
All Superinterfaces:
FluentAccess<T>, FluentAnnotated

public interface FluentClass<T>
extends FluentAccess<T>

Reflection information about a class.

Author:
tim

Method Summary
 FluentClass<?> asType(org.hamcrest.Matcher<FluentClass<?>> typeMatcher)
          Get this type as the first matching the supplied matcher.
 FluentObject<T> construct(Object... args)
          Construct an object of the type under reflection
 FluentConstructor<T> constructor(org.hamcrest.Matcher<? super FluentConstructor<?>> constructorMatcher)
          Find the first constructor method matching the supplied matcher
 List<FluentConstructor<T>> constructors(org.hamcrest.Matcher<? super FluentConstructor<?>> constructorMatcher)
          Find all constructors matching the supplied matcher
 T constructRaw(Object... args)
          Construct an object of the type under reflection
 boolean isInterface()
          True iff the type is an interface
 FluentMethod staticMethod(org.hamcrest.Matcher<? super FluentMethod> methodNamed)
          Find the first static method matching the supplied matcher
 
Methods inherited from interface com.lexicalscope.fluentreflection.FluentAccess
assignableFromObject, assignableTo, boxedType, call, call, canBeBoxed, canBeUnboxed, classUnderReflection, declaredFields, declaredMethods, field, fields, fields, interfaces, isPrimitive, isType, isUnboxable, method, method, methods, methods, name, simpleName, superclasses, type, typeArgument, unboxedType
 
Methods inherited from interface com.lexicalscope.fluentreflection.FluentAnnotated
annotatedWith, annotatedWith, annotation, annotation
 

Method Detail

isInterface

boolean isInterface()
True iff the type is an interface

Returns:
True iff the type is an interface

asType

FluentClass<?> asType(org.hamcrest.Matcher<FluentClass<?>> typeMatcher)
Get this type as the first matching the supplied matcher. This type and then the supertypes are searched

Parameters:
typeMatcher - matcher on the required type
Returns:
first matching the matcher

constructRaw

T constructRaw(Object... args)
Construct an object of the type under reflection

Returns:
the constructed object

construct

FluentObject<T> construct(Object... args)
Construct an object of the type under reflection

Returns:
a reflection wrapper around the constructed object

constructors

List<FluentConstructor<T>> constructors(org.hamcrest.Matcher<? super FluentConstructor<?>> constructorMatcher)
Find all constructors matching the supplied matcher

Parameters:
constructorMatcher - matches the constructors
Returns:
all constructors matching the supplied matcher

constructor

FluentConstructor<T> constructor(org.hamcrest.Matcher<? super FluentConstructor<?>> constructorMatcher)
Find the first constructor method matching the supplied matcher

Parameters:
constructorMatcher - matches the method
Returns:
The constructor matching the supplied matcher

staticMethod

FluentMethod staticMethod(org.hamcrest.Matcher<? super FluentMethod> methodNamed)
Find the first static method matching the supplied matcher

Parameters:
methodNamed - matches the method
Returns:
The method matching the supplied matcher


Copyright © 2011-2012 lexicalscope. All Rights Reserved.