@@ -91,22 +91,22 @@ public final class CreateComponentValueMapperXMLMojo extends AbstractMojo
9191 /**
9292 * @parameter expression="${project}"
9393 */
94- private MavenProject project ;
94+ private MavenProject _project ;
9595
9696 /**
9797 * @parameter expression="${targetComponentProject}"
9898 */
99- private String targetComponentProject ;
99+ private String _targetComponentProject ;
100100
101101 /**
102102 * @parameter expression="${basedir}/target/classes/com/googlecode/jsfFlex/shared/swfSourceFiles"
103103 */
104- private File toCreateComponentValueMapperXMLPath ;
104+ private File _toCreateComponentValueMapperXMLPath ;
105105
106106 /**
107107 * @parameter expression="src/main/resources/META-INF"
108108 */
109- private File templateSourceDirectory ;
109+ private File _templateSourceDirectory ;
110110
111111 private final Set <ClassInfo > _classInfoSet ;
112112
@@ -144,13 +144,13 @@ public List<NodeInfo> getNodeList() {
144144 }
145145
146146 @ Override
147- public boolean equals (Object _instance ) {
148- if (!(_instance instanceof ClassInfo )){
147+ public boolean equals (Object instance ) {
148+ if (!(instance instanceof ClassInfo )){
149149 return false ;
150150 }
151151
152- ClassInfo _classInfoInstance = (ClassInfo ) _instance ;
153- return this ._fullClassName .equals (_classInfoInstance . getFullClassName () );
152+ ClassInfo classInfoInstance = (ClassInfo ) instance ;
153+ return this ._fullClassName .equals (classInfoInstance . _fullClassName );
154154 }
155155
156156 @ Override
@@ -243,27 +243,27 @@ public Boolean isValueNested() {
243243 public void execute () throws MojoExecutionException , MojoFailureException {
244244
245245 //HACK for now, since QDOX seems to have issues reading Java files with annotations
246- targetComponentProject = RENDERKIT_14_PROJECT_NAME ;
246+ _targetComponentProject = RENDERKIT_14_PROJECT_NAME ;
247247
248- String _currDirPath = (String ) project .getCompileSourceRoots ().get (0 );
249- _currDirPath = _currDirPath .replace (JSF_FLEX_SHARED_PROJECT , JSF_FLEX_PROJECT );
250- _currDirPath = (targetComponentProject .equals (RENDERKIT_14_PROJECT_NAME )) ?
251- _currDirPath .replace (CORE_PROJECT_NAME , RENDERKIT_14_PROJECT_NAME ) :
252- _currDirPath .replace (CORE_PROJECT_NAME , RENDERKIT_15_PROJECT_NAME );
248+ String currDirPath = (String ) _project .getCompileSourceRoots ().get (0 );
249+ currDirPath = currDirPath .replace (JSF_FLEX_SHARED_PROJECT , JSF_FLEX_PROJECT );
250+ currDirPath = (_targetComponentProject .equals (RENDERKIT_14_PROJECT_NAME )) ?
251+ currDirPath .replace (CORE_PROJECT_NAME , RENDERKIT_14_PROJECT_NAME ) :
252+ currDirPath .replace (CORE_PROJECT_NAME , RENDERKIT_15_PROJECT_NAME );
253253
254- Properties _velocityParserProperties = new Properties ();
255- _velocityParserProperties .put (FILE_RESOURCE_LOADER_PATH_KEY , templateSourceDirectory .getPath ());
254+ Properties velocityParserProperties = new Properties ();
255+ velocityParserProperties .put (FILE_RESOURCE_LOADER_PATH_KEY , _templateSourceDirectory .getPath ());
256256
257- _jsfFlexVelocityParser = new JsfFlexVelocityParser (_velocityParserProperties );
257+ _jsfFlexVelocityParser = new JsfFlexVelocityParser (velocityParserProperties );
258258 _jsfFlexVelocityParser .init ();
259259 _jsfFlexVelocityParser .addParserListener (this );
260260
261- if (targetComponentProject .equals (RENDERKIT_14_PROJECT_NAME )){
262- _jsfFlexInspector = new JsfFlexQdoxInspector (_currDirPath , FLEX_COMPONENT_VALUE_CLASS_INFO_ATTRIBUTE ,
261+ if (_targetComponentProject .equals (RENDERKIT_14_PROJECT_NAME )){
262+ _jsfFlexInspector = new JsfFlexQdoxInspector (currDirPath , FLEX_COMPONENT_VALUE_CLASS_INFO_ATTRIBUTE ,
263263 FLEX_COMPONENT_NODE_ATTRIBUTE );
264264 }else {
265265
266- _jsfFlexInspector = new _JsfFlexInspectorBase (_currDirPath ){
266+ _jsfFlexInspector = new _JsfFlexInspectorBase (currDirPath ){
267267 public void inspectFiles (){
268268 /*
269269 * In order to keep in synch with the QDox parsing, following is the
@@ -286,59 +286,59 @@ public void inspectFiles(){
286286 */
287287 JavaDocBuilder builder = new JavaDocBuilder ();
288288 builder .addSourceTree (new File (getDirPath ()));
289- JavaClass [] _inspectableFiles = builder .getClasses ();
289+ JavaClass [] inspectableFiles = builder .getClasses ();
290290
291- for (JavaClass _currClass : _inspectableFiles ){
292- JsfFlexAttributeProperties _jsfFlexAttributeList = _currClass .getClass ().getAnnotation (JsfFlexAttributeProperties .class );
293- List <Map <String , ? extends Object >> _inspectedList = new LinkedList <Map <String , ? extends Object >>();
294- Map <String , String > _inspectedMap = new LinkedHashMap <String , String >();
291+ for (JavaClass currClass : inspectableFiles ){
292+ JsfFlexAttributeProperties jsfFlexAttributeList = currClass .getClass ().getAnnotation (JsfFlexAttributeProperties .class );
293+ List <Map <String , ? extends Object >> inspectedList = new LinkedList <Map <String , ? extends Object >>();
294+ Map <String , String > inspectedMap = new LinkedHashMap <String , String >();
295295
296- if (_jsfFlexAttributeList == null || _jsfFlexAttributeList .mxmlComponentPackage () == null ||
297- _jsfFlexAttributeList .mxmlComponentName ().length () == 0 ){
296+ if (jsfFlexAttributeList == null || jsfFlexAttributeList .mxmlComponentPackage () == null ||
297+ jsfFlexAttributeList .mxmlComponentName ().length () == 0 ){
298298 continue ;
299299 }
300300
301- _inspectedMap .put (MXML_COMPONENT_PACKAGE_KEY , _jsfFlexAttributeList .mxmlComponentPackage ());
302- _inspectedMap .put (MXML_COMPONENT_NAME_KEY , _jsfFlexAttributeList .mxmlComponentName ());
301+ inspectedMap .put (MXML_COMPONENT_PACKAGE_KEY , jsfFlexAttributeList .mxmlComponentPackage ());
302+ inspectedMap .put (MXML_COMPONENT_NAME_KEY , jsfFlexAttributeList .mxmlComponentName ());
303303
304- _inspectedList .add (_inspectedMap );
304+ inspectedList .add (inspectedMap );
305305 //have added Map info containing CLASS_* info
306306
307- for (FlexComponentNodeAttribute _currComponentNodeInfo : _jsfFlexAttributeList .mxmlComponentNodeAttributes ()){
308- _inspectedMap = new LinkedHashMap <String , String >();
307+ for (FlexComponentNodeAttribute currComponentNodeInfo : jsfFlexAttributeList .mxmlComponentNodeAttributes ()){
308+ inspectedMap = new LinkedHashMap <String , String >();
309309
310- _inspectedMap .put (HTML_TYPE_KEY , _currComponentNodeInfo .htmlType ());
311- _inspectedMap .put (TYPE_ATTRIBUTE_VALUE_KEY , _currComponentNodeInfo .typeAttributeValue ());
310+ inspectedMap .put (HTML_TYPE_KEY , currComponentNodeInfo .htmlType ());
311+ inspectedMap .put (TYPE_ATTRIBUTE_VALUE_KEY , currComponentNodeInfo .typeAttributeValue ());
312312
313- _inspectedMap .put (VALUE_ATTRIBUTE_VALUE_KEY , _currComponentNodeInfo .valueAttributeValue ());
314- _inspectedMap .put (VALUE_DYNAMIC_KEY , String .valueOf (_currComponentNodeInfo .isValueDynamic ()));
315- _inspectedMap .put (VALUE_NESTED_KEY , String .valueOf (_currComponentNodeInfo .isValueNested ()));
313+ inspectedMap .put (VALUE_ATTRIBUTE_VALUE_KEY , currComponentNodeInfo .valueAttributeValue ());
314+ inspectedMap .put (VALUE_DYNAMIC_KEY , String .valueOf (currComponentNodeInfo .isValueDynamic ()));
315+ inspectedMap .put (VALUE_NESTED_KEY , String .valueOf (currComponentNodeInfo .isValueNested ()));
316316
317- String _builtString ;
318- if (_currComponentNodeInfo .isValueNested ()){
319- StringBuilder _toBuildString = new StringBuilder ();
317+ String builtString ;
318+ if (currComponentNodeInfo .isValueNested ()){
319+ StringBuilder toBuildString = new StringBuilder ();
320320
321- for (String _buildInto : _currComponentNodeInfo .valueNestedValues ()){
322- _toBuildString .append (_buildInto );
323- _toBuildString .append ("_" );
321+ for (String buildInto : currComponentNodeInfo .valueNestedValues ()){
322+ toBuildString .append (buildInto );
323+ toBuildString .append ("_" );
324324 }
325325
326- _toBuildString .deleteCharAt (_toBuildString .length ()-1 );
327- _builtString = _toBuildString .toString ();
326+ toBuildString .deleteCharAt (toBuildString .length ()-1 );
327+ builtString = toBuildString .toString ();
328328 }else {
329- _builtString = "" ;
329+ builtString = "" ;
330330 }
331331
332- _inspectedMap .put (VALUE_NESTED_VALUES_KEY , _builtString );
332+ inspectedMap .put (VALUE_NESTED_VALUES_KEY , builtString );
333333
334- _inspectedMap .put (NAME_ATTRIBUTE_VALUE_KEY , _currComponentNodeInfo .nameAttributeValue ());
335- _inspectedMap .put (NAME_DYNAMIC_KEY , String .valueOf (_currComponentNodeInfo .isNameDynamic ()));
336- _inspectedMap .put (NAME_APPEND_KEY , _currComponentNodeInfo .nameAppend ());
334+ inspectedMap .put (NAME_ATTRIBUTE_VALUE_KEY , currComponentNodeInfo .nameAttributeValue ());
335+ inspectedMap .put (NAME_DYNAMIC_KEY , String .valueOf (currComponentNodeInfo .isNameDynamic ()));
336+ inspectedMap .put (NAME_APPEND_KEY , currComponentNodeInfo .nameAppend ());
337337
338- _inspectedList .add (_inspectedMap );
338+ inspectedList .add (inspectedMap );
339339 }
340340
341- inspectFileFinished (_inspectedList , _currClass .getName (), _currClass .getPackage ());
341+ inspectFileFinished (inspectedList , currClass .getName (), currClass .getPackage ());
342342 }
343343
344344 inspectionCompleted ();
@@ -353,45 +353,45 @@ public void inspectFiles(){
353353
354354 }
355355
356- public void inspectFileFinished (List <Map <String , ? extends Object >> _inspectedList , String _sourceInspected , String _package ) {
356+ public void inspectFileFinished (List <Map <String , ? extends Object >> inspectedList , String sourceInspected , String packageName ) {
357357
358- ClassInfo _currClassInfo = null ;
358+ ClassInfo currClassInfo = null ;
359359
360- for (Map <String , ? extends Object > _inspected : _inspectedList ){
360+ for (Map <String , ? extends Object > inspected : inspectedList ){
361361
362- if (_inspected != null && _inspected .size () > 0 ){
362+ if (inspected != null && inspected .size () > 0 ){
363363
364- if (_currClassInfo == null ){
365- String _classPackage = (String ) _inspected .get (MXML_COMPONENT_PACKAGE_KEY );
366- String _className = (String ) _inspected .get (MXML_COMPONENT_NAME_KEY );
364+ if (currClassInfo == null ){
365+ String classPackage = (String ) inspected .get (MXML_COMPONENT_PACKAGE_KEY );
366+ String className = (String ) inspected .get (MXML_COMPONENT_NAME_KEY );
367367
368- String _fullClassName = _classPackage + "::" + _className ;
368+ String fullClassName = classPackage + "::" + className ;
369369
370- _currClassInfo = new ClassInfo (_fullClassName );
371- _classInfoSet .add (_currClassInfo );
370+ currClassInfo = new ClassInfo (fullClassName );
371+ _classInfoSet .add (currClassInfo );
372372 continue ;
373373 }
374374 //created the ClassInfo instance and now created the NodeInfo to add
375375
376- Object htmlType = _inspected .get (HTML_TYPE_KEY );
377- Object typeAttributeValue = _inspected .get (TYPE_ATTRIBUTE_VALUE_KEY );
376+ Object htmlType = inspected .get (HTML_TYPE_KEY );
377+ Object typeAttributeValue = inspected .get (TYPE_ATTRIBUTE_VALUE_KEY );
378378
379- Object valueAttributeValue = _inspected .get (VALUE_ATTRIBUTE_VALUE_KEY );
380- Boolean isValueDynamic = _inspected .get (VALUE_DYNAMIC_KEY ) != null && _inspected .get (VALUE_DYNAMIC_KEY ).equals ("true" );
381- Boolean isValueNested = _inspected .get (VALUE_NESTED_KEY ) != null && _inspected .get (VALUE_NESTED_KEY ).equals ("true" );
382- Object valueNestedValues = _inspected .get (VALUE_NESTED_VALUES_KEY );
379+ Object valueAttributeValue = inspected .get (VALUE_ATTRIBUTE_VALUE_KEY );
380+ Boolean isValueDynamic = inspected .get (VALUE_DYNAMIC_KEY ) != null && inspected .get (VALUE_DYNAMIC_KEY ).equals ("true" );
381+ Boolean isValueNested = inspected .get (VALUE_NESTED_KEY ) != null && inspected .get (VALUE_NESTED_KEY ).equals ("true" );
382+ Object valueNestedValues = inspected .get (VALUE_NESTED_VALUES_KEY );
383383 List <String > valueNestedList ;
384384 if (valueNestedValues != null ){
385385 valueNestedList = Arrays .asList ( ((String ) valueNestedValues ).split ("_" ) );
386386 }else {
387387 valueNestedList = new LinkedList <String >();
388388 }
389389
390- Object nameAttributeValue = _inspected .get (NAME_ATTRIBUTE_VALUE_KEY );
391- Boolean isNameDynamic = _inspected .get (NAME_DYNAMIC_KEY ) != null && _inspected .get (NAME_DYNAMIC_KEY ).equals ("true" );
392- Object nameAppend = _inspected .get (NAME_APPEND_KEY );
390+ Object nameAttributeValue = inspected .get (NAME_ATTRIBUTE_VALUE_KEY );
391+ Boolean isNameDynamic = inspected .get (NAME_DYNAMIC_KEY ) != null && inspected .get (NAME_DYNAMIC_KEY ).equals ("true" );
392+ Object nameAppend = inspected .get (NAME_APPEND_KEY );
393393
394- _currClassInfo .addNodeInfo (new NodeInfo (returnEmptyStringForNull (htmlType ), returnEmptyStringForNull (typeAttributeValue ), isValueNested ,
394+ currClassInfo .addNodeInfo (new NodeInfo (returnEmptyStringForNull (htmlType ), returnEmptyStringForNull (typeAttributeValue ), isValueNested ,
395395 isValueDynamic , returnEmptyStringForNull (valueAttributeValue ), valueNestedList , isNameDynamic ,
396396 returnEmptyStringForNull (nameAppend ), returnEmptyStringForNull (nameAttributeValue )));
397397
@@ -407,30 +407,30 @@ private String returnEmptyStringForNull(Object checkForNull){
407407
408408 public void inspectionCompleted () {
409409
410- String _toCreateComponentValueMapperXMLPath = toCreateComponentValueMapperXMLPath .getPath ();
410+ String toCreateComponentValueMapperXMLPath = _toCreateComponentValueMapperXMLPath .getPath ();
411411
412412 try {
413- File _toCreateComponentValueMapperXMLFilePath = new File (_toCreateComponentValueMapperXMLPath );
414- if (!_toCreateComponentValueMapperXMLFilePath .exists ()){
415- _toCreateComponentValueMapperXMLFilePath .mkdirs ();
413+ File toCreateComponentValueMapperXMLFilePath = new File (toCreateComponentValueMapperXMLPath );
414+ if (!toCreateComponentValueMapperXMLFilePath .exists ()){
415+ toCreateComponentValueMapperXMLFilePath .mkdirs ();
416416 }
417- _toCreateComponentValueMapperXMLPath += File .separatorChar + TO_CREATE_COMPONENT_VALUE_MAPPER_XML_FILE_NAME ;
418- FileWriter _writer = new FileWriter (new File (_toCreateComponentValueMapperXMLPath ));
419- Map <String , Object > _contextInfoMap = new HashMap <String , Object >();
417+ toCreateComponentValueMapperXMLPath += File .separatorChar + TO_CREATE_COMPONENT_VALUE_MAPPER_XML_FILE_NAME ;
418+ FileWriter writer = new FileWriter (new File (toCreateComponentValueMapperXMLPath ));
419+ Map <String , Object > contextInfoMap = new HashMap <String , Object >();
420420
421- _contextInfoMap .put (JSF_FLEX_CLASS_SET_ATTRIBUTE , _classInfoSet );
422- _jsfFlexVelocityParser .mergeCollectionToTemplate (JSF_FLEX_COMPONENT_VALUE_MAPPER_TEMPLATE , _contextInfoMap ,
423- _writer , _toCreateComponentValueMapperXMLPath );
421+ contextInfoMap .put (JSF_FLEX_CLASS_SET_ATTRIBUTE , _classInfoSet );
422+ _jsfFlexVelocityParser .mergeCollectionToTemplate (JSF_FLEX_COMPONENT_VALUE_MAPPER_TEMPLATE , contextInfoMap ,
423+ writer , toCreateComponentValueMapperXMLPath );
424424
425- }catch (IOException _ioException ){
425+ }catch (IOException ioException ){
426426
427427 }
428428
429429 }
430430
431- public void mergeCollectionToTemplateFinished (String _fileMerged ) {
431+ public void mergeCollectionToTemplateFinished (String fileMerged ) {
432432
433- ReplaceText removeEmptySpace = new ReplaceText (_fileMerged );
433+ ReplaceText removeEmptySpace = new ReplaceText (fileMerged );
434434 removeEmptySpace .replaceRegExp (true );
435435 removeEmptySpace .regMatch (ReplaceText .CLEAN_REG_EXP_MATCH );
436436 removeEmptySpace .regReplace (ReplaceText .CLEAN_REG_EXP_REPLACE_WITH );
0 commit comments