Class SourceLocationTrackingBuilder<B extends SourceLocationTrackingBuilder<?,?>,T>
- java.lang.Object
-
- software.amazon.smithy.rulesengine.language.util.SourceLocationTrackingBuilder<B,T>
-
- Type Parameters:
B- Type of the builderT- Type of the type that is built
- All Implemented Interfaces:
FromSourceLocation,SmithyBuilder<T>
- Direct Known Subclasses:
Endpoint.Builder,EndpointRuleSet.Builder,FunctionNode.Builder,GetAttr.Builder,Parameter.Builder,Parameters.Builder,Partition.Builder,PartitionOutputs.Builder,Partitions.Builder,RegionOverride.Builder,Value.Endpoint.Builder
public abstract class SourceLocationTrackingBuilder<B extends SourceLocationTrackingBuilder<?,?>,T> extends java.lang.Object implements SmithyBuilder<T>, FromSourceLocation
Builder which also tracks sourceLocation of inputs. If no source location is provided, the source location defaults to the Java file/line number of the caller.
-
-
Field Summary
Fields Modifier and Type Field Description protected SourceLocationsourceLocation
-
Constructor Summary
Constructors Constructor Description SourceLocationTrackingBuilder(FromSourceLocation sourceLocation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SourceLocationgetSourceLocation()Gets the source location of a value.BsourceLocation(FromSourceLocation fromSourceLocation)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.smithy.utils.SmithyBuilder
build
-
-
-
-
Field Detail
-
sourceLocation
protected SourceLocation sourceLocation
-
-
Constructor Detail
-
SourceLocationTrackingBuilder
public SourceLocationTrackingBuilder(FromSourceLocation sourceLocation)
-
-
Method Detail
-
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.
-
sourceLocation
public B sourceLocation(FromSourceLocation fromSourceLocation)
-
-