Package com.tngtech.archunit.core.domain
Class JavaConstructor
java.lang.Object
com.tngtech.archunit.core.domain.JavaMember
com.tngtech.archunit.core.domain.JavaCodeUnit
com.tngtech.archunit.core.domain.JavaConstructor
- All Implemented Interfaces:
HasDescription
,CanBeAnnotated
,HasAnnotations<JavaMember>
,HasDescriptor
,HasModifiers
,HasName
,HasName.AndFullName
,HasOwner<JavaClass>
,HasParameterTypes
,HasReturnType
,HasSourceCodeLocation
,HasThrowsClause<JavaCodeUnit>
public final class JavaConstructor extends JavaCodeUnit
-
Nested Class Summary
Nested classes/interfaces inherited from class com.tngtech.archunit.core.domain.JavaCodeUnit
JavaCodeUnit.Functions, JavaCodeUnit.Predicates
Nested classes/interfaces inherited from interface com.tngtech.archunit.core.domain.properties.CanBeAnnotated
CanBeAnnotated.Utils
Nested classes/interfaces inherited from interface com.tngtech.archunit.core.domain.properties.HasName
HasName.AndFullName
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONSTRUCTOR_NAME
-
Method Summary
Modifier and Type Method Description java.util.Set<JavaConstructorCall>
getAccessesToSelf()
JavaAnnotation<JavaConstructor>
getAnnotationOfType(java.lang.String typeName)
java.util.Set<JavaAnnotation<JavaConstructor>>
getAnnotations()
java.util.Set<JavaConstructorCall>
getCallsOfSelf()
java.lang.String
getDescription()
ThrowsClause<JavaConstructor>
getThrowsClause()
boolean
isConstructor()
java.lang.reflect.Constructor<?>
reflect()
Resolves the respectiveMember
from the classpath.
NOTE: This method will throw an exception, if the owningClass
or any of its dependencies can't be found on the classpath.Optional<JavaAnnotation<JavaConstructor>>
tryGetAnnotationOfType(java.lang.String typeName)
Methods inherited from class com.tngtech.archunit.core.domain.JavaCodeUnit
getAccessesFromSelf, getCallsFromSelf, getConstructorCallsFromSelf, getExceptionTypes, getFieldAccesses, getFullName, getInstanceofChecks, getMethodCallsFromSelf, getRawParameterTypes, getRawReturnType, getReferencedClassObjects
Methods inherited from class com.tngtech.archunit.core.domain.JavaMember
getAnnotationOfType, getDescriptor, getModifiers, getName, getOwner, getReverseDependencies, getSourceCodeLocation, isAnnotatedWith, isAnnotatedWith, isAnnotatedWith, isMetaAnnotatedWith, isMetaAnnotatedWith, isMetaAnnotatedWith, toString, tryGetAnnotationOfType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
CONSTRUCTOR_NAME
- See Also:
- Constant Field Values
-
-
Method Details
-
getThrowsClause
- Specified by:
getThrowsClause
in interfaceHasThrowsClause<JavaCodeUnit>
- Specified by:
getThrowsClause
in classJavaCodeUnit
-
isConstructor
- Overrides:
isConstructor
in classJavaCodeUnit
-
getCallsOfSelf
-
getAccessesToSelf
- Specified by:
getAccessesToSelf
in classJavaMember
-
getAnnotations
- Specified by:
getAnnotations
in interfaceHasAnnotations<JavaMember>
- Overrides:
getAnnotations
in classJavaCodeUnit
-
getAnnotationOfType
- Specified by:
getAnnotationOfType
in interfaceHasAnnotations<JavaMember>
- Overrides:
getAnnotationOfType
in classJavaCodeUnit
-
tryGetAnnotationOfType
- Specified by:
tryGetAnnotationOfType
in interfaceHasAnnotations<JavaMember>
- Overrides:
tryGetAnnotationOfType
in classJavaCodeUnit
-
reflect
Description copied from class:JavaMember
Resolves the respectiveMember
from the classpath.
NOTE: This method will throw an exception, if the owningClass
or any of its dependencies can't be found on the classpath.- Specified by:
reflect
in classJavaMember
- Returns:
- The
Member
equivalent to thisJavaMember
-
getDescription
-