org.sweble.wikitext.lazy.preprocessor.LazyPreprocessedPage 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.preprocessor;
import de.fau.cs.osr.ptk.common.ast.*;
import java.util.List;
import de.fau.cs.osr.ptk.common.Warning;
import de.fau.cs.osr.ptk.common.EntityMap;
/**
* LazyPreprocessedPage
* Grammar
*/
public class LazyPreprocessedPage
extends ContentNode
{
private static final long serialVersionUID = 1L;
// =========================================================================
public LazyPreprocessedPage()
{
super();
}
public LazyPreprocessedPage(NodeList content, List warnings)
{
super(content);
setWarnings(warnings);
}
public LazyPreprocessedPage(NodeList content, List warnings, EntityMap entityMap)
{
super(content);
setWarnings(warnings);
setEntityMap(entityMap);
}
@Override
public int getNodeType()
{
return org.sweble.wikitext.lazy.AstNodeTypes.NT_LAZY_PREPROCESSED_PAGE;
}
// =========================================================================
// Properties
private List warnings;
public final List getWarnings()
{
return this.warnings;
}
public final List setWarnings(List warnings)
{
List old = this.warnings;
this.warnings = warnings;
return old;
}
private EntityMap entityMap;
public final EntityMap getEntityMap()
{
return this.entityMap;
}
public final EntityMap setEntityMap(EntityMap entityMap)
{
EntityMap old = this.entityMap;
this.entityMap = entityMap;
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 "warnings";
case 1:
return "entityMap";
default:
throw new IndexOutOfBoundsException();
}
}
@Override
protected Object getValue(int index)
{
switch (index)
{
case 0:
return LazyPreprocessedPage.this.getWarnings();
case 1:
return LazyPreprocessedPage.this.getEntityMap();
default:
throw new IndexOutOfBoundsException();
}
}
@Override
protected Object setValue(int index, Object value)
{
switch (index)
{
case 0:
return LazyPreprocessedPage.this.setWarnings((List) value);
case 1:
return LazyPreprocessedPage.this.setEntityMap((EntityMap) value);
default:
throw new IndexOutOfBoundsException();
}
}
};
}
// =========================================================================
// Children
// =========================================================================
}