org.codehaus.mojo.animal_sniffer
Class ClassFileVisitor

java.lang.Object
  extended by org.codehaus.mojo.animal_sniffer.ClassFileVisitor
Direct Known Subclasses:
ClassListBuilder, Main, SignatureBuilder, SignatureChecker

public abstract class ClassFileVisitor
extends Object

Author:
Kohsuke Kawaguchi

Constructor Summary
ClassFileVisitor()
           
 
Method Summary
 boolean isCheckJars()
           
 void process(File file)
          Recursively finds class files and invokes process(String, InputStream)
 void process(File[] files)
          Multi-arg version of process(File).
protected abstract  void process(String name, InputStream image)
           
protected  void processClassFile(File file)
           
protected  void processDirectory(File dir)
           
protected  void processJarFile(File file)
           
 void setCheckJars(boolean checkJars)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassFileVisitor

public ClassFileVisitor()
Method Detail

isCheckJars

public boolean isCheckJars()

setCheckJars

public void setCheckJars(boolean checkJars)

process

public void process(File[] files)
             throws IOException
Multi-arg version of process(File).

Throws:
IOException

process

public void process(File file)
             throws IOException
Recursively finds class files and invokes process(String, InputStream)

Parameters:
file - Directory full of class files or jar files (in which case all of them are processed recursively), or a class file (in which case that single class is processed), or a jar file (in which case all the classes in this jar file are processed.)
Throws:
IOException

processDirectory

protected void processDirectory(File dir)
                         throws IOException
Throws:
IOException

processJarFile

protected void processJarFile(File file)
                       throws IOException
Throws:
IOException

processClassFile

protected void processClassFile(File file)
                         throws IOException
Throws:
IOException

process

protected abstract void process(String name,
                                InputStream image)
                         throws IOException
Parameters:
name - Displayable name to identify what class file we are processing
image - Class file image.
Throws:
IOException


Copyright © 2008-2011 Codehaus. All Rights Reserved.