Class Sandbox.WhiteSet
- java.lang.Object
-
- org.apache.commons.jexl2.introspection.Sandbox.Names
-
- org.apache.commons.jexl2.introspection.Sandbox.WhiteSet
-
- Enclosing class:
- Sandbox
public static final class Sandbox.WhiteSet extends Sandbox.Names
A white set of names.
-
-
Constructor Summary
Constructors Constructor Description WhiteSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.java.lang.Stringget(java.lang.String name)Whether a given name is allowed or not.
-
-
-
Constructor Detail
-
WhiteSet
public WhiteSet()
-
-
Method Detail
-
add
public boolean add(java.lang.String name)
Description copied from class:Sandbox.NamesAdds a name to this set.- Specified by:
addin classSandbox.Names- 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)
Description copied from class:Sandbox.NamesAdds an alias to a name to this set.This only has an effect on white lists.
- Overrides:
aliasin classSandbox.Names- Parameters:
name- the name to aliasalias- the alias- Returns:
- true if the alias was added, false if it was already present
-
get
public java.lang.String get(java.lang.String name)
Description copied from class:Sandbox.NamesWhether a given name is allowed or not.- Overrides:
getin classSandbox.Names- Parameters:
name- the method/property name to check- Returns:
- null if not allowed, the actual name to use otherwise
-
-