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 CONJUNCTIONdeclareThrowableOfType(DescribedPredicate<JavaClass> predicate)MatchesJavaCodeUnitsthat declare aThrowablewhich matches the given predicate.CONJUNCTIONdeclareThrowableOfType(java.lang.Class<? extends java.lang.Throwable> type)MatchesJavaCodeUnitsthat declare aThrowableof the specified type in their throws clause.CONJUNCTIONdeclareThrowableOfType(java.lang.String typeName)MatchesJavaCodeUnitsthat declare aThrowableof the specified fully qualified type name in their throws clause.CONJUNCTIONdoNotDeclareThrowableOfType(DescribedPredicate<JavaClass> predicate)MatchesJavaCodeUnitsthat do not declare aThrowablewhich matches the given predicate.CONJUNCTIONdoNotDeclareThrowableOfType(java.lang.Class<? extends java.lang.Throwable> type)MatchesJavaCodeUnitsthat do not declare aThrowableof the specified type in their throws clause.CONJUNCTIONdoNotDeclareThrowableOfType(java.lang.String typeName)MatchesJavaCodeUnitsthat do not declare aThrowableof the specified fully qualified type name in their throws clause.CONJUNCTIONdoNotHaveRawParameterTypes(DescribedPredicate<java.util.List<JavaClass>> predicate)MatchesJavaCodeUnitsthat do not have raw parameter types matching the given predicate.CONJUNCTIONdoNotHaveRawParameterTypes(java.lang.Class<?>... parameterTypes)MatchesJavaCodeUnitsthat do not have the specified raw parameter types.CONJUNCTIONdoNotHaveRawParameterTypes(java.lang.String... parameterTypeNames)MatchesJavaCodeUnitsthat do not have the specified fully qualified raw parameter type names.CONJUNCTIONdoNotHaveRawReturnType(DescribedPredicate<JavaClass> predicate)MatchesJavaCodeUnitsthat do not have raw return types matching the given predicate.CONJUNCTIONdoNotHaveRawReturnType(java.lang.Class<?> type)MatchesJavaCodeUnitsthat do not have the specified raw return types.CONJUNCTIONdoNotHaveRawReturnType(java.lang.String typeName)MatchesJavaCodeUnitsthat do not have the specified fully qualified raw return type name.CONJUNCTIONhaveRawParameterTypes(DescribedPredicate<java.util.List<JavaClass>> predicate)MatchesJavaCodeUnitsthat have raw parameter types matching the given predicate.CONJUNCTIONhaveRawParameterTypes(java.lang.Class<?>... parameterTypes)MatchesJavaCodeUnitsthat have the specified raw parameter types.CONJUNCTIONhaveRawParameterTypes(java.lang.String... parameterTypeNames)MatchesJavaCodeUnitsthat have the specified fully qualified raw parameter type names.CONJUNCTIONhaveRawReturnType(DescribedPredicate<JavaClass> predicate)MatchesJavaCodeUnitsthat have raw return types matching the given predicate.CONJUNCTIONhaveRawReturnType(java.lang.Class<?> type)MatchesJavaCodeUnitsthat have the specified raw return types.CONJUNCTIONhaveRawReturnType(java.lang.String typeName)MatchesJavaCodeUnitsthat 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)
MatchesJavaCodeUnitsthat have the specified raw parameter types. Take for example
Thenclass Example { void someMethod(String stringParam, int intParam) {...} }someMethodwould be matched bycodeUnits().that().haveRawParameterTypes(String.class, int.class)- Parameters:
parameterTypes- Parameter types to matchJavaCodeUnitsagainst- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotHaveRawParameterTypes
@PublicAPI(usage=ACCESS) CONJUNCTION doNotHaveRawParameterTypes(java.lang.Class<?>... parameterTypes)
MatchesJavaCodeUnitsthat do not have the specified raw parameter types. Take for example
Thenclass Example { void someMethod(String stringParam, int intParam) {...} }someMethodwould be matched bycodeUnits().that().doNotHaveRawParameterTypes(String.class)- Parameters:
parameterTypes- Parameter types matchingJavaCodeUnitsmay 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)
MatchesJavaCodeUnitsthat have the specified fully qualified raw parameter type names. Take for example
Thenclass Example { void someMethod(String stringParam, int intParam) {...} }someMethodwould be matched bycodeUnits().that().haveRawParameterTypes(String.class.getName(), int.class.getName())- Parameters:
parameterTypeNames- Fully qualified names of parameter types to matchJavaCodeUnitsagainst- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotHaveRawParameterTypes
@PublicAPI(usage=ACCESS) CONJUNCTION doNotHaveRawParameterTypes(java.lang.String... parameterTypeNames)
MatchesJavaCodeUnitsthat do not have the specified fully qualified raw parameter type names. Take for example
Thenclass Example { void someMethod(String stringParam, int intParam) {...} }someMethodwould be matched bycodeUnits().that().doNotHaveRawParameterTypes(String.class.getName())- Parameters:
parameterTypeNames- Fully qualified names of parameter types matchingJavaCodeUnitsmay not have- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveRawParameterTypes
@PublicAPI(usage=ACCESS) CONJUNCTION haveRawParameterTypes(DescribedPredicate<java.util.List<JavaClass>> predicate)
MatchesJavaCodeUnitsthat have raw parameter types matching the given predicate. Take for example
Thenclass Example { void someMethod(String stringParam, int intParam) {...} }someMethodwould be matched bycodeUnits().that().haveRawParameterTypes(whereFirstTypeIs(String.class))- Parameters:
predicate- ADescribedPredicatethat determines, whichJavaCodeUnitsmatch 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<java.util.List<JavaClass>> predicate)
MatchesJavaCodeUnitsthat do not have raw parameter types matching the given predicate. Take for example
Thenclass Example { void someMethod(String stringParam, int intParam) {...} }someMethodwould be matched bycodeUnits().that().doNotHaveRawParameterTypes(whereFirstTypeIs(int.class))- Parameters:
predicate- ADescribedPredicatethat determines, whichJavaCodeUnitsdo 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)
MatchesJavaCodeUnitsthat have the specified raw return types. Take for example
Thenclass Example { String someMethod() {...} }someMethodwould be matched bycodeUnits().that().haveRawReturnType(String.class)- Parameters:
type- Return type to matchJavaCodeUnitsagainst- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotHaveRawReturnType
@PublicAPI(usage=ACCESS) CONJUNCTION doNotHaveRawReturnType(java.lang.Class<?> type)
MatchesJavaCodeUnitsthat do not have the specified raw return types. Take for example
Thenclass Example { String someMethod() {...} }someMethodwould be matched bycodeUnits().that().doNotHaveRawReturnType(Object.class)- Parameters:
type- Return type matchingJavaCodeUnitsmay 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)
MatchesJavaCodeUnitsthat have the specified fully qualified raw return type name. Take for example
Thenclass Example { String someMethod() {...} }someMethodwould be matched bycodeUnits().that().haveRawReturnType(String.class.getName())- Parameters:
typeName- Fully qualified name of a return type to matchJavaCodeUnitsagainst- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotHaveRawReturnType
@PublicAPI(usage=ACCESS) CONJUNCTION doNotHaveRawReturnType(java.lang.String typeName)
MatchesJavaCodeUnitsthat do not have the specified fully qualified raw return type name. Take for example
Thenclass Example { String someMethod() {...} }someMethodwould be matched bycodeUnits().that().doNotHaveRawReturnType(Object.class.getName())- Parameters:
typeName- Fully qualified name of a return type matchingJavaCodeUnitsmay not have- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
haveRawReturnType
@PublicAPI(usage=ACCESS) CONJUNCTION haveRawReturnType(DescribedPredicate<JavaClass> predicate)
MatchesJavaCodeUnitsthat have raw return types matching the given predicate. Take for example
Thenclass Example { String someMethod() {...} }someMethodwould be matched bycodeUnits().that().haveRawReturnType(assignableTo(Serializable.class))- Parameters:
predicate- ADescribedPredicatethat determines, whichJavaCodeUnitsmatch 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<JavaClass> predicate)
MatchesJavaCodeUnitsthat do not have raw return types matching the given predicate. Take for example
Thenclass Example { String someMethod() {...} }someMethodwould be matched bycodeUnits().that().doNotHaveRawReturnType(assignableTo(List.class))- Parameters:
predicate- ADescribedPredicatethat determines, whichJavaCodeUnitsdo 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)
MatchesJavaCodeUnitsthat declare aThrowableof the specified type in their throws clause. Take for example
Thenclass Example { void someMethod() throws FirstException, SecondException {...} }someMethodwould be matched bycodeUnits().that().declareThrowableOfType(FirstException.class)- Parameters:
type- Type of a declaredThrowableto matchJavaCodeUnitsagainst- 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)
MatchesJavaCodeUnitsthat do not declare aThrowableof the specified type in their throws clause. Take for example
Thenclass Example { void someMethod() throws FirstException {...} }someMethodwould be matched bycodeUnits().that().doNotDeclareThrowableOfType(SecondException.class)- Parameters:
type- Type of a declaredThrowablematchingJavaCodeUnitsmay 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)
MatchesJavaCodeUnitsthat declare aThrowableof the specified fully qualified type name in their throws clause. Take for example
Thenclass Example { void someMethod() throws FirstException, SecondException {...} }someMethodwould be matched bycodeUnits().that().declareThrowableOfType(FirstException.class.getName())- Parameters:
typeName- Fully qualified name of a type of a declaredThrowableto matchJavaCodeUnitsagainst- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotDeclareThrowableOfType
@PublicAPI(usage=ACCESS) CONJUNCTION doNotDeclareThrowableOfType(java.lang.String typeName)
MatchesJavaCodeUnitsthat do not declare aThrowableof the specified fully qualified type name in their throws clause. Take for example
Thenclass Example { void someMethod() throws FirstException {...} }someMethodwould be matched bycodeUnits().that().doNotDeclareThrowableOfType(SecondException.class.getName())- Parameters:
typeName- Fully qualified name of a type of a declaredThrowablematchingJavaCodeUnitsmay not have- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
declareThrowableOfType
@PublicAPI(usage=ACCESS) CONJUNCTION declareThrowableOfType(DescribedPredicate<JavaClass> predicate)
MatchesJavaCodeUnitsthat declare aThrowablewhich matches the given predicate. Take for example
Thenclass Example { void someMethod() throws FirstException, SecondException {...} }someMethodwould be matched bycodeUnits().that().declareThrowableOfType(nameStartingWith("First"))- Parameters:
predicate- ADescribedPredicatethat determines, whichJavaCodeUnitsmatch by their declaredThrowable- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
doNotDeclareThrowableOfType
@PublicAPI(usage=ACCESS) CONJUNCTION doNotDeclareThrowableOfType(DescribedPredicate<JavaClass> predicate)
MatchesJavaCodeUnitsthat do not declare aThrowablewhich matches the given predicate. Take for example
Thenclass Example { void someMethod() throws FirstException {...} }someMethodwould be matched bycodeUnits().that().doNotDeclareThrowableOfType(nameStartingWith("Second"))- Parameters:
predicate- ADescribedPredicatethat determines, whichJavaCodeUnitsdo not match by their declaredThrowable- Returns:
- A syntax conjunction element, which can be completed to form a full rule
-
-