View Javadoc

    1   /***
    2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
    3    */
    4   package net.sourceforge.pmd.rules;
    5
    6   import net.sourceforge.pmd.ast.SimpleNode;
    7
    8   public class ImportWrapper {
    9       private SimpleNode node;
    10      private String name;
    11      private String fullname;
    12
    13      public ImportWrapper(String fullname, String name, SimpleNode node) {
    14          this.fullname = fullname;
    15          this.name = name;
    16          this.node = node;
    17      }
    18
    19
    20      public boolean equals(Object other) {
    21          ImportWrapper i = (ImportWrapper) other;
    22          return i.getName().equals(name);
    23      }
    24
    25      public int hashCode() {
    26          return getName().hashCode();
    27      }
    28
    29      public String getName() {
    30          return name;
    31      }
    32
    33      public String getFullName() {
    34          return fullname;
    35      }
    36
    37      public SimpleNode getNode() {
    38          return node;
    39      }
    40  }
    41