public class PackageFilter extends Object implements AnnotationFilter
AnnotationFilter that accepts annotated elements appearing in classes
that belong to specific packages.| Constructor and Description |
|---|
PackageFilter()
Creates a new SimpleAnnotationFilter instance.
|
PackageFilter(Class<? extends Annotation>... annotations)
Creates a new SimpleAnnotationFilter instance.
|
PackageFilter(String... annotations)
Creates a new SimpleAnnotationFilter instance.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<String> |
acceptAnnotation(String rawTypeName)
If the given raw type name identifies an accepted
Annotation, returns the annotation class. |
boolean |
acceptClass(String className)
Returns true if the given class belongs to an accepted package.
|
PackageFilter |
annotation(Class<? extends Annotation>... annotations)
Adds to the set of accepted annotations.
|
PackageFilter |
annotation(String... annotations)
Adds to the set of accepted annotations.
|
Set<String> |
getAnnotations()
Returns the annotations accepted by this filter.
|
Set<String> |
getPackages()
Returns the packages accepted by this filter.
|
PackageFilter |
inPackage(Collection<String> packageNames)
Adds to the set of accepted packages.
|
PackageFilter |
inPackage(String... packageNames)
Adds to the set of accepted packages.
|
String |
toString() |
public PackageFilter()
@SafeVarargs public PackageFilter(Class<? extends Annotation>... annotations)
public PackageFilter(String... annotations)
@SafeVarargs public final PackageFilter annotation(Class<? extends Annotation>... annotations)
public PackageFilter annotation(String... annotations)
public PackageFilter inPackage(String... packageNames)
public PackageFilter inPackage(Collection<String> packageNames)
public Optional<String> acceptAnnotation(String rawTypeName)
Annotation, returns the annotation class.
Otherwise, returns empty.acceptAnnotation in interface AnnotationFilterpublic boolean acceptClass(String className)
packageName.acceptClass in interface AnnotationFilterCopyright © 2025 The Cornutum Project. All rights reserved.