From c595948b782059ef984f53c705968141b8342c86 Mon Sep 17 00:00:00 2001 From: Alessandro Vurro Date: Tue, 22 Mar 2016 00:36:32 +0100 Subject: [PATCH] configuration via API --- .../java/com/googlecode/jmapper/api/Attribute.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/JMapper Framework/src/main/java/com/googlecode/jmapper/api/Attribute.java b/JMapper Framework/src/main/java/com/googlecode/jmapper/api/Attribute.java index 3dad2c84..cd446e69 100644 --- a/JMapper Framework/src/main/java/com/googlecode/jmapper/api/Attribute.java +++ b/JMapper Framework/src/main/java/com/googlecode/jmapper/api/Attribute.java @@ -82,6 +82,17 @@ public Attribute value(TargetAttribute targetAttribute){ return this; } + /** + * Value setting. + * + * @param targetAttribute target field. + * @return this instance Attribute + */ + public Attribute value(String targetAttribute){ + xmlAttribute.value = new TargetAttribute(targetAttribute).toXStream(); + return this; + } + /** * Permits to define target attributes. * It is recommended to use this method only if you want to define custom methods, otherwise {@link #targetAttributes(String...) targetAttributes} is recommended.