new text document.txt

来自「I want to download source code to study.」· 文本 代码 · 共 41 行

TXT
41
字号

<%--   annotated!    
        // get all association attributes, not including that inherited from sup classes.
        List associationAttrs = classDesc.getOwnedAssociationAttributes();
        for( int j = 0; j<associationAttrs.size(); j++ ){       
            Property thisEnd = (Property)associationAttrs.get(j);
            Property oppositeEnd = (Property)thisEnd.getOpposite();
            
            org.eclipse.uml2.uml.Class associatedClass = oppositeEnd.getClass_();
            ClassDescriptor associatedClassDesc = new ClassDescriptor( associatedClass );
            if( className.equals( oppositeMarker )&& associatedClass.getName().equals( thisEndMarker ) ){
                break;
            }
            
            String attrName = thisEnd.getName();
            String refName  = thisEnd.getType().getName();
            int thereMulti = thisEnd.getUpper();
            int hereMulti = oppositeEnd.getUpper();
            boolean flag = false;
            /*
             * The rule to hold reference:
             * 1. In a many-to-one association, the many end class( item type in CM) holds the reference pointing to the one end. 
             * 2. In a one-to-one or many-to-many association,
             *      the association end that has less sub classes holds reference.
             * 
             */
            //if the many-end in many-to-one   
            flag |= ( thereMulti ==1 && thereMulti < hereMulti ); 
            
            //or the less-subclass-end in one-to-one or many-to-many, 
            flag |= classDesc.getSubClasses().size() <= associatedClassDesc.getSubClasses().size(); 
            if( classDesc.getSubClasses().size() = associatedClassDesc.getSubClasses().size()){
                marker.
            }
            if( flag ) {
                refList.add( refName );
            } 
        }
        class2RefList.put( className, refList );
    }                
--%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?