public void addDecl(Decl d) {
		d.ctx = this;

		if ( d instanceof ContextGetterDecl ) {
			getters.add(d);
			signatures.add(((ContextGetterDecl) d).getSignatureDecl());
		} else {
			attrs.add(d);
		}
		// add to specific "lists"
		if ( d instanceof TokenTypeDecl ) {
			tokenTypeDecls.add(d);
		}
		else if ( d instanceof TokenListDecl ) {
			tokenListDecls.add(d);
		}
		else if ( d instanceof TokenDecl ) {
			tokenDecls.add(d);
		}
		else if ( d instanceof RuleContextListDecl ) {
			ruleContextListDecls.add(d);
		}
		else if ( d instanceof RuleContextDecl ) {
			ruleContextDecls.add(d);
		}
		else if ( d instanceof AttributeDecl ) {
			attributeDecls.add(d);
		}
	}
This object models the structure holding all of the parameters,
 return values, local variables, and labels associated with a rule.
tool/src/org/antlr/v4/codegen/model/decl/StructDecl.java