本文整理匯總了Java中org.codehaus.plexus.util.xml.pull.XmlPullParserException.getLineNumber方法的典型用法代碼示例。如果您正苦於以下問題:Java XmlPullParserException.getLineNumber方法的具體用法?Java XmlPullParserException.getLineNumber怎麽用?Java XmlPullParserException.getLineNumber使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.codehaus.plexus.util.xml.pull.XmlPullParserException
的用法示例。
在下文中一共展示了XmlPullParserException.getLineNumber方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: read
import org.codehaus.plexus.util.xml.pull.XmlPullParserException; //導入方法依賴的package包/類
public Metadata read( Reader input, Map<String, ?> options )
throws IOException
{
if ( input == null )
{
throw new IllegalArgumentException( "input reader missing" );
}
try
{
MetadataXpp3Reader r = new MetadataXpp3Reader();
return r.read( input, isStrict( options ) );
}
catch ( XmlPullParserException e )
{
throw new MetadataParseException( e.getMessage(), e.getLineNumber(), e.getColumnNumber(), e );
}
finally
{
IOUtil.close( input );
}
}
示例2: read
import org.codehaus.plexus.util.xml.pull.XmlPullParserException; //導入方法依賴的package包/類
public Settings read( Reader input, Map<String, ?> options )
throws IOException
{
if ( input == null )
{
throw new IllegalArgumentException( "input reader missing" );
}
try
{
SettingsXpp3Reader r = new SettingsXpp3Reader();
return r.read( input, isStrict( options ) );
}
catch ( XmlPullParserException e )
{
throw new SettingsParseException( e.getMessage(), e.getLineNumber(), e.getColumnNumber(), e );
}
finally
{
IOUtil.close( input );
}
}
示例3: read
import org.codehaus.plexus.util.xml.pull.XmlPullParserException; //導入方法依賴的package包/類
private Model read( Reader reader, boolean strict, InputSource source )
throws IOException
{
try
{
if ( source != null )
{
return new MavenXpp3ReaderEx().read( reader, strict, source );
}
else
{
return new MavenXpp3Reader().read( reader, strict );
}
}
catch ( XmlPullParserException e )
{
throw new ModelParseException( e.getMessage(), e.getLineNumber(), e.getColumnNumber(), e );
}
}