Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
af3
AF3
Commits
305a1109
Commit
305a1109
authored
Oct 24, 2017
by
Simon Barner
Browse files
- Fix return type of getAllocationEntries()
- Add getAllocationEntries(? extends AllocationEntry)
parent
9c467593
Changes
3
Hide whitespace changes
Inline
Side-by-side
org.fortiss.af3.allocation/trunk/model/allocation.ecore
View file @
305a1109
...
...
@@ -25,9 +25,25 @@
<details
key=
"body"
value=
"return AllocationTableStaticImpl.getAllocationEntries(this);"
/>
</eAnnotations>
<eGenericType
eClassifier=
"ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EEList"
>
<eTypeArguments
eClassifier=
"#//
OneToOne
AllocationEntry"
/>
<eTypeArguments
eClassifier=
"#//AllocationEntry"
/>
</eGenericType>
</eOperations>
<eOperations
name=
"getAllocationEntries"
>
<eAnnotations
source=
"http://www.eclipse.org/emf/2002/GenModel"
>
<details
key=
"documentation"
value=
"Returns all contained {@link org.fortiss.af3.allocation.model.AllocationEntry}s that are of the given {@code type}."
/>
<details
key=
"body"
value=
"return AllocationTableStaticImpl.getAllocationEntries(this, type);"
/>
</eAnnotations>
<eGenericType
eClassifier=
"ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EEList"
>
<eTypeArguments
eClassifier=
"#//AllocationEntry"
/>
</eGenericType>
<eParameters
name=
"type"
lowerBound=
"1"
>
<eGenericType
eClassifier=
"ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaClass"
>
<eTypeArguments>
<eUpperBound
eClassifier=
"#//AllocationEntry"
/>
</eTypeArguments>
</eGenericType>
</eParameters>
</eOperations>
<eOperations
name=
"getOneToOneAllocationEntries"
>
<eAnnotations
source=
"http://www.eclipse.org/emf/2002/GenModel"
>
<details
key=
"documentation"
value=
"Returns all allocation entries specializing {@link org.fortiss.af3.allocation.model.OneToOneAllocationEntry}."
/>
...
...
org.fortiss.af3.allocation/trunk/model/allocation.genmodel
View file @
305a1109
...
...
@@ -17,6 +17,9 @@
<genFeatures
notify=
"false"
createChild=
"false"
propertySortChoices=
"true"
ecoreFeature=
"ecore:EReference allocation.ecore#//AllocationTable/sourceView"
/>
<genFeatures
notify=
"false"
createChild=
"false"
propertySortChoices=
"true"
ecoreFeature=
"ecore:EReference allocation.ecore#//AllocationTable/targetView"
/>
<genOperations
ecoreOperation=
"allocation.ecore#//AllocationTable/getAllocationEntries"
/>
<genOperations
ecoreOperation=
"allocation.ecore#//AllocationTable/getAllocationEntries.1"
>
<genParameters
ecoreParameter=
"allocation.ecore#//AllocationTable/getAllocationEntries.1/type"
/>
</genOperations>
<genOperations
ecoreOperation=
"allocation.ecore#//AllocationTable/getOneToOneAllocationEntries"
/>
<genOperations
ecoreOperation=
"allocation.ecore#//AllocationTable/getOneToManyAllocationEntries"
/>
<genOperations
ecoreOperation=
"allocation.ecore#//AllocationTable/getManyToOneAllocationEntries"
/>
...
...
org.fortiss.af3.allocation/trunk/src/org/fortiss/af3/allocation/model/impl/AllocationTableStaticImpl.java
View file @
305a1109
...
...
@@ -17,6 +17,7 @@ $Id$
+--------------------------------------------------------------------------*/
package
org.fortiss.af3.allocation.model.impl
;
import
static
org
.
fortiss
.
tooling
.
kernel
.
utils
.
EcoreUtils
.
generalizeList
;
import
static
org
.
fortiss
.
tooling
.
kernel
.
utils
.
EcoreUtils
.
pickInstanceOf
;
import
java.util.Set
;
...
...
@@ -37,10 +38,9 @@ import org.fortiss.tooling.base.model.element.IModelElement;
* @author barner
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash:
13B0907F44070E6A4C9311E5F87203B8
* @ConQAT.Rating YELLOW Hash:
063A2E1979F7926AF0E8D9B218CC89CD
*/
public
class
AllocationTableStaticImpl
{
/**
* Returns the {@link AllocationEntry}s contained by the given {@link AllocationTable}.
*
...
...
@@ -55,6 +55,25 @@ public class AllocationTableStaticImpl {
return
pickInstanceOf
(
AllocationEntry
.
class
,
allocationTable
.
getContainedElements
());
}
/**
* Returns the {@link AllocationEntry}s contained by the given {@link AllocationTable} that are
* of the given {@code type}.
*
* @param allocationTable
* {@link AllocationTable} for which to the return the contained
* {@link AllocationEntry}s.
* @param type
* {@link AllocationEntry} type to be returned.
*
* @return {@link AllocationEntry}s contained by the given {@link AllocationTable}.
*/
public
static
EList
<
AllocationEntry
>
getAllocationEntries
(
AllocationTable
allocationTable
,
Class
<?
extends
AllocationEntry
>
type
)
{
return
generalizeList
(
AllocationEntry
.
class
,
pickInstanceOf
(
type
,
allocationTable
.
getContainedElements
()));
}
/**
* Returns the {@link OneToOneAllocationEntry}s contained by the given {@link AllocationTable}.
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment