de.smartics.analysis.javadoc.filter
Class ImplementsInterfaceFilter

Package class diagram package ImplementsInterfaceFilter
java.lang.Object
  extended by de.smartics.analysis.javadoc.filter.ImplementsInterfaceFilter
All Implemented Interfaces:
Filter, Serializable

public class ImplementsInterfaceFilter
     
     
extends Object
implements Filter, Serializable

Filters out all classes that do not implement a certain interface.

Author:
Robert Reiner
See Also:
Serialized Form

Constructor Summary
ImplementsInterfaceFilter(Class<?> type)
          Default constructor.
 
Method Summary
 com.sun.javadoc.ClassDoc accept(com.sun.javadoc.Doc doc)
          Filters the given Javadoc information.
 Class<?> getType()
          Returns the interface class to filter with.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImplementsInterfaceFilter

public ImplementsInterfaceFilter(Class<?> type)
                          throws NullPointerException
Default constructor.

Parameters:
type - the interface class to filter with.
Throws:
NullPointerException - if type is null.
Method Detail

getType

public Class<?> getType()
Returns the interface class to filter with. Classes that implement this interface are considered, all others are filtered out.

Returns:
the interface class to filter with.

accept

public com.sun.javadoc.ClassDoc accept(com.sun.javadoc.Doc doc)
Filters the given Javadoc information.

If the given argument is null, null is returned. This implies that the given information is not accepted.

Specified by:
accept in interface Filter
Parameters:
doc - the Javadoc information to check for filtering.
See Also:
Filter.accept(com.sun.javadoc.Doc)
Returns:
null if the element is not to accepted, an instance of Doc if is is. Note that the returned Doc may be a sub element of the Doc element passed as argument.


Copyright © 2008-2011 Kronseder & Reiner GmbH - smartics. All Rights Reserved.