Package org.junit.runners.model
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
-
Field Summary
Fields -
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 int
getName()
Class<?>
getType()
(package private) boolean
boolean
isShadowedBy
(FrameworkField otherMember) toString()
Methods inherited from class org.junit.runners.model.FrameworkMember
handlePossibleBridgeMethod, isPublic, isStatic
-
Field Details
-
field
-
-
Constructor Details
-
FrameworkField
Returns a newFrameworkField
forfield
.Access relaxed to
public
since version 4.13.1.
-
-
Method Details
-
getName
- Specified by:
getName
in classFrameworkMember<FrameworkField>
-
getAnnotations
Description copied from interface:Annotatable
Returns the model elements' annotations. -
getAnnotation
Description copied from interface:Annotatable
Returns the annotation on the model element of the given type, or @code{null} -
isShadowedBy
- Specified by:
isShadowedBy
in classFrameworkMember<FrameworkField>
-
isBridgeMethod
boolean isBridgeMethod()- Specified by:
isBridgeMethod
in classFrameworkMember<FrameworkField>
-
getModifiers
protected int getModifiers()- Specified by:
getModifiers
in classFrameworkMember<FrameworkField>
-
getField
- Returns:
- the underlying java Field
-
getType
- Specified by:
getType
in classFrameworkMember<FrameworkField>
- Returns:
- the underlying Java Field type
- See Also:
-
getDeclaringClass
- Specified by:
getDeclaringClass
in classFrameworkMember<FrameworkField>
-
get
Attempts to retrieve the value of this field ontarget
-
toString
-