/** * @param arg0 * @return this.property.getAppliedStereotype(arg0.getName())!=null * @see org.eclipse.uml2.uml.Property#getAppliedStereotype(String) */ public boolean isApplied(final Stereotype arg0) { return this.property.getAppliedStereotype(arg0.getName())!=null; }
/** * @param arg0 * @return this.property.getAppliedStereotype(arg0.getName())!=null * @see org.eclipse.uml2.uml.Property#getAppliedStereotype(String) */ public boolean isApplied(final Stereotype arg0) { return this.property.getAppliedStereotype(arg0.getName())!=null; }
/** * @param arg0 * @return this.property.getAppliedStereotype(arg0.getName())!=null * @see org.eclipse.uml2.uml.Property#getAppliedStereotype(String) */ public boolean isApplied(final Stereotype arg0) { return this.property.getAppliedStereotype(arg0.getName())!=null; }
/** * @param arg0 * @return this.property.getAppliedStereotype(arg0.getName())!=null * @see org.eclipse.uml2.uml.Property#getAppliedStereotype(String) */ public boolean isApplied(final Stereotype arg0) { return this.property.getAppliedStereotype(arg0.getName())!=null; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Stereotype getOwnedStereotype(String name, boolean ignoreCase, boolean createOnDemand) { ownedStereotypeLoop : for (Stereotype ownedStereotype : getOwnedStereotypes()) { if (name != null && !(ignoreCase ? name.equalsIgnoreCase(ownedStereotype.getName()) : name.equals(ownedStereotype.getName()))) continue ownedStereotypeLoop; return ownedStereotype; } return createOnDemand ? createOwnedStereotype(name) : null; }
private void checkStereotypeRootPackage( org.eclipse.uml2.uml.Package outPackage) { EList<Stereotype> rootStereotypes = outPackage.getAppliedStereotypes(); for (Stereotype stereotype : rootStereotypes) { if (stereotype.getName().equals(STEREOTYPE_SOURCEDIRECTORY)) { // From this SourceDirectory we can work... org.eclipse.uml2.uml.Package packagez = outPackage; sourceDirectoryPackageName = packagez.getName(); logger.log(Level.FINE, "SourceDirectory package name: " + sourceDirectoryPackageName); } } }
/** * Retrieves the names of the stereotypes for the given <code>element</code> * * @param element the element for which to retrieve the stereotypes. * @return all stereotype names */ public static List<String> getStereotypeNames(final Element element) { final List<String> names = new ArrayList<String>(); if (element==null) { return names; } final Collection<Stereotype> stereotypes = element.getAppliedStereotypes(); if (stereotypes != null) { for (Stereotype stereotype : stereotypes) { names.add(stereotype.getName()); } } return names; }
/** * Retrieves the names of the stereotypes for the given <code>element</code> * * @param element the element for which to retrieve the stereotypes. * @return all stereotype names */ public static List<String> getStereotypeNames(final Element element) { final List<String> names = new ArrayList<String>(); if (element==null) { return names; } final Collection<Stereotype> stereotypes = element.getAppliedStereotypes(); if (stereotypes != null) { for (Stereotype stereotype : stereotypes) { names.add(stereotype.getName()); } } return names; }
private void generateCheckedException(Element element, Stereotype stereotype) throws IOException { // Stereotype Interface Class clazz = (Class) element; logger.log(Level.FINE, "Class: " + clazz.getName() + " - " + "Stereotype: " + stereotype.getName()); // Generate the exception for this class CompilationUnit compilationUnit = exceptionGenerator .generateCheckedException(clazz, sourceDirectoryPackageName); generateClassFile(clazz, compilationUnit); }
private void generateUncheckedException(Element element, Stereotype stereotype) throws IOException { // Stereotype Interface Class clazz = (Class) element; logger.log(Level.FINE, "Class: " + clazz.getName() + " - " + "Stereotype: " + stereotype.getName()); // Generate the exception for this class CompilationUnit compilationUnit = exceptionGenerator .generateUncheckedException(clazz, sourceDirectoryPackageName); generateClassFile(clazz, compilationUnit); }
private void generateInterfaceForEntityAndService(Element element, Stereotype stereotype) throws IOException { // Stereotype Interface Class clazz = (Class) element; logger.log(Level.FINE, "Class: " + clazz.getName() + " - " + "Stereotype: " + stereotype.getName()); // Generate the interface for this class CompilationUnit compilationUnit = interfaceGenerator.generateInterface( clazz, sourceDirectoryPackageName); generateClassFile(clazz, compilationUnit); }
if (stereotype.getName().equals(name))
if (stereotype.getName().equals(name))
if (stereotype.getName().equals(name))
if (stereotype.getName().equals(name))
if (stereotype.getName().equals(STEREOTYPE_SOURCEDIRECTORY)) { + sourceDirectoryPackageName); if (stereotype.getName().equals(STEREOTYPE_ENTITY) || stereotype.getName().equals(STEREOTYPE_SERVICE)) { generateInterfaceForEntityAndService(element, stereotype); if (stereotype.getName().equals(STEREOTYPE_EXCEPTION) || stereotype.getName().equals( STEREOTYPE_APPLICATIONEXCEPTION)) { generateCheckedException(element, stereotype); if (stereotype.getName().equals( STEREOTYPE_UNEXPECTEDEXCEPTION)) { generateUncheckedException(element, stereotype);
/** * <!-- 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; }
public static Validation fromStereotype(Stereotype stereotype, Property p) { if (stereotype.getName().equals(MinLength.name())) { return new MinLength((Integer) p.getValue(stereotype, "length")); } else if (stereotype.getName().equals(MaxLength.name())) { return new MaxLength((Integer) p.getValue(stereotype, "length")); } else if (stereotype.getName().equals(RangeLength.name())) { return new RangeLength((Integer) p.getValue(stereotype, "min"), (Integer) p.getValue(stereotype, "max")); } else if (stereotype.getName().equals(MaxInteger.name())) { return new MaxInteger((Number) p.getValue(stereotype, "max")); } else if (stereotype.getName().equals(MinInteger.name())) { return new MinInteger((Integer) p.getValue(stereotype, "min")); } else if (stereotype.getName().equals(RangeInteger.name())) { return new RangeInteger((Integer) p.getValue(stereotype, "min"), (Integer) p.getValue(stereotype, "max")); } else if (stereotype.getName().equals(MaxUnlimitedNatural.name())) { return new MaxUnlimitedNatural((Integer) p.getValue(stereotype, "max")); } else if (stereotype.getName().equals(MinUnlimitedNatural.name())) { return new MinUnlimitedNatural((Integer) p.getValue(stereotype, "min")); } else if (stereotype.getName().equals(RangeUnlimitedNatural.name())) { return new RangeUnlimitedNatural((Integer)p.getValue(stereotype, "min"), (Integer)p.getValue(stereotype, "max")); } else if (stereotype.getName().equals(MaxReal.name())) { return new MaxReal((Double) p.getValue(stereotype, "max")); } else if (stereotype.getName().equals(MinReal.name())) { return new MinReal((Double) p.getValue(stereotype, "min")); } else if (stereotype.getName().equals(RangeReal.name())) { return new RangeReal((Double) p.getValue(stereotype, "min"), (Double) p.getValue(stereotype, "max")); } else if (stereotype.getName().equals(MaxLong.name())) { return new MaxLong((Long) p.getValue(stereotype, "max")); } else if (stereotype.getName().equals(MinLong.name())) { return new MinLong((Long) p.getValue(stereotype, "min")); } else if (stereotype.getName().equals(RangeLong.name())) {
String name = stereotype.getName();