Package dev.morphia.internal
Class PathTarget
- java.lang.Object
-
- dev.morphia.internal.PathTarget
-
public class PathTarget extends java.lang.Object
- Since:
- 1.3
Developer note. This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
-
Constructor Summary
Constructors Constructor Description PathTarget(Mapper mapper, MappedClass root, java.lang.String path)
Creates a resolution context for the given root and path.PathTarget(Mapper mapper, MappedClass root, java.lang.String path, boolean validateNames)
Creates a resolution context for the given root and path.PathTarget(Mapper mapper, java.lang.Class<T> clazz, java.lang.String field)
PathTarget(Mapper mapper, java.lang.Class<T> clazz, java.lang.String field, boolean validateNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MappedField
getTarget()
Returns the MappedField found at the end of a path.java.lang.String
toString()
java.lang.String
translatedPath()
Returns the translated path for this context.
-
-
-
Constructor Detail
-
PathTarget
public PathTarget(Mapper mapper, MappedClass root, java.lang.String path)
Creates a resolution context for the given root and path.- Parameters:
mapper
- mapperroot
- rootpath
- path
-
PathTarget
public PathTarget(Mapper mapper, java.lang.Class<T> clazz, java.lang.String field)
-
PathTarget
public PathTarget(Mapper mapper, java.lang.Class<T> clazz, java.lang.String field, boolean validateNames)
-
PathTarget
public PathTarget(Mapper mapper, MappedClass root, java.lang.String path, boolean validateNames)
Creates a resolution context for the given root and path.- Parameters:
mapper
- mapperroot
- rootpath
- path
-
-
Method Detail
-
translatedPath
public java.lang.String translatedPath()
Returns the translated path for this context. If validation is disabled, that path could be the same as the initial value.- Returns:
- the translated path
-
getTarget
public MappedField getTarget()
Returns the MappedField found at the end of a path. May be null if the path is invalid and validation is disabled.- Returns:
- the field
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-