com.github.mustachejava.reflect
Class ReflectionWrapper

java.lang.Object
  extended by com.github.mustachejava.reflect.ReflectionWrapper
All Implemented Interfaces:
Wrapper

public class ReflectionWrapper
extends java.lang.Object
implements Wrapper

Used for evaluating values at a callsite


Field Summary
protected  java.lang.Object[] arguments
           
protected  java.lang.reflect.Field field
           
protected  java.lang.Class[] guard
           
protected  java.lang.reflect.Method method
           
protected  int scopeIndex
           
protected  Wrapper[] wrappers
           
 
Constructor Summary
ReflectionWrapper(int scopeIndex, Wrapper[] wrappers, java.lang.Class[] guard, java.lang.reflect.AccessibleObject method, java.lang.Object[] arguments)
           
ReflectionWrapper(ReflectionWrapper rw)
           
 
Method Summary
 java.lang.Object call(java.lang.Object[] scopes)
           
 java.lang.Object[] getArguments()
           
 java.lang.reflect.Field getField()
           
 java.lang.reflect.Method getMethod()
           
protected  void guardCall(java.lang.Object[] scopes)
           
protected  java.lang.Object unwrap(java.lang.Object[] scopes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scopeIndex

protected int scopeIndex

wrappers

protected Wrapper[] wrappers

method

protected final java.lang.reflect.Method method

field

protected final java.lang.reflect.Field field

arguments

protected final java.lang.Object[] arguments

guard

protected final java.lang.Class[] guard
Constructor Detail

ReflectionWrapper

public ReflectionWrapper(int scopeIndex,
                         Wrapper[] wrappers,
                         java.lang.Class[] guard,
                         java.lang.reflect.AccessibleObject method,
                         java.lang.Object[] arguments)

ReflectionWrapper

public ReflectionWrapper(ReflectionWrapper rw)
Method Detail

call

public java.lang.Object call(java.lang.Object[] scopes)
                      throws GuardException
Specified by:
call in interface Wrapper
Throws:
GuardException

unwrap

protected java.lang.Object unwrap(java.lang.Object[] scopes)
                           throws GuardException
Throws:
GuardException

guardCall

protected void guardCall(java.lang.Object[] scopes)
                  throws GuardException
Throws:
GuardException

getMethod

public java.lang.reflect.Method getMethod()

getField

public java.lang.reflect.Field getField()

getArguments

public java.lang.Object[] getArguments()


Copyright © 2012. All Rights Reserved.