本文整理了Java中ognl.Ognl.addDefaultContext()
方法的一些代码示例,展示了Ognl.addDefaultContext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ognl.addDefaultContext()
方法的具体详情如下:
包路径:ognl.Ognl
类名称:Ognl
方法名:addDefaultContext
[英]Appends the standard naming context for evaluating an OGNL expression into the context given so that cached maps can be used as a context.
[中]将用于计算OGNL表达式的标准命名上下文附加到给定的上下文中,以便缓存的映射可以用作上下文。
代码示例来源:origin: opensymphony/ognl
/**
* Appends the standard naming context for evaluating an OGNL expression
* into the context given so that cached maps can be used as a context.
*
* @param root the root of the object graph
* @param context the context to which OGNL context will be added.
* @return Context Map with the keys root
and context
* set appropriately
*/
public static Map addDefaultContext( Object root, Map context )
{
return addDefaultContext( root, null, null, null, context );
}
代码示例来源:origin: opensymphony/ognl
/**
* Appends the standard naming context for evaluating an OGNL expression
* into the context given so that cached maps can be used as a context.
*
* @param root the root of the object graph
* @param context the context to which OGNL context will be added.
* @return Context Map with the keys root
and context
* set appropriately
*/
public static Map addDefaultContext( Object root, ClassResolver classResolver, Map context )
{
return addDefaultContext(root, classResolver, null, null, context);
}
代码示例来源:origin: opensymphony/ognl
/**
* Appends the standard naming context for evaluating an OGNL expression
* into the context given so that cached maps can be used as a context.
*
* @param root the root of the object graph
* @param context the context to which OGNL context will be added.
* @return Context Map with the keys root
and context
* set appropriately
*/
public static Map addDefaultContext( Object root, ClassResolver classResolver, TypeConverter converter, Map context )
{
return addDefaultContext(root, classResolver, converter, null, context);
}
代码示例来源:origin: ognl/ognl
public static boolean isSimpleProperty(Object tree, Map context)
throws OgnlException
{
return ((SimpleNode) tree).isSimpleProperty((OgnlContext) addDefaultContext(null, context));
}
代码示例来源:origin: ognl/ognl
public static boolean isSimpleNavigationChain(Object tree, Map context)
throws OgnlException
{
return ((SimpleNode) tree).isSimpleNavigationChain((OgnlContext) addDefaultContext(null, context));
}
代码示例来源:origin: opensymphony/ognl
/**
* Creates and returns a new standard naming context for evaluating an OGNL
* expression.
*
* @param root the root of the object graph
* @return a new Map with the keys root
and context
* set appropriately
*/
public static Map createDefaultContext( Object root, ClassResolver classResolver, TypeConverter converter )
{
return addDefaultContext( root, classResolver, converter, null, new OgnlContext() );
}
代码示例来源:origin: opensymphony/ognl
/**
* Creates and returns a new standard naming context for evaluating an OGNL
* expression.
*
* @param root the root of the object graph
* @return a new Map with the keys root
and context
* set appropriately
*/
public static Map createDefaultContext( Object root, ClassResolver classResolver, TypeConverter converter, MemberAccess memberAccess )
{
return addDefaultContext( root, classResolver, converter, memberAccess, new OgnlContext() );
}
代码示例来源:origin: opensymphony/ognl
/**
* Creates and returns a new standard naming context for evaluating an OGNL
* expression.
*
* @param root the root of the object graph
* @return a new Map with the keys root
and context
* set appropriately
*/
public static Map createDefaultContext( Object root )
{
return addDefaultContext( root, null, null, null, new OgnlContext() );
}
代码示例来源:origin: opensymphony/ognl
/**
* Creates and returns a new standard naming context for evaluating an OGNL
* expression.
*
* @param root the root of the object graph
* @return a new OgnlContext with the keys root
and context
* set appropriately
*/
public static Map createDefaultContext( Object root, ClassResolver classResolver )
{
return addDefaultContext( root, classResolver, null, null, new OgnlContext() );
}
代码示例来源:origin: jkuhnert/ognl
public static boolean isSimpleProperty(Object tree, Map context)
throws OgnlException
{
return ((SimpleNode) tree).isSimpleProperty((OgnlContext) addDefaultContext(null, context));
}
代码示例来源:origin: jkuhnert/ognl
public static boolean isSimpleNavigationChain(Object tree, Map context)
throws OgnlException
{
return ((SimpleNode) tree).isSimpleNavigationChain((OgnlContext) addDefaultContext(null, context));
}
代码示例来源:origin: opensymphony/ognl
public static boolean isSimpleProperty( Object tree, Map context ) throws OgnlException
{
return ((SimpleNode)tree).isSimpleProperty( (OgnlContext)addDefaultContext( null, context ) );
}
代码示例来源:origin: opensymphony/ognl
public static boolean isConstant( Object tree, Map context ) throws OgnlException
{
return ((SimpleNode)tree).isConstant( (OgnlContext)addDefaultContext( null, context ) );
}
代码示例来源:origin: opensymphony/ognl
public static boolean isSimpleNavigationChain( Object tree, Map context ) throws OgnlException
{
return ((SimpleNode)tree).isSimpleNavigationChain( (OgnlContext)addDefaultContext( null, context ) );
}
代码示例来源:origin: ognl/ognl
/**
* Creates and returns a new standard naming context for evaluating an OGNL expression.
*
* @param root
* the root of the object graph
* @return a new Map with the keys root
and context
set
* appropriately
*
* @deprecated it will be removed soon
*/
@Deprecated
public static Map createDefaultContext(Object root)
{
return addDefaultContext(root, null, null, null, new OgnlContext(null, null, null));
}
代码示例来源:origin: ognl/ognl
/**
* Creates and returns a new standard naming context for evaluating an OGNL expression.
*
* @param root
* The root of the object graph.
* @param memberAccess
* Java security handling object to determine semantics for accessing normally private/protected
* methods / fields.
* @return a new Map with the keys root
and context
set
* appropriately
*/
public static Map createDefaultContext(Object root, MemberAccess memberAccess)
{
return addDefaultContext(root, memberAccess, null, null, new OgnlContext(null, null, memberAccess));
}
代码示例来源:origin: jkuhnert/ognl
/**
* Creates and returns a new standard naming context for evaluating an OGNL expression.
*
* @param root
* the root of the object graph
* @return a new Map with the keys root
and context
set
* appropriately
*
* @deprecated it will be removed soon
*/
@Deprecated
public static Map createDefaultContext(Object root)
{
return addDefaultContext(root, null, null, null, new OgnlContext(null, null, null));
}
代码示例来源:origin: jkuhnert/ognl
/**
* Creates and returns a new standard naming context for evaluating an OGNL expression.
*
* @param root
* The root of the object graph.
* @param memberAccess
* Java security handling object to determine semantics for accessing normally private/protected
* methods / fields.
* @return a new Map with the keys root
and context
set
* appropriately
*/
public static Map createDefaultContext(Object root, MemberAccess memberAccess)
{
return addDefaultContext(root, memberAccess, null, null, new OgnlContext(null, null, memberAccess));
}
代码示例来源:origin: org.zkoss.zk/zkmax
/** Returns an OGNL context for the specified XEL context.
*/
public static Map getContext(XelContext ctx) {
final FunctionMapper mapper = ctx.getFunctionMapper();
return Ognl.addDefaultContext(null,
mapper != null ? new MapperClassResolver(mapper): null,
Collections.EMPTY_MAP);
//Note: we always pass null as the context, since
//we use ResolverAccessor as the root
}
/** Returns the root object.
代码示例来源:origin: org.seasar.container/s2-framework
static Map addClassResolverIfNecessary(Map ctx, Object root) {
if (root instanceof S2Container) {
S2Container cOntainer= (S2Container) root;
ClassLoader classLoader = container.getClassLoader();
if (classLoader != null) {
ClassResolverImpl classResolver = new ClassResolverImpl(
classLoader);
if (ctx == null) {
ctx = Ognl.createDefaultContext(root, classResolver);
} else {
ctx = Ognl.addDefaultContext(root, classResolver, ctx);
}
}
}
return ctx;
}