Exemplo n.º 1
0
 public Interface buildInterface(String name) {
   Interface interfaze = createInterface();
   if (name != null) {
     interfaze.setName(name);
   }
   return interfaze;
 }
  @Override
  public void visitBefore(Interface inf) {
    OJAnnotatedClass annotatedClass = findOJClass(inf);
    // addTumlRuntimePropertyEnum(annotatedClass, inf);

    RuntimePropertyImplementor.addTumlRuntimePropertyEnum(
        annotatedClass,
        UmlgClassOperations.propertyEnumName(inf),
        inf,
        UmlgInterfaceOperations.getAllProperties(inf),
        UmlgInterfaceOperations.hasCompositeOwner(inf),
        inf.getModel().getName());
  }
 public static Set<Property> getAllProperties(Interface inf) {
   Set<Property> result = new HashSet<Property>();
   result.addAll(inf.getAllAttributes());
   Set<Association> associations = getAllAssociations(inf);
   for (Association association : associations) {
     List<Property> memberEnds = association.getMemberEnds();
     for (Property property : memberEnds) {
       if (!UmlgClassOperations.isSpecializationOf(inf, property.getType())) {
         result.add(property);
       }
     }
   }
   return result;
 }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 public Interface getBase_Interface() {
   if (base_Interface != null && base_Interface.eIsProxy()) {
     InternalEObject oldBase_Interface = (InternalEObject) base_Interface;
     base_Interface = (Interface) eResolveProxy(oldBase_Interface);
     if (base_Interface != oldBase_Interface) {
       if (eNotificationRequired())
         eNotify(
             new ENotificationImpl(
                 this,
                 Notification.RESOLVE,
                 GCMPackage.FLOW_SPECIFICATION__BASE_INTERFACE,
                 oldBase_Interface,
                 base_Interface));
     }
   }
   return base_Interface;
 }