Initializer
Identifier(String name, Boolean usePrefix)
Parameters:
  • name

    The name of the identifier.

  • usePrefix

    If true, use the \i/\I prefix.

    This property is only of concern to tools which deal immediately with source code; it does not influence the equality of Identifier instances.

    (If this is false and the name requires a prefix, an AssertionError is thrown.)

Attributes
childrenSource Codeshared actual [] children

The child nodes of this node.

Refines ExpressionIsh.children ultimately refines Node.children
hashSource Codeshared actual Integer hash

The hash value of the value, which allows the value to be an element of a hash-based set or key of a hash-based map. Implementations must respect the constraint that:

  • if x==y then x.hash==y.hash.

Therefore, a class which refines equals must also refine hash.

Refines Object.hash
nameSource Codeshared default String name

The name of the identifier.

prefixSource Codeshared formal String prefix

The prefix for this kind of identifier – \i for a lowercase identifier, \I for an uppercase identifier.

textSource Codeshared String text

The text of the identifier, that is its name and, if used, the prefix.

usePrefixSource Codeshared default Boolean usePrefix

If true, use the \i/\I prefix.

This property is only of concern to tools which deal immediately with source code; it does not influence the equality of Identifier instances.

(If this is false and the name requires a prefix, an AssertionError is thrown.)

Inherited Attributes
Attributes inherited from: Node
Attributes inherited from: Object
Methods
copySource Codeshared formal Identifier copy(String name = ..., Boolean usePrefix = ...)

Creates a copy of this identifier. All parameters default to the value of the corresponding parameter of this instance.

Parameters:
  • name = this.name
  • usePrefix = this.usePrefix
Inherited Methods
Methods inherited from: Node
Methods inherited from: Object