com.sun.hk2.component
Class InhabitantsScanner

java.lang.Object
  extended by com.sun.hk2.component.InhabitantsScanner
All Implemented Interfaces:
java.io.Closeable, java.lang.Iterable<InhabitantParser>

public class InhabitantsScanner
extends java.lang.Object
implements java.lang.Iterable<InhabitantParser>, java.io.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(java.io.InputStream in, java.lang.String systemId)
           
 
Method Summary
 void close()
           
 int getLineNumber()
           
 java.lang.String getSystemId()
           
 java.util.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(java.io.InputStream in,
                          java.lang.String systemId)
                   throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getSystemId

public java.lang.String getSystemId()

getLineNumber

public int getLineNumber()

iterator

public java.util.Iterator<InhabitantParser> iterator()
Specified by:
iterator in interface java.lang.Iterable<InhabitantParser>

close

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


Copyright © 2010 Oracle Corporation. All Rights Reserved.