com.lexicalscope.fluentreflection
Interface FluentMember

All Superinterfaces:
FluentAnnotated
All Known Subinterfaces:
FluentConstructor<T>, FluentField, FluentMethod

public interface FluentMember
extends FluentAnnotated

Reflection information about a class member, such as a field or method.

Author:
tim

Method Summary
 int argCount()
          The number of arguments that the member takes when called
 List<FluentClass<?>> args()
          The types of the arguments used when the member is called
<T> FluentCall<T>
as(Class<T> returnType)
          Used to cast the result of a call on this member
 FluentObject<?> call(Object... args)
          Call the member using the given arguments
 Object callRaw(Object... args)
          Call the member using the given arguments
 FluentClass<?> declarer()
          Type that declares the member
 boolean isFinal()
          true iff the member is final
 boolean isStatic()
          true iff the member is static
 Member member()
          The underlying member (class, field, constructor)
 String name()
          The name of the member.
 String property()
          The name of the member as a property name.
 FluentClass<?> type()
          The type of the member (the type of the field, or the return type of the method)
 Visibility visibility()
          the visibility of the member
 
Methods inherited from interface com.lexicalscope.fluentreflection.FluentAnnotated
annotatedWith, annotatedWith, annotation, annotation
 

Method Detail

declarer

FluentClass<?> declarer()
Type that declares the member

Returns:
type that declares the member

member

Member member()
The underlying member (class, field, constructor)

Returns:
the underlying member

name

String name()
The name of the member. Constructors are called <init>

Returns:
the name of the member

property

String property()
The name of the member as a property name. Bean-style prefixes will be stripped from the member name.

Returns:
the name of the member as a property

argCount

int argCount()
The number of arguments that the member takes when called

Returns:
the number of arguments that the member takes when called

args

List<FluentClass<?>> args()
The types of the arguments used when the member is called

Returns:
the types of the arguments used when the member is called

type

FluentClass<?> type()
The type of the member (the type of the field, or the return type of the method)

Returns:
the type of the member

callRaw

Object callRaw(Object... args)
Call the member using the given arguments

Parameters:
args - the arguments to use in the call
Returns:
the value returned by the call

call

FluentObject<?> call(Object... args)
Call the member using the given arguments

Parameters:
args - the arguments to use in the call
Returns:
the value returned by the call wrapped in a fluent reflection wrapper

as

<T> FluentCall<T> as(Class<T> returnType)
Used to cast the result of a call on this member

Parameters:
returnType - the type expected as the result of the call
Returns:
object that can offers the call with the result cast to the given type

isStatic

boolean isStatic()
true iff the member is static

Returns:
true iff the member is static

isFinal

boolean isFinal()
true iff the member is final

Returns:
true iff the member is final

visibility

Visibility visibility()
the visibility of the member

Returns:
the visibility of the member


Copyright © 2011-2012 lexicalscope. All Rights Reserved.