- java.lang.Object
-
- org.omnifaces.util.Reflection.PropertyPath
-
- All Implemented Interfaces:
Serializable
,Comparable<Reflection.PropertyPath>
- Enclosing class:
- Reflection
public static final class Reflection.PropertyPath extends Object implements Comparable<Reflection.PropertyPath>, Serializable
This class represents a property path. This is intended to be immutable. This is primarily used inReflection.getBaseBeanPropertyPaths(Object)
andReflection.setBeanProperties(Object, Map)
.- Since:
- 3.8
- Author:
- Bauke Scholtz
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Reflection.PropertyPath other)
boolean
equals(Object object)
int
hashCode()
static Reflection.PropertyPath
of(Comparable<? extends Serializable>... nodes)
Create a new property path composed of given nodes.String
toString()
Returns the property path as string, conform the EL rules.Reflection.PropertyPath
with(Comparable<? extends Serializable> node)
Create a new property path composed of the nodes of the current property path with the given node added.
-
-
-
Method Detail
-
of
@SafeVarargs public static Reflection.PropertyPath of(Comparable<? extends Serializable>... nodes)
Create a new property path composed of given nodes.- Parameters:
nodes
- Nodes of property path.- Returns:
- A new property path composed of given nodes.
- Throws:
NullPointerException
- When one of the nodes is null.IllegalArgumentException
- When one of the nodes is actually not an instance of Serializable.
-
with
public Reflection.PropertyPath with(Comparable<? extends Serializable> node)
Create a new property path composed of the nodes of the current property path with the given node added. E.g. if the current property path is "person" and the given node is "name", then this returns a new property path representing "person.name". Or, if the current property path is "list" and the given node is "0", then this returns a new property path representing "list[0]". Or, if the current property path is "persons[0]" and the given node is "name", then this returns a new property path representing "persons[0].name"- Parameters:
node
- Node to extend the current property path with.- Returns:
- A new property path composed of the nodes of the current property path added with the given node.
- Throws:
NullPointerException
- When node is null.
-
compareTo
public int compareTo(Reflection.PropertyPath other)
- Specified by:
compareTo
in interfaceComparable<Reflection.PropertyPath>
-
-