Class ClassModifierShouldBe

java.lang.Object
org.assertj.core.error.BasicErrorMessageFactory
org.assertj.core.error.ClassModifierShouldBe
All Implemented Interfaces:
ErrorMessageFactory

public class ClassModifierShouldBe extends BasicErrorMessageFactory
Error message factory for an assertion which checks that a class has (or has not) a specific modifier.
Author:
Michal Kordas
  • Method Details

    • shouldBeFinal

      public static ErrorMessageFactory shouldBeFinal(Class<?> actual)
      Creates a new instance for a positive check of the final modifier.
      Parameters:
      actual - the actual value in the failed assertion.
      Returns:
      the created ErrorMessageFactory.
    • shouldNotBeFinal

      public static ErrorMessageFactory shouldNotBeFinal(Class<?> actual)
      Creates a new instance for a negative check of the final modifier.
      Parameters:
      actual - the actual value in the failed assertion.
      Returns:
      the created ErrorMessageFactory.
    • shouldBePublic

      public static ErrorMessageFactory shouldBePublic(Class<?> actual)
      Creates a new instance for a positive check of the public modifier.
      Parameters:
      actual - the actual value in the failed assertion.
      Returns:
      the created ErrorMessageFactory.
    • shouldBeProtected

      public static ErrorMessageFactory shouldBeProtected(Class<?> actual)
      Creates a new instance for a positive check of the protected modifier.
      Parameters:
      actual - the actual value in the failed assertion.
      Returns:
      the created ErrorMessageFactory.
    • shouldBePackagePrivate

      public static ErrorMessageFactory shouldBePackagePrivate(Class<?> actual)
      Creates a new instance for a positive check of the package-private modifier.
      Parameters:
      actual - the actual value in the failed assertion.
      Returns:
      the created ErrorMessageFactory.
    • shouldBeStatic

      public static ErrorMessageFactory shouldBeStatic(Class<?> actual)
      Creates a new instance for a positive check of the static modifier.
      Parameters:
      actual - the actual value in the failed assertion.
      Returns:
      the created ErrorMessageFactory.
    • shouldNotBeStatic

      public static ErrorMessageFactory shouldNotBeStatic(Class<?> actual)
      Creates a new instance for a negative check of the static modifier.
      Parameters:
      actual - the actual value in the failed assertion.
      Returns:
      the created ErrorMessageFactory.