/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Retrieves the stereotype with the specified qualified name that is required for this element, or null if no such stereotype is required. * @param element The receiving '<em><b>Element</b></em>' model object. * @param qualifiedName The qualified name of the required stereotype to retrieve. * <!-- end-model-doc --> * @generated NOT */ public static Stereotype getRequiredStereotype(Element element, String qualifiedName) { for (Stereotype requiredStereotype : element.getRequiredStereotypes()) { if (safeEquals(requiredStereotype.getQualifiedName(), qualifiedName)) { return requiredStereotype; } } return null; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Retrieves the stereotype with the specified qualified name that is applied to this element, or null if no such stereotype is applied. * @param element The receiving '<em><b>Element</b></em>' model object. * @param qualifiedName The qualified name of the applied stereotype to retrieve. * <!-- end-model-doc --> * @generated NOT */ public static Stereotype getAppliedStereotype(Element element, String qualifiedName) { for (Stereotype appliedStereotype : element.getAppliedStereotypes()) { if (safeEquals(appliedStereotype.getQualifiedName(), qualifiedName)) { return appliedStereotype; } } return null; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Retrieves the stereotype with the specified qualified name that is applicable to this element, or null if no such stereotype is applicable. * @param element The receiving '<em><b>Element</b></em>' model object. * @param qualifiedName The qualified name of the applicable stereotype to retrieve. * <!-- end-model-doc --> * @generated NOT */ public static Stereotype getApplicableStereotype(Element element, String qualifiedName) { for (Stereotype applicableStereotype : element .getApplicableStereotypes()) { if (safeEquals(applicableStereotype.getQualifiedName(), qualifiedName)) { return applicableStereotype; } } return null; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Retrieves the substereotype of the specified stereotype with the specified qualified name that is applied to this element, or null if no such stereotype is applied. * @param element The receiving '<em><b>Element</b></em>' model object. * @param stereotype The superstereotype of the applied substereotype to retrieve. * @param qualifiedName The qualified name of the applied substereotype to retrieve. * <!-- end-model-doc --> * @generated NOT */ public static Stereotype getAppliedSubstereotype(Element element, Stereotype stereotype, String qualifiedName) { for (Stereotype appliedSubstereotype : element .getAppliedSubstereotypes(stereotype)) { if (safeEquals(appliedSubstereotype.getQualifiedName(), qualifiedName)) { return appliedSubstereotype; } } return null; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Retrieves the keyword for this stereotype, localized if indicated. * @param stereotype The receiving '<em><b>Stereotype</b></em>' model object. * @param localize Whether to localize the keyword. * <!-- end-model-doc --> * @generated NOT */ public static String getKeyword(Stereotype stereotype, boolean localize) { String qualifiedName = stereotype.getQualifiedName(); String keyword = getString(stereotype, getValidJavaIdentifier(isEmpty(qualifiedName) ? EMPTY_STRING : qualifiedName.replace(':', '_')), EMPTY_STRING, localize); if (isEmpty(keyword)) { String identifier = getValidJavaIdentifier(stereotype.getName()); keyword = identifier.length() > 0 ? Character.toLowerCase(identifier.charAt(0)) + identifier.substring(1) : identifier; } return keyword; }