public static final class NodeValidatorPlugin.Context
extends java.lang.Object
| Constructor and Description |
|---|
Context(Model model) |
Context(Model model,
java.util.Set<NodeValidationVisitor.Feature> features) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<MemberShape> |
getReferringMember() |
boolean |
hasFeature(NodeValidationVisitor.Feature feature) |
Model |
model()
Get the model being evaluated.
|
java.util.Set<Shape> |
select(Selector selector)
Select and memoize shapes from the model using a Selector.
|
void |
setReferringMember(MemberShape referringMember) |
public Context(Model model)
model - Model being evaluated.public Context(Model model, java.util.Set<NodeValidationVisitor.Feature> features)
public Model model()
public java.util.Set<Shape> select(Selector selector)
The cache used by this method is not thread-safe, though that's fine because NodeValidatorPlugins using the same Context all run within the same thread.
selector - Selector to evaluate.public boolean hasFeature(NodeValidationVisitor.Feature feature)
public void setReferringMember(MemberShape referringMember)
public java.util.Optional<MemberShape> getReferringMember()