RangeFactory class
A factory used to create instances of SourceRange
based on various
syntactic and semantic entities.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
argumentRange(
ArgumentList argumentList, int lower, int upper, bool forDeletion) → SourceRange -
Return a source range that covers all of the arguments in the
argumentList
between thelower
andupper
indices, inclusive. The flagforDeletion
controls whether a comma between the given indices and the neighboring arguments should be included in the range. If the flag istrue
, then the range can be deleted to delete the covered arguments and leave a valid argument list. If the flag isfalse
, then the range can be replaced with different argument values. -
deletionRange(
AstNode node) → SourceRange -
Return the deletion range of the
node
, considering the spaces and comments before and after it. -
elementName(
Element element) → SourceRange -
Return a source range that covers the name of the given
element
. -
endEnd(
SyntacticEntity leftEntity, SyntacticEntity rightEntity) → SourceRange -
Return a source range that starts at the end of
leftEntity
and ends at the end ofrightEntity
. -
endLength(
SyntacticEntity entity, int length) → SourceRange -
Return a source range that starts at the end of
entity
and has the givenlength
. -
endStart(
SyntacticEntity leftEntity, SyntacticEntity rightEntity) → SourceRange -
Return a source range that starts at the end of
leftEntity
and ends at the start ofrightEntity
. -
entity(
SyntacticEntity node) → SourceRange -
Return a source range that covers the same range as the given
node
. -
error(
AnalysisError error) → SourceRange -
Return a source range that covers the same range as the given
error
. -
node(
AstNode node) → SourceRange -
Return a source range that covers the same range as the given
node
. -
nodeInList<
T extends AstNode> (NodeList< T> list, T item) → SourceRange -
Return a source range that covers the given
item
(including a leading or trailing comma as appropriate) in the containinglist
. -
nodes(
List< AstNode> nodes) → SourceRange -
Return a source range that covers all of the given
nodes
(that is, from the start of the first node to the end of the last node. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
offsetBy(
SourceRange range, int offset) → SourceRange -
Return a source range whose length is the same as the given
range
, but whose offset is the offset of the givenrange
withoffset
added to it. -
startEnd(
SyntacticEntity leftEntity, SyntacticEntity rightEntity) → SourceRange -
Return a source range that starts at the start of
leftEntity
and ends at the end ofrightEntity
. -
startLength(
SyntacticEntity entity, int length) → SourceRange -
Return a source range that starts at the start of
entity
and has a length oflength
. -
startOffsetEndOffset(
int startOffset, int endOffset) → SourceRange -
Return a source range that starts at the given
startOffset
and ends at the givenendOffset
. -
startStart(
SyntacticEntity leftEntity, SyntacticEntity rightEntity) → SourceRange -
Return a source range that starts at the start of
leftEntity
and ends at the start ofrightEntity
. -
token(
Token token) → SourceRange -
Return a source range that covers the same range as the given
token
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited