com.github.mustachejava.reflect
Class ReflectionWrapper

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

public class ReflectionWrapper
extends GuardedWrapper

Used for evaluating values at a callsite


Field Summary
protected  java.lang.Object[] arguments
           
protected  java.lang.reflect.Field field
           
protected  java.lang.reflect.Method method
           
protected  int scopeIndex
           
protected  Wrapper[] wrappers
           
 
Fields inherited from class com.github.mustachejava.reflect.GuardedWrapper
guard
 
Constructor Summary
ReflectionWrapper(int scopeIndex, Wrapper[] wrappers, com.google.common.base.Predicate<java.lang.Object[]>[] guard, java.lang.reflect.AccessibleObject method, java.lang.Object[] arguments, ObjectHandler oh)
           
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  java.lang.Object unwrap(java.lang.Object[] scopes)
           
 
Methods inherited from class com.github.mustachejava.reflect.GuardedWrapper
equals, guardCall, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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
Constructor Detail

ReflectionWrapper

public ReflectionWrapper(int scopeIndex,
                         Wrapper[] wrappers,
                         com.google.common.base.Predicate<java.lang.Object[]>[] guard,
                         java.lang.reflect.AccessibleObject method,
                         java.lang.Object[] arguments,
                         ObjectHandler oh)

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
Overrides:
call in class GuardedWrapper
Throws:
GuardException

unwrap

protected java.lang.Object unwrap(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.