public class GetterSetterNameTransformer extends Object implements SourceTransformer
Constructor and Description |
---|
GetterSetterNameTransformer() |
Modifier and Type | Method and Description |
---|---|
String |
getAttributeName()
Returns the name of the source element attribute.
|
String |
getGetterNameAttribute()
Returns the name of the target element attribute for the getter name.
|
String |
getSetterNameAttribute()
Returns the name of the target element attribute for the setter name.
|
void |
setAttributeName(String attributeName)
Sets the name of the source element attribute.
|
void |
setGetterNameAttribute(String getterNameAttribute)
Sets the name of the target element attribute for the getter name.
|
void |
setSetterNameAttribute(String setterNameAttribute)
Sets the name of the target element attribute for the setter name.
|
SourceElement |
transform(Object rootObject,
ControllerState controllerState)
Fills the target attributes according to the settings.
|
public String getAttributeName()
public void setAttributeName(String attributeName)
attributeName
- the name of the source attribute, not null.NullPointerException
- if attributeName is null.public String getGetterNameAttribute()
public void setGetterNameAttribute(String getterNameAttribute)
getterNameAttribute
- the name of the getter name target attribute,
not null.NullPointerException
- if getterNameAttribute is null.public String getSetterNameAttribute()
public void setSetterNameAttribute(String setterNameAttribute)
setterNameAttribute
- the name of the setter name target attribute,
not null.NullPointerException
- if setterNameAttribute is null.public SourceElement transform(Object rootObject, ControllerState controllerState) throws SourceTransformerException
transform
in interface SourceTransformer
rootObject
- the root of the source graph, not null.controllerState
- the controller state.IllegalStateException
- if sourceAttributeName or
targetAttributeName was not set.SourceTransformerException
- if rootObject is not a SourceElement.Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.