Ignore:
Timestamp:
07/29/14 14:30:16 (10 years ago)
Author:
sherbold
Message:
  • added missing comments
  • added method to extend an UML model with an interaction based on a sequence of SOAP events.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-plugin-uml/src/main/java/de/ugoe/cs/autoquest/plugin/uml/eventcore/UMLTransitionType.java

    r1604 r1624  
     1//   Copyright 2012 Georg-August-Universität Göttingen, Germany 
     2// 
     3//   Licensed under the Apache License, Version 2.0 (the "License"); 
     4//   you may not use this file except in compliance with the License. 
     5//   You may obtain a copy of the License at 
     6// 
     7//       http://www.apache.org/licenses/LICENSE-2.0 
     8// 
     9//   Unless required by applicable law or agreed to in writing, software 
     10//   distributed under the License is distributed on an "AS IS" BASIS, 
     11//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
     12//   See the License for the specific language governing permissions and 
     13//   limitations under the License. 
     14 
    115package de.ugoe.cs.autoquest.plugin.uml.eventcore; 
    216 
     
    519import de.ugoe.cs.autoquest.eventcore.IEventType; 
    620 
    7 // TODO comment 
     21/** 
     22 * <p> 
     23 * Event type for transitions in UML sequence diagrams 
     24 * </p> 
     25 *  
     26 * @author Steffen Herbold 
     27 */ 
    828public class UMLTransitionType implements IEventType { 
    929 
    10     /**  */ 
     30    /** 
     31     * Id for object serialization. 
     32     */ 
    1133    private static final long serialVersionUID = 1L; 
    12      
     34 
     35    /** 
     36     * associated UML transition 
     37     */ 
    1338    private final Transition transition; 
    14      
     39 
     40    /** 
     41     * <p> 
     42     * Constructor. Creates a new instance. 
     43     * </p> 
     44     *  
     45     * @param transition 
     46     *            the instance 
     47     */ 
    1548    public UMLTransitionType(Transition transition) { 
     49        if (transition == null) { 
     50            throw new IllegalArgumentException("Transition must not be null"); 
     51        } 
    1652        this.transition = transition; 
    1753    } 
    18      
     54 
     55    /** 
     56     * <p> 
     57     * Returns the associated UML element 
     58     * </p> 
     59     *  
     60     * @return 
     61     */ 
    1962    public Transition getTransition() { 
    2063        return transition; 
    2164    } 
    22      
     65 
     66    /* 
     67     * (non-Javadoc) 
     68     *  
     69     * @see java.lang.Object#equals(java.lang.Object) 
     70     */ 
    2371    @Override 
    2472    public boolean equals(Object other) { 
    25         if( other==this ) { 
     73        if (other == this) { 
    2674            return true; 
    2775        } 
    28         if( other instanceof UMLTransitionType ) { 
     76        if (other instanceof UMLTransitionType) { 
    2977            return ((UMLTransitionType) other).transition.equals(transition); 
    3078        } 
    3179        return false; 
    3280    }; 
    33      
     81 
     82    /* 
     83     * (non-Javadoc) 
     84     *  
     85     * @see java.lang.Object#hashCode() 
     86     */ 
    3487    @Override 
    3588    public int hashCode() { 
    3689        return transition.hashCode(); 
    3790    } 
    38      
     91 
     92    /* 
     93     * (non-Javadoc) 
     94     *  
     95     * @see de.ugoe.cs.autoquest.eventcore.IEventType#getName() 
     96     */ 
    3997    @Override 
    4098    public String getName() { 
    41         // TODO Auto-generated method stub 
    42         System.out.println("TODO: implement UMLTransactionType.getName "); 
    43         return null; 
     99        return transition.getName(); 
    44100    } 
    45101 
Note: See TracChangeset for help on using the changeset viewer.