org.sweble.wikitext.lazy.parser.LinkOptionKeyword Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swc-parser-lazy Show documentation
Show all versions of swc-parser-lazy Show documentation
A parser for MediaWiki's Wikitext.
/*
* This file is auto-generated.
* DO NOT MODIFY MANUALLY!
*
* Generated by AstNodeGenerator.
* Last generated: 2014-09-12 00:37:37.
*/
package org.sweble.wikitext.lazy.parser;
import de.fau.cs.osr.ptk.common.ast.*;
/**
* Link Option: Keyword
* Grammar
*
* LinkOptionKeyword ::= Ws* LinkOptionKeyword Ws*
*
*
*/
public class LinkOptionKeyword
extends LeafNode
{
private static final long serialVersionUID = 1L;
// =========================================================================
public LinkOptionKeyword()
{
super();
}
public LinkOptionKeyword(String keyword)
{
super();
setKeyword(keyword);
}
@Override
public int getNodeType()
{
return org.sweble.wikitext.lazy.AstNodeTypes.NT_LINK_OPTION_KEYWORD;
}
// =========================================================================
// Properties
private String keyword;
public final String getKeyword()
{
return this.keyword;
}
public final String setKeyword(String keyword)
{
String old = this.keyword;
this.keyword = keyword;
return old;
}
@Override
public final int getPropertyCount()
{
return 1;
}
@Override
public final AstNodePropertyIterator propertyIterator()
{
return new AstNodePropertyIterator()
{
@Override
protected int getPropertyCount()
{
return 1;
}
@Override
protected String getName(int index)
{
switch (index)
{
case 0:
return "keyword";
default:
throw new IndexOutOfBoundsException();
}
}
@Override
protected Object getValue(int index)
{
switch (index)
{
case 0:
return LinkOptionKeyword.this.getKeyword();
default:
throw new IndexOutOfBoundsException();
}
}
@Override
protected Object setValue(int index, Object value)
{
switch (index)
{
case 0:
return LinkOptionKeyword.this.setKeyword((String) value);
default:
throw new IndexOutOfBoundsException();
}
}
};
}
// =========================================================================
// Children
// =========================================================================
}