Modifier and Type | Field and Description |
---|---|
Collection<MutableReasonDetail> |
AnalysisResult.reasons |
Modifier and Type | Method and Description |
---|---|
static MutableReasonDetail |
MutableReasonDetail.newMutableReasonDetail(String message,
CodeLocation<?> location,
Reason reason) |
Modifier and Type | Method and Description |
---|---|
static AnalysisResult |
AnalysisResult.analysisResult(Dotted className,
IsImmutable isImmutable,
MutableReasonDetail... reasons) |
static AnalysisResult |
AnalysisResult.analysisResult(String className,
IsImmutable isImmutable,
MutableReasonDetail... reasons) |
static AnalysisResult |
AnalysisResult.analysisResult(String dottedClassName,
IsImmutable isImmutable,
MutableReasonDetail reason) |
Modifier and Type | Method and Description |
---|---|
static AnalysisResult |
AnalysisResult.analysisResult(Dotted className,
IsImmutable isImmutable,
Collection<MutableReasonDetail> reasons) |
static AnalysisResult |
AnalysisResult.analysisResult(Dotted className,
IsImmutable isImmutable,
Collection<MutableReasonDetail> reasons,
Collection<AnalysisError> errors) |
static AnalysisResult |
AnalysisResult.analysisResult(String dottedClassName,
IsImmutable isImmutable,
Collection<MutableReasonDetail> mutableReasonDetails) |
Modifier and Type | Field and Description |
---|---|
protected Collection<MutableReasonDetail> |
AsmMutabilityChecker.reasons |
Collection<MutableReasonDetail> |
CheckerResult.reasons |
Modifier and Type | Method and Description |
---|---|
protected MutableReasonDetail |
AsmMutabilityChecker.createReasonDetail(String message,
CodeLocation<?> location,
Reason reason) |
Modifier and Type | Method and Description |
---|---|
static CheckerResult |
CheckerResult.withNoErrors(IsImmutable isImmutable,
Iterable<MutableReasonDetail> reasons) |
Constructor and Description |
---|
CheckerResult(IsImmutable isImmutable,
Iterable<MutableReasonDetail> reasons,
Iterable<AnalysisError> errors) |
Modifier and Type | Method and Description |
---|---|
static org.hamcrest.Matcher<MutableReasonDetail> |
MutabilityMatchers.noReasonsAllowed() |
Modifier and Type | Method and Description |
---|---|
static void |
MutabilityAssert.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
Iterable<org.hamcrest.Matcher<MutableReasonDetail>> allowingAll)
Checks that the result of analysis satisfies the given
Matcher ,
while allowing mismatches in the form of allowed reasons, or fails with
an AssertionError . |
void |
MutabilityAsserter.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
Iterable<org.hamcrest.Matcher<MutableReasonDetail>> allowingAll) |
static void |
MutabilityAssert.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
org.hamcrest.Matcher<MutableReasonDetail> allowing)
Checks that the result of analysis satisfies the given
Matcher ,
while allowing mismatches in the form of an allowed reason, or fails with
an AssertionError . |
void |
MutabilityAsserter.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
org.hamcrest.Matcher<MutableReasonDetail> allowing) |
static void |
MutabilityAssert.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
org.hamcrest.Matcher<MutableReasonDetail> allowingFirst,
org.hamcrest.Matcher<MutableReasonDetail> allowingSecond)
Checks that the result of analysis satisfies the given
Matcher ,
while allowing mismatches in the form of allowed reasons, or fails with
an AssertionError . |
static void |
MutabilityAssert.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
org.hamcrest.Matcher<MutableReasonDetail> allowingFirst,
org.hamcrest.Matcher<MutableReasonDetail> allowingSecond)
Checks that the result of analysis satisfies the given
Matcher ,
while allowing mismatches in the form of allowed reasons, or fails with
an AssertionError . |
void |
MutabilityAsserter.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
org.hamcrest.Matcher<MutableReasonDetail> allowingFirst,
org.hamcrest.Matcher<MutableReasonDetail> allowingSecond) |
void |
MutabilityAsserter.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
org.hamcrest.Matcher<MutableReasonDetail> allowingFirst,
org.hamcrest.Matcher<MutableReasonDetail> allowingSecond) |
static void |
MutabilityAssert.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
org.hamcrest.Matcher<MutableReasonDetail> allowingFirst,
org.hamcrest.Matcher<MutableReasonDetail> allowingSecond,
org.hamcrest.Matcher<MutableReasonDetail> allowingThird)
Checks that the result of analysis satisfies the given
Matcher ,
while allowing mismatches in the form of allowed reasons, or fails with
an AssertionError . |
static void |
MutabilityAssert.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
org.hamcrest.Matcher<MutableReasonDetail> allowingFirst,
org.hamcrest.Matcher<MutableReasonDetail> allowingSecond,
org.hamcrest.Matcher<MutableReasonDetail> allowingThird)
Checks that the result of analysis satisfies the given
Matcher ,
while allowing mismatches in the form of allowed reasons, or fails with
an AssertionError . |
static void |
MutabilityAssert.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
org.hamcrest.Matcher<MutableReasonDetail> allowingFirst,
org.hamcrest.Matcher<MutableReasonDetail> allowingSecond,
org.hamcrest.Matcher<MutableReasonDetail> allowingThird)
Checks that the result of analysis satisfies the given
Matcher ,
while allowing mismatches in the form of allowed reasons, or fails with
an AssertionError . |
void |
MutabilityAsserter.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
org.hamcrest.Matcher<MutableReasonDetail> allowingFirst,
org.hamcrest.Matcher<MutableReasonDetail> allowingSecond,
org.hamcrest.Matcher<MutableReasonDetail> allowingThird) |
void |
MutabilityAsserter.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
org.hamcrest.Matcher<MutableReasonDetail> allowingFirst,
org.hamcrest.Matcher<MutableReasonDetail> allowingSecond,
org.hamcrest.Matcher<MutableReasonDetail> allowingThird) |
void |
MutabilityAsserter.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
org.hamcrest.Matcher<MutableReasonDetail> allowingFirst,
org.hamcrest.Matcher<MutableReasonDetail> allowingSecond,
org.hamcrest.Matcher<MutableReasonDetail> allowingThird) |
static void |
MutabilityAssert.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
org.hamcrest.Matcher<MutableReasonDetail> allowingFirst,
org.hamcrest.Matcher<MutableReasonDetail> allowingSecond,
org.hamcrest.Matcher<MutableReasonDetail> allowingThird,
org.hamcrest.Matcher<MutableReasonDetail>... allowingRest)
Checks that the result of analysis satisfies the given
Matcher ,
while allowing mismatches in the form of allowed reasons, or fails with
an AssertionError . |
static void |
MutabilityAssert.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
org.hamcrest.Matcher<MutableReasonDetail> allowingFirst,
org.hamcrest.Matcher<MutableReasonDetail> allowingSecond,
org.hamcrest.Matcher<MutableReasonDetail> allowingThird,
org.hamcrest.Matcher<MutableReasonDetail>... allowingRest)
Checks that the result of analysis satisfies the given
Matcher ,
while allowing mismatches in the form of allowed reasons, or fails with
an AssertionError . |
static void |
MutabilityAssert.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
org.hamcrest.Matcher<MutableReasonDetail> allowingFirst,
org.hamcrest.Matcher<MutableReasonDetail> allowingSecond,
org.hamcrest.Matcher<MutableReasonDetail> allowingThird,
org.hamcrest.Matcher<MutableReasonDetail>... allowingRest)
Checks that the result of analysis satisfies the given
Matcher ,
while allowing mismatches in the form of allowed reasons, or fails with
an AssertionError . |
void |
MutabilityAsserter.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
org.hamcrest.Matcher<MutableReasonDetail> allowingFirst,
org.hamcrest.Matcher<MutableReasonDetail> allowingSecond,
org.hamcrest.Matcher<MutableReasonDetail> allowingThird,
org.hamcrest.Matcher<MutableReasonDetail>... allowingRest) |
void |
MutabilityAsserter.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
org.hamcrest.Matcher<MutableReasonDetail> allowingFirst,
org.hamcrest.Matcher<MutableReasonDetail> allowingSecond,
org.hamcrest.Matcher<MutableReasonDetail> allowingThird,
org.hamcrest.Matcher<MutableReasonDetail>... allowingRest) |
void |
MutabilityAsserter.assertInstancesOf(Class<?> clazz,
org.hamcrest.Matcher<AnalysisResult> mutabilityMatcher,
org.hamcrest.Matcher<MutableReasonDetail> allowingFirst,
org.hamcrest.Matcher<MutableReasonDetail> allowingSecond,
org.hamcrest.Matcher<MutableReasonDetail> allowingThird,
org.hamcrest.Matcher<MutableReasonDetail>... allowingRest) |
Modifier and Type | Method and Description |
---|---|
static String |
ReasonsFormatter.formatSingleReason(MutableReasonDetail reason) |
Modifier and Type | Method and Description |
---|---|
static String |
ReasonsFormatter.formatReasons(Collection<MutableReasonDetail> reasons) |
Modifier and Type | Method and Description |
---|---|
org.hamcrest.Matcher<MutableReasonDetail> |
ProvidedOtherClass.areAlsoImmutable()
Assumes that the selected type is immutable, preventing warnings related
to transitive mutability.
|
org.hamcrest.Matcher<MutableReasonDetail> |
FieldAssumptions.areModifiedAsPartOfAnUnobservableCachingStrategy()
Insists that while a field may have been mutated, changes will not be
observable.
|
org.hamcrest.Matcher<MutableReasonDetail> |
FieldAssumptions.areNotModifiedAndDoNotEscape()
Insists that a mutable field is used safely.
|
org.hamcrest.Matcher<MutableReasonDetail> |
FieldAssumptions.areSafelyCopiedUnmodifiableCollectionsWithImmutableElements()
Insists fields of collection types are copied and wrapped safely.
|
org.hamcrest.Matcher<MutableReasonDetail> |
ProvidedOtherClass.isAlsoImmutable()
Assumes that the selected type is immutable, preventing warnings related
to transitive mutability.
|
org.hamcrest.Matcher<MutableReasonDetail> |
AssumeCopiedIntoUnmodifiable.isSafelyCopiedUnmodifiableCollectionWithImmutableTypes() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
NoReasonsAllowed.matchesSafely(MutableReasonDetail item) |
protected boolean |
AllowingNonFinalFields.matchesSafely(MutableReasonDetail reason) |
protected boolean |
AllowingForSubclassing.matchesSafely(MutableReasonDetail checkerReasonDetail) |
Modifier and Type | Method and Description |
---|---|
static WithAllowedReasonsMatcher |
WithAllowedReasonsMatcher.withAllowedReasons(org.hamcrest.Matcher<AnalysisResult> areImmutable,
Iterable<org.hamcrest.Matcher<MutableReasonDetail>> allowing) |
Copyright © 2008–2022 Graham Allan. All rights reserved.