com.opensymphony.xwork2.ognl.accessor
Class CompoundRootAccessor

java.lang.Object
  extended by com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor
All Implemented Interfaces:
ognl.ClassResolver, ognl.MethodAccessor, ognl.PropertyAccessor

public class CompoundRootAccessor
extends Object
implements ognl.PropertyAccessor, ognl.MethodAccessor, ognl.ClassResolver

A stack that is able to call methods on objects in the stack.

Version:
$Revision: 2056 $
Author:
$Author: rainerh $, Rainer Hermanns

Nested Class Summary
(package private) static class CompoundRootAccessor.MethodCall
           
 
Field Summary
(package private) static boolean devMode
           
private static Class[] EMPTY_CLASS_ARRAY
           
private static Map invalidMethods
           
private static Logger LOG
           
 
Constructor Summary
CompoundRootAccessor()
           
 
Method Summary
 Object callMethod(Map context, Object target, String name, Object[] objects)
           
 Object callStaticMethod(Map transientVars, Class aClass, String s, Object[] objects)
           
 Class classForName(String className, Map context)
           
private  Class[] getArgTypes(Object[] args)
           
 Object getProperty(Map context, Object target, Object name)
           
 String getSourceAccessor(ognl.OgnlContext context, Object target, Object index)
          Used by OGNl to generate bytecode
 String getSourceSetter(ognl.OgnlContext context, Object target, Object index)
          Used by OGNl to generate bytecode
static void setDevMode(String mode)
           
 void setProperty(Map context, Object target, Object name, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final Logger LOG

EMPTY_CLASS_ARRAY

private static final Class[] EMPTY_CLASS_ARRAY

invalidMethods

private static Map invalidMethods

devMode

static boolean devMode
Constructor Detail

CompoundRootAccessor

public CompoundRootAccessor()
Method Detail

getSourceAccessor

public String getSourceAccessor(ognl.OgnlContext context,
                                Object target,
                                Object index)
Used by OGNl to generate bytecode

Specified by:
getSourceAccessor in interface ognl.PropertyAccessor

getSourceSetter

public String getSourceSetter(ognl.OgnlContext context,
                              Object target,
                              Object index)
Used by OGNl to generate bytecode

Specified by:
getSourceSetter in interface ognl.PropertyAccessor

setDevMode

public static void setDevMode(String mode)

setProperty

public void setProperty(Map context,
                        Object target,
                        Object name,
                        Object value)
                 throws ognl.OgnlException
Specified by:
setProperty in interface ognl.PropertyAccessor
Throws:
ognl.OgnlException

getProperty

public Object getProperty(Map context,
                          Object target,
                          Object name)
                   throws ognl.OgnlException
Specified by:
getProperty in interface ognl.PropertyAccessor
Throws:
ognl.OgnlException

callMethod

public Object callMethod(Map context,
                         Object target,
                         String name,
                         Object[] objects)
                  throws ognl.MethodFailedException
Specified by:
callMethod in interface ognl.MethodAccessor
Throws:
ognl.MethodFailedException

callStaticMethod

public Object callStaticMethod(Map transientVars,
                               Class aClass,
                               String s,
                               Object[] objects)
                        throws ognl.MethodFailedException
Specified by:
callStaticMethod in interface ognl.MethodAccessor
Throws:
ognl.MethodFailedException

classForName

public Class classForName(String className,
                          Map context)
                   throws ClassNotFoundException
Specified by:
classForName in interface ognl.ClassResolver
Throws:
ClassNotFoundException

getArgTypes

private Class[] getArgTypes(Object[] args)


Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.