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 in
Reflection.getBaseBeanPropertyPaths(Object) and Reflection.setBeanProperties(Object, Map).- Since:
- 3.8
- Author:
- Bauke Scholtz
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(Reflection.PropertyPath other) booleaninthashCode()static Reflection.PropertyPathof(Comparable<? extends Serializable>... nodes) Create a new property path composed of given nodes.toString()Returns the property path as string, conform the EL rules.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 Details
-
of
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
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
- Specified by:
compareToin interfaceComparable<Reflection.PropertyPath>
-
equals
-
hashCode
public int hashCode() -
toString
Returns the property path as string, conform the EL rules.
-