Class Rule
- java.lang.Object
-
- software.amazon.smithy.rulesengine.language.syntax.rule.Rule
-
- All Implemented Interfaces:
FromSourceLocation,ToNode,TypeCheck
- Direct Known Subclasses:
EndpointRule,ErrorRule,TreeRule
public abstract class Rule extends java.lang.Object implements TypeCheck, ToNode, FromSourceLocation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRule.Builder
-
Constructor Summary
Constructors Modifier Constructor Description protectedRule(Rule.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract <T> Taccept(RuleValueVisitor<T> visitor)static Rule.Builderbuilder()static Rule.Builderbuilder(FromSourceLocation sourceLocation)booleanequals(java.lang.Object o)static RulefromNode(Node node)java.util.List<Condition>getConditions()java.util.Optional<java.lang.String>getDocumentation()SourceLocationgetSourceLocation()Gets the source location of a value.inthashCode()NodetoNode()Converts a value to aNode.java.lang.StringtoString()TypetypeCheck(Scope<Type> scope)protected abstract TypetypecheckValue(Scope<Type> scope)
-
-
-
Field Detail
-
DOCUMENTATION
public static final java.lang.String DOCUMENTATION
- See Also:
- Constant Field Values
-
ENDPOINT
public static final java.lang.String ENDPOINT
- See Also:
- Constant Field Values
-
ERROR
public static final java.lang.String ERROR
- See Also:
- Constant Field Values
-
TREE
public static final java.lang.String TREE
- See Also:
- Constant Field Values
-
RULES
public static final java.lang.String RULES
- See Also:
- Constant Field Values
-
TYPE
public static final java.lang.String TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Rule
protected Rule(Rule.Builder builder)
-
-
Method Detail
-
builder
public static Rule.Builder builder()
-
builder
public static Rule.Builder builder(FromSourceLocation sourceLocation)
-
accept
public abstract <T> T accept(RuleValueVisitor<T> visitor)
-
getSourceLocation
public SourceLocation getSourceLocation()
Description copied from interface:FromSourceLocationGets the source location of a value.- Specified by:
getSourceLocationin interfaceFromSourceLocation- Returns:
- Returns the source location of the value.
-
getConditions
public java.util.List<Condition> getConditions()
-
getDocumentation
public java.util.Optional<java.lang.String> getDocumentation()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-