Interface CodeUnitsThat<CONJUNCTION extends GivenCodeUnitsConjunction<?>>
-
- All Superinterfaces:
MembersThat<CONJUNCTION>
- All Known Subinterfaces:
MethodsThat<CONJUNCTION>
public interface CodeUnitsThat<CONJUNCTION extends GivenCodeUnitsConjunction<?>> extends MembersThat<CONJUNCTION>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CONJUNCTION
declareThrowableOfType(DescribedPredicate<? super JavaClass> predicate)
MatchesJavaCodeUnits
that declare aThrowable
which matches the given predicate.CONJUNCTION
declareThrowableOfType(java.lang.Class<? extends java.lang.Throwable> type)
MatchesJavaCodeUnits
that declare aThrowable
of the specified type in their throws clause.CONJUNCTION
declareThrowableOfType(java.lang.String typeName)
MatchesJavaCodeUnits
that declare aThrowable
of the specified fully qualified type name in their throws clause.CONJUNCTION
doNotDeclareThrowableOfType(DescribedPredicate<? super JavaClass> predicate)
MatchesJavaCodeUnits
that do not declare aThrowable
which matches the given predicate.CONJUNCTION
doNotDeclareThrowableOfType(java.lang.Class<? extends java.lang.Throwable> type)
MatchesJavaCodeUnits
that do not declare aThrowable
of the specified type in their throws clause.CONJUNCTION
doNotDeclareThrowableOfType(java.lang.String typeName)
MatchesJavaCodeUnits
that do not declare aThrowable
of the specified fully qualified type name in their throws clause.CONJUNCTION
doNotHaveRawParameterTypes(DescribedPredicate<? super java.util.List<JavaClass>> predicate)
MatchesJavaCodeUnits
that do not have raw parameter types matching the given predicate.CONJUNCTION
doNotHaveRawParameterTypes(java.lang.Class<?>... parameterTypes)
MatchesJavaCodeUnits
that do not have the specified raw parameter types.CONJUNCTION
doNotHaveRawParameterTypes(java.lang.String... parameterTypeNames)
MatchesJavaCodeUnits
that do not have the specified fully qualified raw parameter type names.CONJUNCTION
doNotHaveRawReturnType(DescribedPredicate<? super JavaClass> predicate)
MatchesJavaCodeUnits
that do not have raw return types matching the given predicate.CONJUNCTION
doNotHaveRawReturnType(java.lang.Class<?> type)
MatchesJavaCodeUnits
that do not have the specified raw return types.CONJUNCTION
doNotHaveRawReturnType(java.lang.String typeName)
MatchesJavaCodeUnits
that do not have the specified fully qualified raw return type name.CONJUNCTION
haveRawParameterTypes(DescribedPredicate<? super java.util.List<JavaClass>> predicate)
MatchesJavaCodeUnits
that have raw parameter types matching the given predicate.CONJUNCTION
haveRawParameterTypes(java.lang.Class<?>... parameterTypes)
MatchesJavaCodeUnits
that have the specified raw parameter types.CONJUNCTION
haveRawParameterTypes(java.lang.String... parameterTypeNames)
MatchesJavaCodeUnits
that have the specified fully qualified raw parameter type names.CONJUNCTION
haveRawReturnType(DescribedPredicate<? super JavaClass> predicate)
MatchesJavaCodeUnits
that have raw return types matching the given predicate.CONJUNCTION
haveRawReturnType(java.lang.Class<?> type)
MatchesJavaCodeUnits
that have the specified raw return types.CONJUNCTION
haveRawReturnType(java.lang.String typeName)
MatchesJavaCodeUnits
that have the specified fully qualified raw return type name.-
Methods inherited from interface com.tngtech.archunit.lang.syntax.elements.MembersThat
areAnnotatedWith, areAnnotatedWith, areAnnotatedWith, areDeclaredIn, areDeclaredIn, areDeclaredInClassesThat, areDeclaredInClassesThat, areMetaAnnotatedWith, areMetaAnnotatedWith, areMetaAnnotatedWith, areNotAnnotatedWith, areNotAnnotatedWith, areNotAnnotatedWith, areNotDeclaredIn, areNotDeclaredIn, areNotMetaAnnotatedWith, areNotMetaAnnotatedWith, areNotMetaAnnotatedWith, areNotPackagePrivate, areNotPrivate, areNotProtected, areNotPublic, arePackagePrivate, arePrivate, areProtected, arePublic, doNotHaveFullName, doNotHaveModifier, doNotHaveName, haveFullName, haveFullNameMatching, haveFullNameNotMatching, haveModifier, haveName, haveNameMatching, haveNameNotMatching
-
-
-
-
Method Detail
-
haveRawParameterTypes
@PublicAPI(usage=ACCESS) CONJUNCTION haveRawParameterTypes(java.lang.Class<?>... parameterTypes)
MatchesJavaCodeUnits
that have the specified raw parameter types. Take for example
Thenclass Example { void someMethod(String stringParam, int intParam) {...} }
someMethod
would be matched bycodeUnits()
.that()
.haveRawParameterTypes(String.class, int.class)
- Parameters:
parameterTypes
- Parameter types to matchJavaCodeUnits
against- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotHaveRawParameterTypes
@PublicAPI(usage=ACCESS) CONJUNCTION doNotHaveRawParameterTypes(java.lang.Class<?>... parameterTypes)
MatchesJavaCodeUnits
that do not have the specified raw parameter types. Take for example
Thenclass Example { void someMethod(String stringParam, int intParam) {...} }
someMethod
would be matched bycodeUnits()
.that()
.doNotHaveRawParameterTypes(String.class)
- Parameters:
parameterTypes
- Parameter types matchingJavaCodeUnits
may not have- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveRawParameterTypes
@PublicAPI(usage=ACCESS) CONJUNCTION haveRawParameterTypes(java.lang.String... parameterTypeNames)
MatchesJavaCodeUnits
that have the specified fully qualified raw parameter type names. Take for example
Thenclass Example { void someMethod(String stringParam, int intParam) {...} }
someMethod
would be matched bycodeUnits()
.that()
.haveRawParameterTypes(String.class.getName(), int.class.getName())
- Parameters:
parameterTypeNames
- Fully qualified names of parameter types to matchJavaCodeUnits
against- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotHaveRawParameterTypes
@PublicAPI(usage=ACCESS) CONJUNCTION doNotHaveRawParameterTypes(java.lang.String... parameterTypeNames)
MatchesJavaCodeUnits
that do not have the specified fully qualified raw parameter type names. Take for example
Thenclass Example { void someMethod(String stringParam, int intParam) {...} }
someMethod
would be matched bycodeUnits()
.that()
.doNotHaveRawParameterTypes(String.class.getName())
- Parameters:
parameterTypeNames
- Fully qualified names of parameter types matchingJavaCodeUnits
may not have- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveRawParameterTypes
@PublicAPI(usage=ACCESS) CONJUNCTION haveRawParameterTypes(DescribedPredicate<? super java.util.List<JavaClass>> predicate)
MatchesJavaCodeUnits
that have raw parameter types matching the given predicate. Take for example
Thenclass Example { void someMethod(String stringParam, int intParam) {...} }
someMethod
would be matched bycodeUnits()
.that()
.haveRawParameterTypes(whereFirstTypeIs(String.class))
- Parameters:
predicate
- ADescribedPredicate
that determines, whichJavaCodeUnits
match by their raw parameter types- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotHaveRawParameterTypes
@PublicAPI(usage=ACCESS) CONJUNCTION doNotHaveRawParameterTypes(DescribedPredicate<? super java.util.List<JavaClass>> predicate)
MatchesJavaCodeUnits
that do not have raw parameter types matching the given predicate. Take for example
Thenclass Example { void someMethod(String stringParam, int intParam) {...} }
someMethod
would be matched bycodeUnits()
.that()
.doNotHaveRawParameterTypes(whereFirstTypeIs(int.class))
- Parameters:
predicate
- ADescribedPredicate
that determines, whichJavaCodeUnits
do not match by their raw parameter types- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveRawReturnType
@PublicAPI(usage=ACCESS) CONJUNCTION haveRawReturnType(java.lang.Class<?> type)
MatchesJavaCodeUnits
that have the specified raw return types. Take for example
Thenclass Example { String someMethod() {...} }
someMethod
would be matched bycodeUnits()
.that()
.haveRawReturnType(String.class)
- Parameters:
type
- Return type to matchJavaCodeUnits
against- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotHaveRawReturnType
@PublicAPI(usage=ACCESS) CONJUNCTION doNotHaveRawReturnType(java.lang.Class<?> type)
MatchesJavaCodeUnits
that do not have the specified raw return types. Take for example
Thenclass Example { String someMethod() {...} }
someMethod
would be matched bycodeUnits()
.that()
.doNotHaveRawReturnType(Object.class)
- Parameters:
type
- Return type matchingJavaCodeUnits
may not have- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveRawReturnType
@PublicAPI(usage=ACCESS) CONJUNCTION haveRawReturnType(java.lang.String typeName)
MatchesJavaCodeUnits
that have the specified fully qualified raw return type name. Take for example
Thenclass Example { String someMethod() {...} }
someMethod
would be matched bycodeUnits()
.that()
.haveRawReturnType(String.class.getName())
- Parameters:
typeName
- Fully qualified name of a return type to matchJavaCodeUnits
against- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotHaveRawReturnType
@PublicAPI(usage=ACCESS) CONJUNCTION doNotHaveRawReturnType(java.lang.String typeName)
MatchesJavaCodeUnits
that do not have the specified fully qualified raw return type name. Take for example
Thenclass Example { String someMethod() {...} }
someMethod
would be matched bycodeUnits()
.that()
.doNotHaveRawReturnType(Object.class.getName())
- Parameters:
typeName
- Fully qualified name of a return type matchingJavaCodeUnits
may not have- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveRawReturnType
@PublicAPI(usage=ACCESS) CONJUNCTION haveRawReturnType(DescribedPredicate<? super JavaClass> predicate)
MatchesJavaCodeUnits
that have raw return types matching the given predicate. Take for example
Thenclass Example { String someMethod() {...} }
someMethod
would be matched bycodeUnits()
.that()
.haveRawReturnType(assignableTo(Serializable.class))
- Parameters:
predicate
- ADescribedPredicate
that determines, whichJavaCodeUnits
match by their raw return types- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotHaveRawReturnType
@PublicAPI(usage=ACCESS) CONJUNCTION doNotHaveRawReturnType(DescribedPredicate<? super JavaClass> predicate)
MatchesJavaCodeUnits
that do not have raw return types matching the given predicate. Take for example
Thenclass Example { String someMethod() {...} }
someMethod
would be matched bycodeUnits()
.that()
.doNotHaveRawReturnType(assignableTo(List.class))
- Parameters:
predicate
- ADescribedPredicate
that determines, whichJavaCodeUnits
do not match by their raw return types- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
declareThrowableOfType
@PublicAPI(usage=ACCESS) CONJUNCTION declareThrowableOfType(java.lang.Class<? extends java.lang.Throwable> type)
MatchesJavaCodeUnits
that declare aThrowable
of the specified type in their throws clause. Take for example
Thenclass Example { void someMethod() throws FirstException, SecondException {...} }
someMethod
would be matched bycodeUnits()
.that()
.declareThrowableOfType(FirstException.class)
- Parameters:
type
- Type of a declaredThrowable
to matchJavaCodeUnits
against- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotDeclareThrowableOfType
@PublicAPI(usage=ACCESS) CONJUNCTION doNotDeclareThrowableOfType(java.lang.Class<? extends java.lang.Throwable> type)
MatchesJavaCodeUnits
that do not declare aThrowable
of the specified type in their throws clause. Take for example
Thenclass Example { void someMethod() throws FirstException {...} }
someMethod
would be matched bycodeUnits()
.that()
.doNotDeclareThrowableOfType(SecondException.class)
- Parameters:
type
- Type of a declaredThrowable
matchingJavaCodeUnits
may not have- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
declareThrowableOfType
@PublicAPI(usage=ACCESS) CONJUNCTION declareThrowableOfType(java.lang.String typeName)
MatchesJavaCodeUnits
that declare aThrowable
of the specified fully qualified type name in their throws clause. Take for example
Thenclass Example { void someMethod() throws FirstException, SecondException {...} }
someMethod
would be matched bycodeUnits()
.that()
.declareThrowableOfType(FirstException.class.getName())
- Parameters:
typeName
- Fully qualified name of a type of a declaredThrowable
to matchJavaCodeUnits
against- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotDeclareThrowableOfType
@PublicAPI(usage=ACCESS) CONJUNCTION doNotDeclareThrowableOfType(java.lang.String typeName)
MatchesJavaCodeUnits
that do not declare aThrowable
of the specified fully qualified type name in their throws clause. Take for example
Thenclass Example { void someMethod() throws FirstException {...} }
someMethod
would be matched bycodeUnits()
.that()
.doNotDeclareThrowableOfType(SecondException.class.getName())
- Parameters:
typeName
- Fully qualified name of a type of a declaredThrowable
matchingJavaCodeUnits
may not have- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
declareThrowableOfType
@PublicAPI(usage=ACCESS) CONJUNCTION declareThrowableOfType(DescribedPredicate<? super JavaClass> predicate)
MatchesJavaCodeUnits
that declare aThrowable
which matches the given predicate. Take for example
Thenclass Example { void someMethod() throws FirstException, SecondException {...} }
someMethod
would be matched bycodeUnits()
.that()
.declareThrowableOfType(nameStartingWith("First"))
- Parameters:
predicate
- ADescribedPredicate
that determines, whichJavaCodeUnits
match by their declaredThrowable
- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotDeclareThrowableOfType
@PublicAPI(usage=ACCESS) CONJUNCTION doNotDeclareThrowableOfType(DescribedPredicate<? super JavaClass> predicate)
MatchesJavaCodeUnits
that do not declare aThrowable
which matches the given predicate. Take for example
Thenclass Example { void someMethod() throws FirstException {...} }
someMethod
would be matched bycodeUnits()
.that()
.doNotDeclareThrowableOfType(nameStartingWith("Second"))
- Parameters:
predicate
- ADescribedPredicate
that determines, whichJavaCodeUnits
do not match by their declaredThrowable
- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
-