apt-mirror-api/src/main/java/com/sun/mirror/util/DeclarationFilter.java
public static DeclarationFilter getFilter(
			final Class<? extends Declaration> kind) {
		return new DeclarationFilter() {
			public boolean matches(Declaration d) {
				return kind.isInstance(d);
			}
		};
	}
public static DeclarationFilter getFilter(
			final Class<? extends Declaration> kind) {
		return new DeclarationFilter() {
			public boolean matches(Declaration d) {
				return kind.isInstance(d);
			}
		};
	}
public static DeclarationFilter getFilter ( final Class < ? extends Declaration > kind ) { return new DeclarationFilter ( ) { public boolean matches ( Declaration d ) { return kind . isInstance ( d ) ; } } ; }
Returns a filter that selects declarations of a particular kind.
For example, there may be a filter that selects only class
declarations, or only fields.
The filter will select declarations of the specified kind,
and also any subtypes of that kind; for example, a field filter
will also select enum constants.

@param kind the kind of declarations to select
@return a filter that selects declarations of a particular kind
Returns a filter that selects declarations of a particular kind . For example there may be a filter that selects only class declarations or only fields . The filter will select declarations of the specified kind and also any subtypes of that kind ; for example a field filter will also select enum constants .