Interface ClassesThat<CONJUNCTION>

    • Method Detail

      • haveFullyQualifiedName

        CONJUNCTION haveFullyQualifiedName​(java.lang.String name)
        Matches classes by their fully qualified class name.
        Parameters:
        name - The fully qualified class name
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • dontHaveFullyQualifiedName

        CONJUNCTION dontHaveFullyQualifiedName​(java.lang.String name)
        Matches classes that don't have a certain fully qualified class name.
        Parameters:
        name - The fully qualified class name
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • haveSimpleName

        CONJUNCTION haveSimpleName​(java.lang.String name)
        Matches classes by their simple class name.
        Parameters:
        name - The simple class name
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • dontHaveSimpleName

        CONJUNCTION dontHaveSimpleName​(java.lang.String name)
        Matches classes that don't have a certain simple class name.
        Parameters:
        name - The simple class name
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • haveNameMatching

        CONJUNCTION haveNameMatching​(java.lang.String regex)
        Matches classes with a fully qualified class name matching a given regular expression.
        Parameters:
        regex - A regular expression
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • haveNameNotMatching

        CONJUNCTION haveNameNotMatching​(java.lang.String regex)
        Matches classes with a fully qualified class name not matching a given regular expression.
        Parameters:
        regex - A regular expression
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • haveSimpleNameStartingWith

        CONJUNCTION haveSimpleNameStartingWith​(java.lang.String prefix)
        Matches classes with a simple class name starting with a given prefix.
        Parameters:
        prefix - A prefix the simple class name should start with
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • haveSimpleNameNotStartingWith

        CONJUNCTION haveSimpleNameNotStartingWith​(java.lang.String prefix)
        Matches classes with a simple class name not starting with a given prefix.
        Parameters:
        prefix - A prefix the simple class name should not start with
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • haveSimpleNameContaining

        CONJUNCTION haveSimpleNameContaining​(java.lang.String infix)
        Matches classes with a simple class name containing the specified infix.
        Parameters:
        infix - An infix the simple class name should contain
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • haveSimpleNameNotContaining

        CONJUNCTION haveSimpleNameNotContaining​(java.lang.String infix)
        Matches classes with a simple class name not containing the specified infix.
        Parameters:
        infix - An infix the simple class name should not contain
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • haveSimpleNameEndingWith

        CONJUNCTION haveSimpleNameEndingWith​(java.lang.String suffix)
        Matches classes with a simple class name ending with a given suffix.
        Parameters:
        suffix - A suffix the simple class name should end with
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • haveSimpleNameNotEndingWith

        CONJUNCTION haveSimpleNameNotEndingWith​(java.lang.String suffix)
        Matches classes with a simple class name not ending with a given suffix.
        Parameters:
        suffix - A suffix the simple class name should not end with
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • resideInAPackage

        CONJUNCTION resideInAPackage​(java.lang.String packageIdentifier)
        Matches classes residing in a package matching the supplied package identifier.
        Parameters:
        packageIdentifier - A string identifying packages, for details see PackageMatcher
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • resideInAnyPackage

        CONJUNCTION resideInAnyPackage​(java.lang.String... packageIdentifiers)
        Matches classes residing in a package matching any of the supplied package identifiers.
        Parameters:
        packageIdentifiers - Strings identifying packages, for details see PackageMatcher
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • resideOutsideOfPackage

        CONJUNCTION resideOutsideOfPackage​(java.lang.String packageIdentifier)
        Matches classes not residing in a package matching the supplied package identifier.
        Parameters:
        packageIdentifier - A string identifying packages, for details see PackageMatcher
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • resideOutsideOfPackages

        CONJUNCTION resideOutsideOfPackages​(java.lang.String... packageIdentifiers)
        Matches classes not residing in a package matching any of the supplied package identifiers.
        Parameters:
        packageIdentifiers - Strings identifying packages, for details see PackageMatcher
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • arePublic

        CONJUNCTION arePublic()
        Matches public classes.
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areNotPublic

        CONJUNCTION areNotPublic()
        Matches non-public classes.
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areProtected

        CONJUNCTION areProtected()
        Matches protected classes.
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areNotProtected

        CONJUNCTION areNotProtected()
        Matches non-protected classes.
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • arePackagePrivate

        CONJUNCTION arePackagePrivate()
        Matches package private classes.
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areNotPackagePrivate

        CONJUNCTION areNotPackagePrivate()
        Matches non-package private classes.
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • arePrivate

        CONJUNCTION arePrivate()
        Matches private classes.
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areNotPrivate

        CONJUNCTION areNotPrivate()
        Matches non-private classes.
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areAnnotatedWith

        CONJUNCTION areAnnotatedWith​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
        Matches classes annotated with a certain type of annotation.
        Parameters:
        annotationType - Specific type of Annotation
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areNotAnnotatedWith

        CONJUNCTION areNotAnnotatedWith​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
        Matches classes not annotated with a certain type of annotation.
        Parameters:
        annotationType - Specific type of Annotation
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areAnnotatedWith

        CONJUNCTION areAnnotatedWith​(java.lang.String annotationTypeName)
        Matches classes annotated with a certain type of annotation.
        Parameters:
        annotationTypeName - Fully qualified class name of a specific type of Annotation
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areNotAnnotatedWith

        CONJUNCTION areNotAnnotatedWith​(java.lang.String annotationTypeName)
        Matches classes not annotated with a certain type of annotation.
        Parameters:
        annotationTypeName - Fully qualified class name of a specific type of Annotation
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areAnnotatedWith

        CONJUNCTION areAnnotatedWith​(DescribedPredicate<? super JavaAnnotation> predicate)
        Matches classes annotated with a certain annotation, where matching annotations are determined by the supplied predicate.
        Parameters:
        predicate - A predicate defining matching JavaAnnotations
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areNotAnnotatedWith

        CONJUNCTION areNotAnnotatedWith​(DescribedPredicate<? super JavaAnnotation> predicate)
        Matches classes not annotated with a certain annotation, where matching annotations are determined by the supplied predicate.
        Parameters:
        predicate - A predicate defining matching JavaAnnotations
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areMetaAnnotatedWith

        CONJUNCTION areMetaAnnotatedWith​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
        Matches classes meta-annotated with a certain type of annotation. A meta-annotation is an annotation that is declared on another annotation.
        Parameters:
        annotationType - Specific type of Annotation
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areNotMetaAnnotatedWith

        CONJUNCTION areNotMetaAnnotatedWith​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
        Matches classes not meta-annotated with a certain type of annotation. A meta-annotation is an annotation that is declared on another annotation.
        Parameters:
        annotationType - Specific type of Annotation
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areMetaAnnotatedWith

        CONJUNCTION areMetaAnnotatedWith​(java.lang.String annotationTypeName)
        Matches classes meta-annotated with a certain type of annotation. A meta-annotation is an annotation that is declared on another annotation.
        Parameters:
        annotationTypeName - Fully qualified class name of a specific type of Annotation
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areNotMetaAnnotatedWith

        CONJUNCTION areNotMetaAnnotatedWith​(java.lang.String annotationTypeName)
        Matches classes not meta-annotated with a certain type of annotation. A meta-annotation is an annotation that is declared on another annotation.
        Parameters:
        annotationTypeName - Fully qualified class name of a specific type of Annotation
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areMetaAnnotatedWith

        CONJUNCTION areMetaAnnotatedWith​(DescribedPredicate<? super JavaAnnotation> predicate)
        Matches classes meta-annotated with a certain annotation, where matching meta-annotations are determined by the supplied predicate. A meta-annotation is an annotation that is declared on another annotation.
        Parameters:
        predicate - A predicate defining matching JavaAnnotations
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areNotMetaAnnotatedWith

        CONJUNCTION areNotMetaAnnotatedWith​(DescribedPredicate<? super JavaAnnotation> predicate)
        Matches classes not meta-annotated with a certain annotation, where matching meta-annotations are determined by the supplied predicate. A meta-annotation is an annotation that is declared on another annotation.
        Parameters:
        predicate - A predicate defining matching JavaAnnotations
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • implement

        CONJUNCTION implement​(java.lang.Class<?> type)
        Matches classes that implement a certain interface.
        Parameters:
        type - An interface type matching classes must implement
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • dontImplement

        CONJUNCTION dontImplement​(java.lang.Class<?> type)
        Matches classes that don't implement a certain interface. This is the negation of implement(Class).
        Parameters:
        type - An interface type matching classes must not implement
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • implement

        CONJUNCTION implement​(java.lang.String typeName)
        Matches classes that implement a certain interface with the given type name. This is equivalent to implement(Class), but doesn't depend on having a certain type on the classpath.
        Parameters:
        typeName - Name of an interface type matching classes must implement
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • dontImplement

        CONJUNCTION dontImplement​(java.lang.String typeName)
        Matches classes that don't implement a certain interface with the given type name. This is equivalent to dontImplement(Class), but doesn't depend on having a certain type on the classpath.
        Parameters:
        typeName - Name of an interface type matching classes must not implement
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • implement

        CONJUNCTION implement​(DescribedPredicate<? super JavaClass> predicate)
        Matches classes that implement a certain interface matching the given predicate. For example, a call with HasName.Predicates.name(String) would be equivalent to implement(String), but the approach is a lot more generic.
        Parameters:
        predicate - A predicate identifying interfaces matching classes must implement
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • dontImplement

        CONJUNCTION dontImplement​(DescribedPredicate<? super JavaClass> predicate)
        Matches classes that don't implement a certain interface matching the given predicate. This is the negation of implement(DescribedPredicate).
        Parameters:
        predicate - A predicate identifying interfaces matching classes must not implement
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areAssignableTo

        CONJUNCTION areAssignableTo​(java.lang.Class<?> type)
        Matches classes assignable to a certain type (compare Class.isAssignableFrom(Class) to terminology). A simple example for this predicate would be
        
           assignableTo(Object.class).apply(importedStringClass); // --> returns true
           assignableTo(String.class).apply(importedStringClass); // --> returns true
           assignableTo(List.class).apply(importedStringClass); // --> returns false
         
        Parameters:
        type - An upper type bound to match imported classes against (imported subtypes will match)
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areNotAssignableTo

        CONJUNCTION areNotAssignableTo​(java.lang.Class<?> type)
        Matches classes not assignable to a certain type. This is the negation of areAssignableTo(Class).
        Parameters:
        type - An upper type bound imported classes should NOT have
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areAssignableTo

        CONJUNCTION areAssignableTo​(java.lang.String typeName)
        Matches classes assignable to a certain type with the given type name. This is equivalent to areAssignableTo(Class), but doesn't depend on having a certain type on the classpath.
        Parameters:
        typeName - Name of an upper type bound to match imported classes against (imported subtypes will match)
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areNotAssignableTo

        CONJUNCTION areNotAssignableTo​(java.lang.String typeName)
        Matches classes not assignable to a certain type with the given type name. This is equivalent to areNotAssignableTo(Class), but doesn't depend on having a certain type on the classpath.
        Parameters:
        typeName - Name of an upper type bound imported classes should NOT have
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areAssignableTo

        CONJUNCTION areAssignableTo​(DescribedPredicate<? super JavaClass> predicate)
        Matches classes assignable to a certain type matching the given predicate. For example, a call with HasName.Predicates.name(String) would be equivalent to areAssignableTo(String), but the approach is a lot more generic.
        Parameters:
        predicate - A predicate identifying an upper type bound to match imported classes against (imported subtypes will match)
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areNotAssignableTo

        CONJUNCTION areNotAssignableTo​(DescribedPredicate<? super JavaClass> predicate)
        Matches classes not assignable to a certain type matching the given predicate. This is the negation of areAssignableTo(DescribedPredicate).
        Parameters:
        predicate - A predicate identifying an upper type bound imported classes should NOT have
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areAssignableFrom

        CONJUNCTION areAssignableFrom​(java.lang.Class<?> type)
        Matches classes assignable from a certain type (compare Class.isAssignableFrom(Class) to terminology). This is roughly equivalent to the use of reflection:
        
           someClass.class.isAssignableFrom(type);
         
        A simple example for this predicate would be
        
           assignableFrom(ArrayList.class).apply(importedArrayListClass); // --> returns true
           assignableFrom(ArrayList.class).apply(importedListClass); // --> returns true
           assignableFrom(ArrayList.class).apply(importedStringClass); // --> returns false
         
        Parameters:
        type - A lower type bound to match imported classes against (imported supertypes will match)
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areNotAssignableFrom

        CONJUNCTION areNotAssignableFrom​(java.lang.Class<?> type)
        Matches classes not assignable from a certain type. This is the negation of areAssignableFrom(Class).
        Parameters:
        type - A lower type bound imported classes should NOT have
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areAssignableFrom

        CONJUNCTION areAssignableFrom​(java.lang.String typeName)
        Matches classes assignable from a certain type with the given type name. This is equivalent to areAssignableFrom(Class), but doesn't depend on having a certain type on the classpath.
        Parameters:
        typeName - Name of a lower type bound to match imported classes against (imported supertypes will match)
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areNotAssignableFrom

        CONJUNCTION areNotAssignableFrom​(java.lang.String typeName)
        Matches classes not assignable from a certain type with the given type name. This is equivalent to areNotAssignableFrom(Class), but doesn't depend on having a certain type on the classpath.
        Parameters:
        typeName - Name of a lower type bound imported classes should NOT have
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areAssignableFrom

        CONJUNCTION areAssignableFrom​(DescribedPredicate<? super JavaClass> predicate)
        Matches classes assignable from a certain type matching the given predicate. For example, a call with HasName.Predicates.name(String) would be equivalent to areAssignableFrom(String), but the approach is a lot more generic.
        Parameters:
        predicate - A predicate identifying a lower type bound to match imported classes against (imported supertypes will match)
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areNotAssignableFrom

        CONJUNCTION areNotAssignableFrom​(DescribedPredicate<? super JavaClass> predicate)
        Matches classes not assignable from a certain type matching the given predicate. This is the negation of areAssignableFrom(DescribedPredicate).
        Parameters:
        predicate - A predicate identifying a lower type bound imported classes should NOT have
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areInterfaces

        CONJUNCTION areInterfaces()
        Matches interfaces.
        Returns:
        A syntax conjunction element, which can be completed to form a full rule
      • areNotInterfaces

        CONJUNCTION areNotInterfaces()
        Matches everything except interfaces.
        Returns:
        A syntax conjunction element, which can be completed to form a full rule