Package com.tngtech.archunit.core.domain
Class JavaField
- java.lang.Object
-
- com.tngtech.archunit.core.domain.JavaMember
-
- com.tngtech.archunit.core.domain.JavaField
-
- All Implemented Interfaces:
HasDescription,CanBeAnnotated,HasAnnotations,HasDescriptor,HasModifiers,HasName,HasName.AndFullName,HasOwner<JavaClass>,HasSourceCodeLocation,HasType
public class JavaField extends JavaMember implements HasType
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.tngtech.archunit.core.domain.JavaMember
JavaMember.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
-
Nested classes/interfaces inherited from interface com.tngtech.archunit.core.domain.properties.HasName.AndFullName
HasName.AndFullName.Functions
-
Nested classes/interfaces inherited from interface com.tngtech.archunit.core.domain.properties.HasOwner
HasOwner.Functions
-
Nested classes/interfaces inherited from interface com.tngtech.archunit.core.domain.properties.HasType
HasType.Functions, HasType.Predicates
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Set<JavaFieldAccess>getAccessesToSelf()java.lang.StringgetDescription()java.lang.StringgetFullName()JavaClassgetRawType()JavaClassgetType()Deprecated.UsegetRawType()insteadjava.lang.reflect.Fieldreflect()Resolves the respectiveMemberfrom the classpath.
NOTE: This method will throw an exception, if the owningClassor any of its dependencies can't be found on the classpath.-
Methods inherited from class com.tngtech.archunit.core.domain.JavaMember
getAnnotationOfType, getAnnotationOfType, getAnnotations, getDescriptor, getModifiers, getName, getOwner, getSourceCodeLocation, isAnnotatedWith, isAnnotatedWith, isAnnotatedWith, isMetaAnnotatedWith, isMetaAnnotatedWith, isMetaAnnotatedWith, toString, tryGetAnnotationOfType, tryGetAnnotationOfType
-
-
-
-
Method Detail
-
getFullName
@PublicAPI(usage=ACCESS) public java.lang.String getFullName()
- Specified by:
getFullNamein interfaceHasName.AndFullName- Returns:
- The full name of this
JavaField, i.e. a string containing${declaringClass}.${name}
-
getType
@Deprecated @PublicAPI(usage=ACCESS) public JavaClass getType()
Deprecated.UsegetRawType()instead
-
getRawType
@PublicAPI(usage=ACCESS) public JavaClass getRawType()
- Specified by:
getRawTypein interfaceHasType
-
getAccessesToSelf
@PublicAPI(usage=ACCESS) public java.util.Set<JavaFieldAccess> getAccessesToSelf()
- Specified by:
getAccessesToSelfin classJavaMember
-
reflect
@PublicAPI(usage=ACCESS) public java.lang.reflect.Field reflect()
Description copied from class:JavaMemberResolves the respectiveMemberfrom the classpath.
NOTE: This method will throw an exception, if the owningClassor any of its dependencies can't be found on the classpath.- Specified by:
reflectin classJavaMember- Returns:
- The
Memberequivalent to thisJavaMember
-
getDescription
@PublicAPI(usage=ACCESS) public java.lang.String getDescription()
- Specified by:
getDescriptionin interfaceHasDescription
-
-