## org.eclipse.uml2.uml
Interface OpaqueExpression

All Superinterfaces:
  Element, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EObject, NamedElement, org.eclipse.emf.common.notify.Notifier, PackageableElement, ParameterableElement, TypedElement, ValueSpecification

    public interface OpaqueExpression

extends ValueSpecification

A representation of the model object 'Opaque Expression'. An opaque expression is an uninterpreted textual statement that denotes a (possibly empty) set of values when evaluated in a context. Provides a mechanism for precisely defining the behavior of an opaque expression. An opaque expression is defined by a behavior restricted to return one result.

The following features are supported:

- `Body`
- `Language`
- `Result`
- `Behavior`

See Also:
  `UMLPackage.getOpaqueExpression()`

Field Summary

Fields inherited from interface org.eclipse.uml2.uml.NamedElement
`SEPARATOR`

Fields inherited from interface org.eclipse.uml2.uml.NamedElement
`SEPARATOR`

Method Summary
`Behavior` `getBehavior()` Returns the value of the 'Behavior' reference
`org.eclipse.emf.common.util.EList<java.lang.String>` `getBodies()` Returns the value of the 'Body' attribute list.
`org.eclipse.emf.common.util.EList<java.lang.String>` `getLanguages()` Returns the value of the 'Language' attribute list.
`Parameter` `getResult()` Returns the value of the 'Result' reference
`boolean` `isIntegral()` The query isIntegral() tells whether an expression is intended to produce an integer.
`boolean` `isNonNegative()` The query isNonNegative() tells whether an integer expression has a non-negative value.
`boolean` `isPositive()` The query isPositive() tells whether an integer expression has a positive value.
`boolean` `isSetBodies()` Returns whether the value of the '`Body`' attribute list is set
`boolean` `isSetLanguages()` Returns whether the value of the '`Language`' attribute list is set
`void` `setBehavior(Behavior value)` Sets the value of the '`Behavior`' reference
`void` `unsetBodies()` Unsets the value of the '`Body`' attribute list
`void` `unsetLanguages()` Unsets the value of the '`Language`' attribute list
`boolean` `validateLanguageBodySize(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)` If the language attribute is not empty, then the size of the body and language arrays must be the same.
`boolean` `validateOneReturnResultParameter(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)` The behavior must have exactly one return result parameter.
`boolean` `validateOnlyReturnResultParameters(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)` The behavior may only have return result parameters.
`int` `value()` The query value() gives an integer value for an expression intended to produce one.

Methods inherited from interface org.eclipse.uml2.uml.ValueSpecification
`booleanValue, integerValue, isComputable, isNull, stringValue, unlimitedValue`

Methods inherited from interface org.eclipse.uml2.uml.NamedElement

`allNamespaces, allOwningPackages, createDependency, createNameExpression, createUsage, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership`

Methods inherited from interface org.eclipse.uml2.uml.Element

`addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf`

Methods inherited from interface org.eclipse.emf.ecore.EModelElement
`getEAnnotation, getEAnnotations`

Methods inherited from interface org.eclipse.emf.ecore.EObject
`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset`

Methods inherited from interface org.eclipse.emf.common.notify.Notifier
`eAdapters, eDeliver, eNotify, eSetDeliver`

Methods inherited from interface org.eclipse.uml2.uml.ParameterableElement
`getOwningTemplateParameter, getTemplateParameter, isCompatibleWith, isTemplateParameter, setOwningTemplateParameter, setTemplateParameter`

Methods inherited from interface org.eclipse.uml2.uml.Element

`addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf`

Methods inherited from interface org.eclipse.emf.ecore.EModelElement
`getEAnnotation, getEAnnotations`

Methods inherited from interface org.eclipse.emf.ecore.EObject
`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset`

Methods inherited from interface org.eclipse.emf.common.notify.Notifier
`eAdapters, eDeliver, eNotify, eSetDeliver`

Methods inherited from interface org.eclipse.uml2.uml.TypedElement
`getType, setType`

Methods inherited from interface org.eclipse.uml2.uml.NamedElement

`allNamespaces, allOwningPackages, createDependency, createNameExpression, createUsage, getClientDependencies, getClientDependency, getClientDependency, getLabel, getLabel, getName, getNameExpression, getNamespace, getQualifiedName, getVisibility, isDistinguishableFrom, isSetName, isSetVisibility, separator, setName, setNameExpression, setVisibility, unsetName, unsetVisibility, validateHasNoQualifiedName, validateHasQualifiedName, validateVisibilityNeedsOwnership`

Methods inherited from interface org.eclipse.uml2.uml.Element

`addKeyword, allOwnedElements, applyStereotype, createEAnnotation, createOwnedComment, destroy, getApplicableStereotype, getApplicableStereotypes, getAppliedStereotype, getAppliedStereotypes, getAppliedSubstereotype, getAppliedSubstereotypes, getKeywords, getModel, getNearestPackage, getOwnedComments, getOwnedElements, getOwner, getRelationships, getRelationships, getRequiredStereotype, getRequiredStereotypes, getSourceDirectedRelationships, getSourceDirectedRelationships, getStereotypeApplication, getStereotypeApplications, getTargetDirectedRelationships, getTargetDirectedRelationships, getValue, hasKeyword, hasValue, isStereotypeApplicable, isStereotypeApplied, isStereotypeRequired, mustBeOwned, removeKeyword, setValue, unapplyStereotype, validateHasOwner, validateNotOwnSelf`

Methods inherited from interface org.eclipse.emf.ecore.EModelElement
`getEAnnotation, getEAnnotations`

Methods inherited from interface org.eclipse.emf.ecore.EObject
`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset`

Methods inherited from interface org.eclipse.emf.common.notify.Notifier
`eAdapters, eDeliver, eNotify, eSetDeliver`

Method Detail

### getBodies

    org.eclipse.emf.common.util.EList<java.lang.String> getBodies()

  Returns the value of the 'Body' attribute list. The list contents are of type `String`. The text of the expression, possibly in multiple languages.

  Returns:
    the value of the 'Body' attribute list.
  See Also:
    `isSetBodies()`, `unsetBodies()`, `UMLPackage.getOpaqueExpression_Body()`

### unsetBodies

    void unsetBodies()

  Unsets the value of the '`Body`' attribute list.

  See Also:
    `isSetBodies()`, `getBodies()`

### isSetBodies

    boolean isSetBodies()

  Returns whether the value of the '`Body`' attribute list is set.

  Returns:
    whether the value of the 'Body' attribute list is set.
  See Also:
    `unsetBodies()`, `getBodies()`

### getLanguages

    org.eclipse.emf.common.util.EList<java.lang.String> getLanguages()

  Returns the value of the 'Language' attribute list. The list contents are of type `String`. Specifies the languages in which the expression is stated. The interpretation of the expression body depends on the languages. If the languages are unspecified, they might be implicit from the expression body or the context. Languages are matched to body strings by order.

  Returns:
    the value of the 'Language' attribute list.
  See Also:
    `isSetLanguages()`, `unsetLanguages()`, `UMLPackage.getOpaqueExpression_Language()`

### unsetLanguages

    void unsetLanguages()

  Unsets the value of the '`Language`' attribute list.

  See Also:
    `isSetLanguages()`, `getLanguages()`

### isSetLanguages

    boolean isSetLanguages()

  Returns whether the value of the '`Language`' attribute list is set.

  Returns:
    whether the value of the 'Language' attribute list is set.
  See Also:
    `unsetLanguages()`, `getLanguages()`

### getResult

    Parameter getResult()

  Returns the value of the 'Result' reference. Restricts an opaque expression to return exactly one return result. When the invocation of the opaque expression completes, a single set of values is returned to its owner. This association is derived from the single return result parameter of the associated behavior.

  Returns:
    the value of the 'Result' reference.
  See Also:
    `UMLPackage.getOpaqueExpression_Result()`

### getBehavior

    Behavior getBehavior()

  Returns the value of the 'Behavior' reference. Specifies the behavior of the opaque expression.

  Returns:
    the value of the 'Behavior' reference.
  See Also:
    `setBehavior(Behavior)`, `UMLPackage.getOpaqueExpression_Behavior()`

### setBehavior

    void setBehavior(Behavior value)

  Sets the value of the '`Behavior`' reference.

  Parameters:
    `value` - the new value of the 'Behavior' reference.
  See Also:
    `getBehavior()`

### validateLanguageBodySize

    boolean validateLanguageBodySize(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                     java.util.Map<java.lang.Object,java.lang.Object> context)

  If the language attribute is not empty, then the size of the body and language arrays must be the same. language->notEmpty() implies (body->size() = language->size())

  Parameters:
    `diagnostics` - The chain of diagnostics to which problems are to be appended.
    `context` - The cache of context-specific information.

### validateOnlyReturnResultParameters

    boolean validateOnlyReturnResultParameters(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                               java.util.Map<java.lang.Object,java.lang.Object> context)

  The behavior may only have return result parameters. self.behavior.notEmpty() implies self.behavior.ownedParameters->select(p | p.direction<>#return)->isEmpty()

  Parameters:
    `diagnostics` - The chain of diagnostics to which problems are to be appended.
    `context` - The cache of context-specific information.

### validateOneReturnResultParameter

    boolean validateOneReturnResultParameter(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                                             java.util.Map<java.lang.Object,java.lang.Object> context)

  The behavior must have exactly one return result parameter. self.behavior.notEmpty() implies self.behavior.ownedParameter->select(p | p.direction=#return)->size() = 1

  Parameters:
    `diagnostics` - The chain of diagnostics to which problems are to be appended.
    `context` - The cache of context-specific information.

### value

    int value()

  The query value() gives an integer value for an expression intended to produce one. self.isIntegral() true

### isIntegral

    boolean isIntegral()

  The query isIntegral() tells whether an expression is intended to produce an integer. result = false

### isPositive

    boolean isPositive()

  The query isPositive() tells whether an integer expression has a positive value. self.isIntegral() result = false

### isNonNegative

    boolean isNonNegative()

  The query isNonNegative() tells whether an integer expression has a non-negative value. self.isIntegral() result = false

Copyright 2003, 2007 IBM Corporation and others. All Rights Reserved.