Package org.assertj.core.error
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.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
PACKAGE_PRIVATE
-
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format, formatter
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ClassModifierShouldBe(java.lang.Class<?> actual, boolean positive, java.lang.String modifier)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.lang.String
modifiers(java.lang.Class<?> actual)
static ErrorMessageFactory
shouldBeFinal(java.lang.Class<?> actual)
Creates a new instance for a positive check of thefinal
modifier.static ErrorMessageFactory
shouldBePackagePrivate(java.lang.Class<?> actual)
Creates a new instance for a positive check of thepackage-private
modifier.static ErrorMessageFactory
shouldBeProtected(java.lang.Class<?> actual)
Creates a new instance for a positive check of theprotected
modifier.static ErrorMessageFactory
shouldBePublic(java.lang.Class<?> actual)
Creates a new instance for a positive check of thepublic
modifier.static ErrorMessageFactory
shouldBeStatic(java.lang.Class<?> actual)
Creates a new instance for a positive check of thestatic
modifier.static ErrorMessageFactory
shouldNotBeFinal(java.lang.Class<?> actual)
Creates a new instance for a negative check of thefinal
modifier.static ErrorMessageFactory
shouldNotBeStatic(java.lang.Class<?> actual)
Creates a new instance for a negative check of thestatic
modifier.-
Methods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, create, equals, hashCode, toString, unquotedString
-
-
-
-
Field Detail
-
PACKAGE_PRIVATE
private static final java.lang.String PACKAGE_PRIVATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
shouldBeFinal
public static ErrorMessageFactory shouldBeFinal(java.lang.Class<?> actual)
Creates a new instance for a positive check of thefinal
modifier.- Parameters:
actual
- the actual value in the failed assertion.- Returns:
- the created
ErrorMessageFactory
.
-
shouldNotBeFinal
public static ErrorMessageFactory shouldNotBeFinal(java.lang.Class<?> actual)
Creates a new instance for a negative check of thefinal
modifier.- Parameters:
actual
- the actual value in the failed assertion.- Returns:
- the created
ErrorMessageFactory
.
-
shouldBePublic
public static ErrorMessageFactory shouldBePublic(java.lang.Class<?> actual)
Creates a new instance for a positive check of thepublic
modifier.- Parameters:
actual
- the actual value in the failed assertion.- Returns:
- the created
ErrorMessageFactory
.
-
shouldBeProtected
public static ErrorMessageFactory shouldBeProtected(java.lang.Class<?> actual)
Creates a new instance for a positive check of theprotected
modifier.- Parameters:
actual
- the actual value in the failed assertion.- Returns:
- the created
ErrorMessageFactory
.
-
shouldBePackagePrivate
public static ErrorMessageFactory shouldBePackagePrivate(java.lang.Class<?> actual)
Creates a new instance for a positive check of thepackage-private
modifier.- Parameters:
actual
- the actual value in the failed assertion.- Returns:
- the created
ErrorMessageFactory
.
-
shouldBeStatic
public static ErrorMessageFactory shouldBeStatic(java.lang.Class<?> actual)
Creates a new instance for a positive check of thestatic
modifier.- Parameters:
actual
- the actual value in the failed assertion.- Returns:
- the created
ErrorMessageFactory
.
-
shouldNotBeStatic
public static ErrorMessageFactory shouldNotBeStatic(java.lang.Class<?> actual)
Creates a new instance for a negative check of thestatic
modifier.- Parameters:
actual
- the actual value in the failed assertion.- Returns:
- the created
ErrorMessageFactory
.
-
modifiers
private static java.lang.String modifiers(java.lang.Class<?> actual)
-
-