Uploaded image for project: 'ShrinkWrap'
  1. ShrinkWrap
  2. SHRINKWRAP-238

Rename *Container add* methods to be more descriptive

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.0.0-alpha-12
    • Component/s: api
    • Labels:
      None

      Description

      Make it more clear that we're adding Assets as a target type, not from some location.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            alrubinger Andrew Rubinger added a comment -

            Changes in https://github.com/ALRubinger/shrinkwrap/commit/f3a61e7feed7510d0e421fd2765deb8ba7433633, need to be pushed to upstream after some peer review

            Show
            alrubinger Andrew Rubinger added a comment - Changes in https://github.com/ALRubinger/shrinkwrap/commit/f3a61e7feed7510d0e421fd2765deb8ba7433633 , need to be pushed to upstream after some peer review
            Show
            dan.j.allen Dan Allen added a comment - Working link: https://github.com/ALRubinger/shrinkwrap/commit/f3a61e7feed7510d0e421fd2765deb8ba7433633
            Hide
            dan.j.allen Dan Allen added a comment -

            It takes some getting used to at first, but if you start with a fresh perspective, it appears more logical. Here's why.

            If you have "addLibrary(String name)", you look at that and say "a string isn't a library". So the "As" implies that not only will it become a library, but it will be interpreted as/converted to a library as the archive defines it.

            The one case that I can see not using "As" in the method name is when what you are adding is the same as the target. It appears you've kept consistent on this by keeping this method the same:

            addClass(MyClass.class)

            So it looks good to me.

            Show
            dan.j.allen Dan Allen added a comment - It takes some getting used to at first, but if you start with a fresh perspective, it appears more logical. Here's why. If you have "addLibrary(String name)", you look at that and say "a string isn't a library". So the "As" implies that not only will it become a library, but it will be interpreted as/converted to a library as the archive defines it. The one case that I can see not using "As" in the method name is when what you are adding is the same as the target. It appears you've kept consistent on this by keeping this method the same: addClass(MyClass.class) So it looks good to me.
            Show
            alrubinger Andrew Rubinger added a comment - Rebased and pushed upstream/master: https://github.com/shrinkwrap/shrinkwrap/commit/1a5628599ddc457265830c69694d0c7aa50481eb

              People

              • Assignee:
                alrubinger Andrew Rubinger
                Reporter:
                alrubinger Andrew Rubinger
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development