blob: 64deeaa5771cd54d17643123892fe305dbc04894 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/**
* Copyright (c) 2017 CEA LIST.
*
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
*/
package org.eclipse.papyrus.uml.expressions.umlexpressions.custom;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.papyrus.uml.expressions.umlexpressions.impl.IsKindOfExpressionImpl;
/**
* Override the default implementation of the generated class
*
*/
public class CustomIsKindOfExpression extends IsKindOfExpressionImpl {
/**
* @see org.eclipse.papyrus.uml.expressions.umlexpressions.impl.IsInstanceOfExpressionImpl#evaluate(org.eclipse.emf.ecore.EObject)
*
* @param context
* @return
*/
@Override
public Boolean evaluate(final EObject context) {
boolean result = false;
// check about element is not required for this expression
if (null != context) {
if (null != this.umlEClass) {
result = umlEClass.isInstance(context);
}
}
return Boolean.valueOf(result);
}
}
|