Ignore:
Timestamp:
01/30/15 18:09:47 (9 years ago)
Author:
funger
Message:
  • clean up
  • comments improved
  • add name, implement getSimilartiy, correct equals and hashCode in ANDROIDGUIElementSpec
  • add get and set methods to ANDROIDGUIElement
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-plugin-android/src/main/java/de/ugoe/cs/autoquest/plugin/android/guimodel/ANDROIDGUIElement.java

    r1819 r1869  
    101101        return "Android"; 
    102102    } 
     103     
     104    /** 
     105     * <p> 
     106     * Returns the type of the GUI element, i.e., the name of its Android class. 
     107     * </p> 
     108     *  
     109     * @return the Android class name 
     110     */ 
     111    public String getAndroidType() { 
     112        return specification.getType(); 
     113    } 
     114     
     115    /** 
     116     * <p> 
     117     * Returns the name of the GUI element. 
     118     * </p> 
     119     *  
     120     * @return the name 
     121     */ 
     122    public String getName() { 
     123        return specification.getName(); 
     124    } 
     125     
     126    /** 
     127     * <p> 
     128     * Returns the path of the GUI element. 
     129     * </p> 
     130     *  
     131     * @return the path 
     132     */ 
     133    public String getPath() { 
     134        return specification.getPath(); 
     135    } 
     136     
     137    /** 
     138     * <p> 
     139     * Returns the GUI element identifier. 
     140     * </p> 
     141     * 
     142     * @return identifier of the GUI element 
     143     */ 
     144    int getIndex() { 
     145        return specification.getIndex(); 
     146    } 
     147     
     148    /** 
     149     * <p> 
     150     * Returns the object hash of the GUI element. 
     151     * </p> 
     152     *  
     153     * @return the object hash 
     154     */ 
     155    int getElementHash() { 
     156        return specification.getElementHash(); 
     157    } 
    103158 
    104159    /* 
     
    113168            return str + "<-" + getParent().getStringIdentifier(); 
    114169        } 
     170        return str; 
     171    } 
     172     
     173    /* 
     174     * (non-Javadoc) 
     175     *  
     176     * @see java.lang.Object#toString() 
     177     */ 
     178    @Override 
     179    public String toString() { 
     180        String str = 
     181            getElementDescriptor() + "(" + getName() + "," + getElementHash() + "," + getPath() + 
     182                "," + getIndex() + ")"; 
    115183        return str; 
    116184    } 
Note: See TracChangeset for help on using the changeset viewer.