Package org.fluentlenium.core.inject
Class LabelAnnotations
- java.lang.Object
-
- org.fluentlenium.core.inject.LabelAnnotations
-
- All Implemented Interfaces:
FluentLabelProvider
public class LabelAnnotations extends java.lang.Object implements FluentLabelProvider
-
-
Constructor Summary
Constructors Constructor Description LabelAnnotations(java.lang.reflect.Field field)
Creates a new label annotations object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getLabel()
Get defined definition.java.lang.String[]
getLabelHints()
Get defined label hints.
-
-
-
Constructor Detail
-
LabelAnnotations
public LabelAnnotations(java.lang.reflect.Field field)
Creates a new label annotations object.If the
@Label
annotation is present than it either uses that value as the label, of if it's the default empty string value, then sets the label as the concatenation of the field's declaring class and the field's name, for example for:public class Homepage { @FindBy(css = ".teaser img") @Label private FluentWebElement teaserImage; }
the label is set to
Homepage.teaserImage
.If the
@LabelHint
annotation is present then it simply sets its value in this object.- Parameters:
field
- field to parse
-
-
Method Detail
-
getLabel
public java.lang.String getLabel()
Description copied from interface:FluentLabelProvider
Get defined definition.- Specified by:
getLabel
in interfaceFluentLabelProvider
- Returns:
- defined label
-
getLabelHints
public java.lang.String[] getLabelHints()
Description copied from interface:FluentLabelProvider
Get defined label hints.- Specified by:
getLabelHints
in interfaceFluentLabelProvider
- Returns:
- array of label hints
-
-