Class ModelPath
- java.lang.Object
-
- org.soulwing.prospecto.jaxrs.runtime.path.ModelPath
-
public class ModelPath extends Object
An abstraction for a path of model classes.- Author:
- Carl Harris
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classModelPath.MatchType
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>[]asArray()Gets the sequence of model types in this path as an arrayList<Class<?>>asList()Gets the sequence of model types in this path as a list.ModelPathconcat(Class<?>... path)Creates a new model path from this path concatenated with the given sequence of model types.ModelPathconcat(List<Class<?>> path)Creates a new model path from this path concatenated with the given sequence of model types.ModelPathconcat(ModelPathSpec modelPathSpec)Creates a new model path from this path concatenated with the sequence of model types on the givenModelPathSpecannotation.booleanequals(Object obj)inthashCode()intlength()Gets the length of this path.ModelPath.MatchTypematchTypeAt(int index)Gets the match type of the path element at the given index.StringtoString()static ModelPathwith(Class<?>... path)Creates a new path object with the given sequence of model types.static ModelPathwith(List<Class<?>> path)Creates a new path object with the given sequence of model types.
-
-
-
Method Detail
-
with
public static ModelPath with(List<Class<?>> path)
Creates a new path object with the given sequence of model types.- Parameters:
path- sequence of model types- Returns:
- model path
-
with
public static ModelPath with(Class<?>... path)
Creates a new path object with the given sequence of model types.- Parameters:
path- sequence of model types- Returns:
- model path
-
concat
public ModelPath concat(List<Class<?>> path)
Creates a new model path from this path concatenated with the given sequence of model types.- Parameters:
path- sequence of model types to concatenate with this path- Returns:
- model path
-
concat
public ModelPath concat(Class<?>... path)
Creates a new model path from this path concatenated with the given sequence of model types.- Parameters:
path- sequence of model types to concatenate with this path- Returns:
- model path
-
concat
public ModelPath concat(ModelPathSpec modelPathSpec)
Creates a new model path from this path concatenated with the sequence of model types on the givenModelPathSpecannotation. sequence of model types.- Parameters:
modelPathSpec- a referenced by annotation (which may benull)- Returns:
- model path
-
asList
public List<Class<?>> asList()
Gets the sequence of model types in this path as a list.- Returns:
- list of model types
-
asArray
public Class<?>[] asArray()
Gets the sequence of model types in this path as an array- Returns:
- array of model types
-
matchTypeAt
public ModelPath.MatchType matchTypeAt(int index)
Gets the match type of the path element at the given index.- Parameters:
index- index of the subject path element- Returns:
- match type
-
length
public int length()
Gets the length of this path.- Returns:
- path length
-
-