* @return LifecycleConfiguration
*/
private LifecycleConfiguration parseLifecycleConfiguration( String tagName, XmlPullParser parser, boolean strict )
throws IOException, XmlPullParserException
{
LifecycleConfiguration lifecycleConfiguration = new LifecycleConfiguration();
java.util.Set parsed = new java.util.HashSet();
int eventType = parser.getEventType();
boolean foundRoot = false;
lifecycleConfiguration.setModelEncoding( parser.getInputEncoding() );
while ( eventType != XmlPullParser.END_DOCUMENT )
{
if ( eventType == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( tagName ) )
{
foundRoot = true;
}
else if ( strict && ! foundRoot )
{
throw new XmlPullParserException( "Expected root element '" + tagName + "' but found '" + parser.getName() + "'", parser, null );
}
else if ( parser.getName().equals( "lifecycle" ) )
{
java.util.List lifecycles = lifecycleConfiguration.getLifecycles();
if ( lifecycles == null )
{
lifecycles = new java.util.ArrayList/*<Lifecycle>*/();
lifecycleConfiguration.setLifecycles( lifecycles );
}
lifecycles.add( parseLifecycle( "lifecycle", parser, strict ) );
}
else if ( strict )
{