ShrinkWrap
  1. ShrinkWrap
  2. SHRINKWRAP-238

Rename *Container add* methods to be more descriptive

    Details

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

      Description

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

        Issue Links

          Activity

          Hide
          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
          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 Allen
          added a comment - Working link: https://github.com/ALRubinger/shrinkwrap/commit/f3a61e7feed7510d0e421fd2765deb8ba7433633
          Hide
          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 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
          Andrew Rubinger
          added a comment - Rebased and pushed upstream/master: https://github.com/shrinkwrap/shrinkwrap/commit/1a5628599ddc457265830c69694d0c7aa50481eb

            People

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

              Dates

              • Created:
                Updated:
                Resolved: