ClassifierFacade classifier = parameter.getType(); if (classifier != null) type = parameter.getGetterSetterTypeName(); buffer.append(parameter.getName());
/** * <p> * the upper value of the multiplicity (will be -1 for *) * </p> * <p> * -only applicable for UML2 * </p> * @see ParameterFacade#getUpper() */ public int getUpper() { return this.getSuperParameterFacade().getUpper(); }
/** * * @see ParameterFacade#getDefaultValue() */ public String getDefaultValue() { return this.getSuperParameterFacade().getDefaultValue(); }
final String parameterName = parameter.getName(); final ClassifierFacade parameterType = parameter.getType(); final String parameterTypeName = parameterType != null ? parameterType.getFullyQualifiedName() : ""; final ClassifierFacade fieldType = field.getType(); final String fieldTypeName = fieldType != null ? fieldType.getFullyQualifiedName() : ""; if (parameterName.equals(field.getName()) && parameterTypeName.equals(fieldTypeName))
/** * <p> * The name of the model element. * </p> * @see ModelElementFacade#getName() */ public String getName() { return this.getSuperParameterFacade().getName(); }
/** * * @see ParameterFacade#getType() */ public ClassifierFacade getType() { return this.getSuperParameterFacade().getType(); }
defaultValue = attr.getDefaultValue(); type = attr.getType(); typeName = type.getFullyQualifiedName(); if (type.isEnumeration()) if (attr.getUpper()>1 || attr.getUpper()==-1)
/** * Constructs a MethodData object from an OperationFacade. * * @param metafacadeName the name of the parent class * @param operation the operation facade */ public UMLOperationData( final String metafacadeName, final OperationFacade operation) { super( metafacadeName, operation.getVisibility(), operation.isAbstract(), operation.getGetterSetterReturnTypeName(), operation.getName(), operation.getDocumentation(" * ")); for (ParameterFacade parameter : operation.getArguments()) { addArgument( new ArgumentData( parameter.getGetterSetterTypeName(), parameter.getName())); } } }
/** * @return this.getUpper() > 1 || this.getUpper() == LiteralUnlimitedNatural.UNLIMITED * @see org.andromda.metafacades.uml.OperationFacade#isMany() */ protected boolean handleIsMany() { // Because of MD11.5 (their multiplicity are String), we cannot use // isMultiValued() // RJF3 True if either the operation is many or the return parameter is many final ParameterFacade returnParameter = this.getReturnParameter(); // Parameter or parameter type may be null during model validation final boolean returnMany = returnParameter!=null && returnParameter.getType()!=null && (returnParameter.getUpper() > 1 || returnParameter.getUpper() == LiteralUnlimitedNatural.UNLIMITED || returnParameter.getType().isArrayType()); return returnMany || this.getUpper() > 1 || this.getUpper() == LiteralUnlimitedNatural.UNLIMITED; }
/** * <p> * Fully Qualified TypeName, determined in part by multiplicity * (for UML2). For UML14, same as getterName. * </p> * @see ParameterFacade#getGetterSetterTypeName() */ public String getGetterSetterTypeName() { return this.getSuperParameterFacade().getGetterSetterTypeName(); }
/** * <p> * If upper>1 or upper==unlimited. Only applies to UML2. For UML14, * always false. * </p> * @see ParameterFacade#isMany() */ public boolean isMany() { return this.getSuperParameterFacade().isMany(); }
/** * <p> * Gets the unique identifier of the underlying model element. * </p> * @see ModelElementFacade#getId() */ public String getId() { return this.getSuperParameterFacade().getId(); }
/** * <p> * Returns true if the model element has the specified stereotype. * If the stereotype itself does not match, then a search will be * made up the stereotype inheritance hierarchy, and if one of the * stereotype's ancestors has a matching name this method will * return true, false otherwise. * </p> * <p> * For example, if we have a certain stereotype called * <<exception>> and a model element has a stereotype called * <<applicationException>> which extends <<exception>>, when * calling this method with 'stereotypeName' defined as 'exception' * the method would return true since <<applicationException>> * inherits from <<exception>>. If you want to check if the model * element has the exact stereotype, then use the method * 'hasExactStereotype' instead. * </p> * @see ModelElementFacade#hasStereotype(String stereotypeName) */ public boolean hasStereotype(String stereotypeName) { return this.getSuperParameterFacade().hasStereotype(stereotypeName); }
final String parameterName = parameter.getName(); final ClassifierFacade parameterType = parameter.getType(); final String parameterTypeName = parameterType != null ? parameterType.getFullyQualifiedName() : ""; final ClassifierFacade fieldType = field.getType(); final String fieldTypeName = fieldType != null ? fieldType.getFullyQualifiedName() : ""; if (parameterName.equals(field.getName()) && parameterTypeName.equals(fieldTypeName))
public boolean evaluate(Object object) { final ParameterFacade parameter = (ParameterFacade)object; return StringUtils.trimToEmpty(parameter.getName()).equals(name); } });
/** * * @see ParameterFacade#getType() */ public ClassifierFacade getType() { return this.getSuperParameterFacade().getType(); }
defaultValue = attr.getDefaultValue(); type = attr.getType(); typeName = type.getFullyQualifiedName(); if (type.isEnumeration()) if (attr.getUpper()>1 || attr.getUpper()==-1)
/** * Constructs a MethodData object from an OperationFacade. * * @param metafacadeName the name of the parent class * @param operation the operation facade */ public UMLOperationData( final String metafacadeName, final OperationFacade operation) { super( metafacadeName, operation.getVisibility(), operation.isAbstract(), operation.getGetterSetterReturnTypeName(), operation.getName(), operation.getDocumentation(" * ")); for (ParameterFacade parameter : operation.getArguments()) { addArgument( new ArgumentData( parameter.getGetterSetterTypeName(), parameter.getName())); } } }
/** * @return this.getUpper() > 1 || this.getUpper() == LiteralUnlimitedNatural.UNLIMITED * @see org.andromda.metafacades.uml.OperationFacade#isMany() */ protected boolean handleIsMany() { // Because of MD11.5 (their multiplicity are String), we cannot use // isMultiValued() // RJF3 True if either the operation is many or the return parameter is many final ParameterFacade returnParameter = this.getReturnParameter(); // Parameter or parameter type may be null during model validation final boolean returnMany = returnParameter!=null && returnParameter.getType()!=null && (returnParameter.getUpper() > 1 || returnParameter.getUpper() == LiteralUnlimitedNatural.UNLIMITED || returnParameter.getType().isArrayType()); return returnMany || this.getUpper() > 1 || this.getUpper() == LiteralUnlimitedNatural.UNLIMITED; }
/** * <p> * Fully Qualified TypeName, determined in part by multiplicity * (for UML2). For UML14, same as getterName. * </p> * @see ParameterFacade#getGetterSetterTypeName() */ public String getGetterSetterTypeName() { return this.getSuperParameterFacade().getGetterSetterTypeName(); }