org.glassfish.hk2.inhabitants
Class InhabitantsScanner

java.lang.Object
  extended by org.glassfish.hk2.inhabitants.InhabitantsScanner
All Implemented Interfaces:
Closeable, Iterable<InhabitantParser>

public class InhabitantsScanner
extends Object
implements Iterable<InhabitantParser>, Closeable

Scans the stream that follows the /META-INF/inhabitants/* format.

This class implements Iterable so that it can be used in for-each loop, but it cannot parse the same stream twice.

Author:
Kohsuke Kawaguchi

Constructor Summary
InhabitantsScanner(InputStream in, String systemId)
           
 
Method Summary
 void close()
           
 int getLineNumber()
           
 String getSystemId()
           
 Iterator<InhabitantParser> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InhabitantsScanner

public InhabitantsScanner(InputStream in,
                          String systemId)
                   throws IOException
Throws:
IOException
Method Detail

getSystemId

public String getSystemId()

getLineNumber

public int getLineNumber()

iterator

public Iterator<InhabitantParser> iterator()
Specified by:
iterator in interface Iterable<InhabitantParser>

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException


Copyright © 2013 Oracle Corporation. All Rights Reserved.