Class JexlSandbox.Names
- java.lang.Object
-
- org.apache.commons.jexl3.introspection.JexlSandbox.Names
-
- Direct Known Subclasses:
JexlSandbox.AllowSet,JexlSandbox.BlockSet
- Enclosing class:
- JexlSandbox
public abstract static class JexlSandbox.Names extends java.lang.ObjectA base set of names.
-
-
Constructor Summary
Constructors Constructor Description Names()Default constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanadd(java.lang.String name)Adds a name to this set.booleanalias(java.lang.String name, java.lang.String alias)Adds an alias to a name to this set.protected JexlSandbox.Namescopy()Gets a copy of these Namesjava.lang.Stringget(java.lang.String name)Gets whether a given name is allowed or not.
-
-
-
Method Detail
-
add
public abstract boolean add(java.lang.String name)
Adds a name to this set.- Parameters:
name- the name to add- Returns:
- true if the name was really added, false if not
-
alias
public boolean alias(java.lang.String name, java.lang.String alias)Adds an alias to a name to this set.This only has an effect on allow lists.
- Parameters:
name- the name to aliasalias- the alias- Returns:
- true if the alias was added, false if it was already present
-
copy
protected JexlSandbox.Names copy()
Gets a copy of these Names- Returns:
- a copy of these Names
-
get
public java.lang.String get(java.lang.String name)
Gets whether a given name is allowed or not.- Parameters:
name- the method/property name to check- Returns:
- null (or NULL if name is null) if not allowed, the actual name to use otherwise
-
-