public class PolymorphicTypeResolver extends Object implements TypeResolver
Modifier and Type | Field and Description |
---|---|
static String |
TYPE_RESOLUTION_KEY |
Constructor and Description |
---|
PolymorphicTypeResolver()
Creates a new SimpleTypeResolver with a typing engine that can recognize the specified types.
|
PolymorphicTypeResolver(ReflectionCache reflectionCache)
Creates a new SimpleTypeResolver with a typing engine that can recognize the specified types.
|
PolymorphicTypeResolver(ReflectionCache reflectionCache,
String typeResolutionKey)
Creates a new SimpleTypeResolver with a typing engine that can recognize the specified types.
|
PolymorphicTypeResolver(String typeResolutionKey)
Creates a new SimpleTypeResolver with a typing engine that can recognize the specified types.
|
Modifier and Type | Method and Description |
---|---|
void |
deinit(com.tinkerpop.blueprints.Element element)
Called to remove the type resolution properties from an element
|
EdgeTraversal<?,?,?> |
hasNotType(EdgeTraversal<?,?,?> traverser,
Class<?> type)
Filters out the objects on the traversal that are not satisfying a requested type.
|
VertexTraversal<?,?,?> |
hasNotType(VertexTraversal<?,?,?> traverser,
Class<?> type)
Filters out the objects on the traversal that are not satisfying a requested type.
|
EdgeTraversal<?,?,?> |
hasType(EdgeTraversal<?,?,?> traverser,
Class<?> type)
Filters the objects on the traversal that satisfy a requested type.
|
VertexTraversal<?,?,?> |
hasType(VertexTraversal<?,?,?> traverser,
Class<?> type)
Filters the objects on the traversal that satisfy a requested type.
|
void |
init(com.tinkerpop.blueprints.Element element,
Class<?> kind)
Called to initialize an element with type resolution properties.
|
Class<?> |
resolve(com.tinkerpop.blueprints.Element element)
Resolve the type of frame that a an element should be.
|
<T> Class<? extends T> |
resolve(com.tinkerpop.blueprints.Element element,
Class<T> kind)
Resolve the type of frame that a an element should be.
|
public static final String TYPE_RESOLUTION_KEY
public PolymorphicTypeResolver()
public PolymorphicTypeResolver(String typeResolutionKey)
public PolymorphicTypeResolver(ReflectionCache reflectionCache)
reflectionCache
- the ReflectionCache used to examine the type hierarchy and do general reflection.public PolymorphicTypeResolver(ReflectionCache reflectionCache, String typeResolutionKey)
reflectionCache
- the ReflectionCache used to examine the type hierarchy and do general reflection.public <T> Class<? extends T> resolve(com.tinkerpop.blueprints.Element element, Class<T> kind)
TypeResolver
resolve
in interface TypeResolver
T
- The type used to frame the element.element
- The element that is being framed.kind
- The kind of frame that is being requested by the client code.public Class<?> resolve(com.tinkerpop.blueprints.Element element)
TypeResolver
resolve
in interface TypeResolver
element
- The element that is being framed.public void init(com.tinkerpop.blueprints.Element element, Class<?> kind)
TypeResolver
init
in interface TypeResolver
element
- The element that was created.kind
- The kind of frame that was resolved.public void deinit(com.tinkerpop.blueprints.Element element)
TypeResolver
deinit
in interface TypeResolver
element
- The element to remove the property from.public VertexTraversal<?,?,?> hasType(VertexTraversal<?,?,?> traverser, Class<?> type)
TypeResolver
hasType
in interface TypeResolver
traverser
- A traversal pointing to the current set of vertex to be
filteredtype
- The type to filter by.public EdgeTraversal<?,?,?> hasType(EdgeTraversal<?,?,?> traverser, Class<?> type)
TypeResolver
hasType
in interface TypeResolver
traverser
- A traversal pointing to the current set of edges to be
filteredtype
- The type to filter by.public VertexTraversal<?,?,?> hasNotType(VertexTraversal<?,?,?> traverser, Class<?> type)
TypeResolver
hasNotType
in interface TypeResolver
traverser
- A traversal pointing to the current set of vertex to be
filteredtype
- The type to filter by.public EdgeTraversal<?,?,?> hasNotType(EdgeTraversal<?,?,?> traverser, Class<?> type)
TypeResolver
hasNotType
in interface TypeResolver
traverser
- A traversal pointing to the current set of edges to be
filteredtype
- The type to filter by.Copyright © 2017 Syncleus. All rights reserved.