com.tinkerpop.frames.annotations.OutVertexAnnotationHandler Maven / Gradle / Ivy
Go to download
Windup Frames is an extension of the upstream Frames project, with tools to ease debugging and integration within windup.
package com.tinkerpop.frames.annotations;
import java.lang.reflect.Method;
import com.tinkerpop.blueprints.Direction;
import com.tinkerpop.blueprints.Edge;
import com.tinkerpop.blueprints.Element;
import com.tinkerpop.frames.FramedGraph;
import com.tinkerpop.frames.OutVertex;
public class OutVertexAnnotationHandler implements AnnotationHandler {
@Override
public Class getAnnotationType() {
return OutVertex.class;
}
@Override
public Object processElement(final OutVertex annotation, final Method method, final Object[] arguments, final FramedGraph framedGraph, final Element element, final Direction direction) {
if (element instanceof Edge) {
return framedGraph.frame(((Edge)element).getVertex(Direction.OUT), method.getReturnType());
} else {
throw new UnsupportedOperationException();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy