Class FrameworkField
- All Implemented Interfaces:
Annotatable
Represents a field on a test class (currently used only for Rules in
BlockJUnit4ClassRunner, but custom runners can make other uses)- Since:
- 4.7
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAttempts to retrieve the value of this field ontarget<T extends Annotation>
TgetAnnotation(Class<T> annotationType) Returns the annotation on the model element of the given type, or @code{null}Returns the model elements' annotations.Class<?> getField()protected intgetName()Class<?> getType()booleanisShadowedBy(FrameworkField otherMember) toString()Methods inherited from class FrameworkMember
isPublic, isStatic
-
Constructor Details
-
FrameworkField
Returns a newFrameworkFieldforfield.Access relaxed to
publicsince version 4.13.1.
-
-
Method Details
-
getName
- Specified by:
getNamein classFrameworkMember<FrameworkField>
-
getAnnotations
Description copied from interface:AnnotatableReturns the model elements' annotations. -
getAnnotation
Description copied from interface:AnnotatableReturns the annotation on the model element of the given type, or @code{null} -
isShadowedBy
-
getModifiers
protected int getModifiers()- Specified by:
getModifiersin classFrameworkMember<FrameworkField>
-
getField
- Returns:
- the underlying java Field
-
getType
- Specified by:
getTypein classFrameworkMember<FrameworkField>- Returns:
- the underlying Java Field type
- See Also:
-
getDeclaringClass
- Specified by:
getDeclaringClassin classFrameworkMember<FrameworkField>
-
get
Attempts to retrieve the value of this field ontarget -
toString
-