Top Description Fields Constructors Methods
org.antlr.v4.tool

public Class Attribute

extends Object
Class Inheritance
Imports
org.antlr.runtime.Token

Track the names of attributes defined in arg lists, return values, scope blocks etc...

Field Summary

Modifier and TypeField and Description
public String
decl

The entire declaration such as "String foo" or "x:int"

public AttributeDict
dict

Who contains us?

public String
initValue

The optional attribute initialization expression

public String
name

The name of the attribute "foo"

public Token
token

A Token giving the position of the name of this attribute in the grammar.

public String
type

The type; might be empty such as for Python which has no static typing

Constructor Summary

AccessConstructor and Description
public
public
public
Attribute(String name, String decl)

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

declback to summary
public String decl

The entire declaration such as "String foo" or "x:int"

dictback to summary
public AttributeDict dict

Who contains us?

initValueback to summary
public String initValue

The optional attribute initialization expression

nameback to summary
public String name

The name of the attribute "foo"

tokenback to summary
public Token token

A Token giving the position of the name of this attribute in the grammar.

typeback to summary
public String type

The type; might be empty such as for Python which has no static typing

Constructor Detail

Attributeback to summary
public Attribute()
Attributeback to summary
public Attribute(String name)
Attributeback to summary
public Attribute(String name, String decl)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override