![JAR search and dependency download from the Maven repository](/logo.png)
org.sweble.wikitext.lazy.parser.XmlElement 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.*;
/**
* XML Element
*/
public class XmlElement
extends InnerNode.InnerNode2
implements NamedXmlElement
{
private static final long serialVersionUID = 1L;
// =========================================================================
public XmlElement()
{
super(new NodeList(), new NodeList());
}
public XmlElement(String name, Boolean empty, NodeList xmlAttributes, NodeList body)
{
super(xmlAttributes, body);
setName(name);
setEmpty(empty);
}
@Override
public int getNodeType()
{
return org.sweble.wikitext.lazy.AstNodeTypes.NT_XML_ELEMENT;
}
// =========================================================================
// Properties
private String name;
public final String getName()
{
return this.name;
}
public final String setName(String name)
{
String old = this.name;
this.name = name;
return old;
}
private Boolean empty;
public final Boolean getEmpty()
{
return this.empty;
}
public final Boolean setEmpty(Boolean empty)
{
Boolean old = this.empty;
this.empty = empty;
return old;
}
@Override
public final int getPropertyCount()
{
return 2;
}
@Override
public final AstNodePropertyIterator propertyIterator()
{
return new AstNodePropertyIterator()
{
@Override
protected int getPropertyCount()
{
return 2;
}
@Override
protected String getName(int index)
{
switch (index)
{
case 0:
return "name";
case 1:
return "empty";
default:
throw new IndexOutOfBoundsException();
}
}
@Override
protected Object getValue(int index)
{
switch (index)
{
case 0:
return XmlElement.this.getName();
case 1:
return XmlElement.this.getEmpty();
default:
throw new IndexOutOfBoundsException();
}
}
@Override
protected Object setValue(int index, Object value)
{
switch (index)
{
case 0:
return XmlElement.this.setName((String) value);
case 1:
return XmlElement.this.setEmpty((Boolean) value);
default:
throw new IndexOutOfBoundsException();
}
}
};
}
// =========================================================================
// Children
public final void setXmlAttributes(NodeList xmlAttributes)
{
set(0, xmlAttributes);
}
public final NodeList getXmlAttributes()
{
return (NodeList) get(0);
}
public final void setBody(NodeList body)
{
set(1, body);
}
public final NodeList getBody()
{
return (NodeList) get(1);
}
private static final String[] CHILD_NAMES = new String[] {"xmlAttributes", "body"};
public final String[] getChildNames()
{
return CHILD_NAMES;
}
// =========================================================================
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy