本文整理汇总了Java中org.eclipse.uml2.uml.Property.isNavigable方法的典型用法代码示例。如果您正苦于以下问题:Java Property.isNavigable方法的具体用法?Java Property.isNavigable怎么用?Java Property.isNavigable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.uml2.uml.Property
的用法示例。
在下文中一共展示了Property.isNavigable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AssociationEnd
import org.eclipse.uml2.uml.Property; //导入方法依赖的package包/类
/**
* Creates an AssociationEnd based on the EMF-UML model-element provided
*
* @param end
* the EMF-UML model-element which holds informations of this
* diagram element
*/
public AssociationEnd(Property end) {
name = end.getLabel();
int low = end.lowerBound();
int high = end.upperBound();
// Create an UML-style multiplicity string
if (low == 0 && high == -1) {
multiplicity = "*";
} else if (low == high) {
multiplicity = Integer.toString(low);
} else {
multiplicity = low + ".." + (high == -1 ? "*" : high);
}
visibility = end.getVisibility();
navigable = end.isNavigable();
composition = end.isComposite();
}
示例2: createLinkFunctionDeclarations
import org.eclipse.uml2.uml.Property; //导入方法依赖的package包/类
String createLinkFunctionDeclarations(String className) {
StringBuilder assocDeclerations = new StringBuilder("");
for (Property member : associationMembers) {
if (member.isNavigable()) {
assocDeclerations.append(LinkTemplates.linkTemplateSpecializationDecl(className,
member.getType().getName(), member.getName(), member.getAssociation().getName(),
LinkTemplates.LinkFunctionType.Link));
assocDeclerations.append(LinkTemplates.linkTemplateSpecializationDecl(className,
member.getType().getName(), member.getName(), member.getAssociation().getName(),
LinkTemplates.LinkFunctionType.Unlink));
}
}
return PrivateFunctionalTemplates.include(LinkTemplates.AssociationsStructuresHreaderName)
+ GenerationTemplates.putNamespace(assocDeclerations.toString(), GenerationNames.Namespaces.ModelNamespace);
}
示例3: createAssociationMemberDeclarationsCode
import org.eclipse.uml2.uml.Property; //导入方法依赖的package包/类
String createAssociationMemberDeclarationsCode() {
StringBuilder source = new StringBuilder("");
for (Property prop : associationMembers) {
int upper = prop.getUpper();
int lower = prop.getLower();
String linkedClass = LinkTemplates.assocationEndPointDecl(prop.getType().getName(),
LinkTemplates.formatAssociationRoleName(prop.getAssociation().getName(), prop.getName()),
lower, upper);
if (prop.isNavigable())
source.append(linkedClass);
}
return source.toString();
}