Interface TraversalStrategy<S extends TraversalStrategy>
- 
- All Superinterfaces:
- Comparable<Class<? extends TraversalStrategy>>,- Serializable
 - All Known Subinterfaces:
- TraversalStrategy.DecorationStrategy,- TraversalStrategy.FinalizationStrategy,- TraversalStrategy.OptimizationStrategy,- TraversalStrategy.ProviderOptimizationStrategy,- TraversalStrategy.VerificationStrategy
 - All Known Implementing Classes:
- AbstractTraversalStrategy,- AbstractWarningVerificationStrategy,- AdjacentToIncidentStrategy,- ByModulatorOptimizationStrategy,- ComputerFinalizationStrategy,- ComputerVerificationStrategy,- ConnectiveStrategy,- CountStrategy,- EarlyLimitStrategy,- EdgeLabelVerificationStrategy,- ElementIdStrategy,- EventStrategy,- FilterRankingStrategy,- GraphFilterStrategy,- HaltedTraverserStrategy,- IdentityRemovalStrategy,- IncidentToAdjacentStrategy,- InlineFilterStrategy,- LambdaRestrictionStrategy,- LazyBarrierStrategy,- MatchAlgorithmStrategy,- MatchPredicateStrategy,- MessagePassingReductionStrategy,- OptionsStrategy,- OrderLimitStrategy,- PartitionStrategy,- PathProcessorStrategy,- PathRetractionStrategy,- ProductiveByStrategy,- ProfileStrategy,- ReadOnlyStrategy,- ReferenceElementStrategy,- RemoteStrategy,- RepeatUnrollStrategy,- RequirementsStrategy,- ReservedKeysVerificationStrategy,- SackStrategy,- SeedStrategy,- SideEffectStrategy,- StandardVerificationStrategy,- SubgraphStrategy,- TinkerGraphCountStrategy,- TinkerGraphStepStrategy,- TranslationStrategy,- TraversalStrategyProxy,- VertexProgramRestrictionStrategy,- VertexProgramStrategy
 
 public interface TraversalStrategy<S extends TraversalStrategy> extends Serializable, Comparable<Class<? extends TraversalStrategy>> ATraversalStrategydefines a particular atomic operation for mutating aTraversalprior to its evaluation. There are 5 pre-defined "traversal categories":TraversalStrategy.DecorationStrategy,TraversalStrategy.OptimizationStrategy,TraversalStrategy.ProviderOptimizationStrategy,TraversalStrategy.FinalizationStrategy, andTraversalStrategy.VerificationStrategy. Strategies within a category are sorted amongst themselves and then category sorts are applied in the ordered specified previous. That is, decorations are applied, then optimizations, then provider optimizations, then finalizations, and finally, verifications. If a strategy does not fit within the specified categories, then it can simply implementTraversalStrategyand can have priors/posts that span categories. A traversal strategy should be a final class as various internal operations on a strategy are based on its ability to be assigned to more general classes. A traversal strategy should typically be stateless with a public staticinstance()method. However, at limit, a traversal strategy can have a state defining constructor (typically via a "builder"), but that state can not mutate once instantiated.- Author:
- Marko A. Rodriguez (http://markorodriguez.com), Matthias Broecheler (me@matthiasb.com)
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceTraversalStrategy.DecorationStrategyImplemented by strategies that adds "application logic" to the traversal (e.g.static interfaceTraversalStrategy.FinalizationStrategyImplemented by strategies that do final behaviors that require a fully compiled traversal to work (e.g.static interfaceTraversalStrategy.OptimizationStrategyImplemented by strategies that rewrite the traversal to be more efficient, but with the same semantics (e.g.static interfaceTraversalStrategy.ProviderOptimizationStrategyImplemented by strategies that rewrite the traversal to be more efficient, but with the same semantics.static interfaceTraversalStrategy.VerificationStrategyImplemented by strategies where there is no more behavioral tweaking of the traversal required.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidapply(Traversal.Admin<?,?> traversal)default Set<Class<? extends S>>applyPost()The set of strategies that must be executed after this strategy is executed.default Set<Class<? extends S>>applyPrior()The set of strategies that must be executed before this strategy is executed.default intcompareTo(Class<? extends TraversalStrategy> otherTraversalCategory)default org.apache.commons.configuration2.ConfigurationgetConfiguration()Get the configuration representation of this strategy.default Class<S>getTraversalCategory()The type of traversal strategy -- i.e.
 
- 
- 
- 
Field Detail- 
STRATEGYstatic final String STRATEGY - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
applyvoid apply(Traversal.Admin<?,?> traversal) 
 - 
applyPriordefault Set<Class<? extends S>> applyPrior() The set of strategies that must be executed before this strategy is executed. If there are no ordering requirements, the default implementation returns an empty set.- Returns:
- the set of strategies that must be executed prior to this one.
 
 - 
applyPostdefault Set<Class<? extends S>> applyPost() The set of strategies that must be executed after this strategy is executed. If there are no ordering requirements, the default implementation returns an empty set.- Returns:
- the set of strategies that must be executed post this one
 
 - 
getTraversalCategorydefault Class<S> getTraversalCategory() The type of traversal strategy -- i.e.TraversalStrategy.DecorationStrategy,TraversalStrategy.OptimizationStrategy,TraversalStrategy.FinalizationStrategy, orTraversalStrategy.VerificationStrategy.- Returns:
- the traversal strategy category class
 
 - 
getConfigurationdefault org.apache.commons.configuration2.Configuration getConfiguration() Get the configuration representation of this strategy. This is useful for converting a strategy into a serialized form.- Returns:
- the configuration used to create this strategy
 
 - 
compareTodefault int compareTo(Class<? extends TraversalStrategy> otherTraversalCategory) - Specified by:
- compareToin interface- Comparable<S extends TraversalStrategy>
 
 
- 
 
-