- NODE PROPERTIES:
â–¸ Code (String); Cardinality one
(mandatory with default value <empty>
); This field holds the code snippet that the node represents.
â–¸ ColumnNumber (Int); Cardinality ZeroOrOne
(optional); This optional fields provides the column number of the program construct represented by the node.
â–¸ ExplicitAs (Boolean); Cardinality ZeroOrOne
(optional); Specifies whether the IMPORTED_AS property was explicitly present in the code. For languages like Java which do not allow a renaming during import this is always false. For e.g. Kotlin it depends on the existence of the "as" keyword.
â–¸ ImportedAs (String); Cardinality ZeroOrOne
(optional); The identifier under which the import can be accessed in the importing context. For a Java import this is always identical to the class name. But e.g. for a Kotlin import like "import java.nio.ByteBuffer as BBuffer" this would be "BBuffer". This property is ignored if IS_WILDCARD is true.
â–¸ ImportedEntity (String); Cardinality ZeroOrOne
(optional); The identifying string of the imported entity. For a Java import like "import java.nio.ByteBuffer;" this would be "java.nio.ByteBuffer".
â–¸ IsExplicit (Boolean); Cardinality ZeroOrOne
(optional); Specifies whether this is an explicit import. Most languages have implicit default imports of some standard library elements and this flag is used to distinguish those from explicit imports found in the code base.
â–¸ IsWildcard (Boolean); Cardinality ZeroOrOne
(optional); Specifies whether this is a wildcard import. For a Java import like "import java.nio.*;" IS_WILDCARD would be "true" and IMPORTED_ENTITY would be "java.nio". For wildcard imports the IMPORTED_AS property is ignored.
â–¸ LineNumber (Int); Cardinality ZeroOrOne
(optional); This optional field provides the line number of the program construct represented by the node.
â–¸ Offset (Int); Cardinality ZeroOrOne
(optional); Start offset into the CONTENT property of the corresponding FILE node. The offset is such that parts of the content can easily be accessed via content.substring(offset, offsetEnd)
. This means that the offset must be measured in utf16 encoding (i.e. neither in characters/codeunits nor in byte-offsets into a utf8 encoding). E.g. for METHOD nodes this start offset points to the start of the methods source code in the string holding the source code of the entire file.
â–¸ OffsetEnd (Int); Cardinality ZeroOrOne
(optional); End offset (exclusive) into the CONTENT property of the corresponding FILE node. See OFFSET documentation for finer details. E.g. for METHOD nodes this end offset points to the first code position which is not part of the method.
â–¸ Order (Int); Cardinality one
(mandatory with default value -1
); This integer indicates the position of the node among its siblings in the AST. The left-most child has an order of 0.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait AstNodetrait ImportBasetrait AstNodeBaseclass StoredNodetrait AbstractNodetrait Producttrait Equalstrait StaticType[ImportEMT]class GNodetrait DNodeOrNodeclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Attributes
- Definition Classes
-
Equals
Attributes
- Definition Classes
-
Product
Attributes
- Definition Classes
-
Product
Attributes
- Definition Classes
-
Product
Attributes
- Definition Classes
-
Product
Inherited methods
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- GNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Attributes
- Inherited from:
- StoredNode
Calculates a hash code value for the object.
Calculates a hash code value for the object.
The default hashing algorithm is platform dependent.
Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)
) yet not be equal (o1.equals(o2)
returns false
). A degenerate implementation could always return 0
. However, it is required that if two objects are equal (o1.equals(o2)
returns true
) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)
). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals
method.
Attributes
- Returns
-
the hash code value for this object.
- Inherited from:
- GNode
Attributes
- Inherited from:
- GNode
Attributes
- Inherited from:
- GNode
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- AbstractNode
TODO deprecate and phase out
Attributes
- Inherited from:
- GNode
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Inherited from:
- GNode