ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 61305] New: Refactoring of Project
Date Sat, 15 Jul 2017 22:17:03 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=61305

            Bug ID: 61305
           Summary: Refactoring of Project
           Product: Ant
           Version: 1.9.7
          Hardware: PC
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Core
          Assignee: notifications@ant.apache.org
          Reporter: lemesmachado@gmail.com
  Target Milestone: ---

Hello everyone.
I was analyzing the modularization of some classes, and I identified that the
class Project has an opportunity for cohesion improvement. 
The class BaseResourceCollectionWrapper was in the same situation and the
problem was solved as follows: The AbstractResourceCollectionWrapper class was
created, and several get() and set() methods that were used only to configure
the class parameters were moved from BaseResourceCollectionWrapper to
AbstractResourceCollectionWrapper. 
The new class was then accessed through an instance variable in
BaseResourceCollectionWrapper. This strategy has cleaned and improved
BaseResourceCollectionWrapper cohesion.
With this in mind, I would recommend creating a new class: ProjectConfig , and
moving the following methods:

setPropertyInternal
setInheritedProperty
getUserProperty
getCopyOfDataTypeDefinitions
setKeepGoingMode
getProject
setJavaVersionProperty
setInputHandler
getName
getProperties
setSystemProperties
getProperty
getCopyOfTargets
getExecutor
setName
getDescription
getCoreLoader
getFilters
getResource
getCopyOfReferences
setUserProperty
setProjectReference
setDefaultInputStream
getCopyOfTaskDefinitions
getReferences
setExecutor
getDataTypeDefinitions
setCoreLoader
getJavaVersion
setNewProperty
getElementName
setFileLastModified
getInheritedProperties
getBuildListeners
getThreadTask
setBasedir
getUserProperties
getGlobalFilterSet
getDefaultInputStream
getTargets
getBaseDir
setAntLib
setDescription
setDefaultTarget
setProperty
setDefault
getReference
getTaskDefinitions
getDefaultTarget
getInputHandler

from the Project.
Those parameters accessed by an instance variable in the Project.
Moreover, the orthogonality is the design would be enhanced.

What do you think about that?

-- 
You are receiving this mail because:
You are the assignee for the bug.
Mime
View raw message