public class TextFieldTrait extends Object implements Trait<TextFieldTrait>
Modifier and Type | Class and Description |
---|---|
static class |
TextFieldTrait.Kind
The field kind.
|
Constructor and Description |
---|
TextFieldTrait(AstAttribute attribute,
String name,
TextFieldSettings settings)
Creates a new instance.
|
TextFieldTrait(AstAttribute attribute,
TextFieldTrait.Kind kind)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
static Optional<TextFieldTrait> |
find(PropertyDeclaration property)
Returns the trait for the property.
|
static TextFieldTrait |
get(PropertyDeclaration property)
Returns the trait for the property.
|
TextFieldTrait.Kind |
getKind()
Returns the field kind.
|
static TextFieldTrait.Kind |
getKind(PropertyDeclaration property)
Returns the field kind of the property.
|
String |
getName()
Returns the field name.
|
static String |
getName(PropertyDeclaration property)
Returns the field name of the property.
|
AstNode |
getOriginalAst()
Returns the corresponded syntactic element of this.
|
TextFieldSettings |
getSettings()
Returns the settings.
|
static TextFieldSettings |
getSettings(PropertyDeclaration property)
Returns the field settings of the property.
|
public TextFieldTrait(AstAttribute attribute, TextFieldTrait.Kind kind)
attribute
- the original attributekind
- the field kindIllegalArgumentException
- if some parameters were null
public TextFieldTrait(AstAttribute attribute, String name, TextFieldSettings settings)
attribute
- the original attributename
- the explicit field name (nullable)settings
- the field settingsIllegalArgumentException
- if some parameters were null
public AstNode getOriginalAst()
Element
getOriginalAst
in interface Element
null
if unknownpublic static Optional<TextFieldTrait> find(PropertyDeclaration property)
property
- the propertypublic static TextFieldTrait get(PropertyDeclaration property)
property
- the propertypublic static TextFieldTrait.Kind getKind(PropertyDeclaration property)
property
- target propertypublic static String getName(PropertyDeclaration property)
property
- target propertypublic static TextFieldSettings getSettings(PropertyDeclaration property)
property
- target propertypublic TextFieldTrait.Kind getKind()
public String getName()
public TextFieldSettings getSettings()
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.