Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » How to identify a Class correctly?
How to identify a Class correctly? [message #988608] Fri, 30 November 2012 17:03 Go to next message
Florian Wartenberg is currently offline Florian WartenbergFriend
Messages: 25
Registered: July 2012
Junior Member
My problem is that I have difficulties to determine wheter my Object is an actual Class. If i check if it is an instanceof (org.eclipse.uml2.uml.Class) all Types which inherit from (org.eclipse.uml2.uml.Class) :


org.eclipse.uml2.uml.AssociationClass (also extends org.eclipse.uml2.uml.Association)
org.eclipse.uml2.uml.Behavior
org.eclipse.uml2.uml.Activity
org.eclipse.uml2.uml.Interaction (also extends org.eclipse.uml2.uml.InteractionFragment)
org.eclipse.uml2.uml.OpaqueBehavior
org.eclipse.uml2.uml.FunctionBehavior
org.eclipse.uml2.uml.StateMachine
org.eclipse.uml2.uml.ProtocolStateMachine
org.eclipse.uml2.uml.Component
org.eclipse.uml2.uml.Node (also extends org.eclipse.uml2.uml.DeploymentTarget)
org.eclipse.uml2.uml.Device
org.eclipse.uml2.uml.ExecutionEnvironment
org.eclipse.uml2.uml.Stereotype

Also fullfill this test. So maybe someone has an idea how to find out if it is an actual class.

regards

Florian
Re: How to identify a Class correctly? [message #988617 is a reply to message #988608] Fri, 30 November 2012 17:23 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Florian,

You can check that the eClass() is exactly the one from
UML2Package.eINSTANCE.getClass_(); I'm not sure if the
generatedUML2Package has a Literals interface with a CLASS constant).

On 30/11/2012 6:03 PM, Florian Wartenberg wrote:
> My problem is that I have difficulties to determine wheter my Object
> is an actual Class. If i check if it is an instanceof
> (org.eclipse.uml2.uml.Class) all Types which inherit from
> (org.eclipse.uml2.uml.Class) :
>
>
> org.eclipse.uml2.uml.AssociationClass (also extends
> org.eclipse.uml2.uml.Association)
> org.eclipse.uml2.uml.Behavior
> org.eclipse.uml2.uml.Activity
> org.eclipse.uml2.uml.Interaction (also extends
> org.eclipse.uml2.uml.InteractionFragment)
> org.eclipse.uml2.uml.OpaqueBehavior
> org.eclipse.uml2.uml.FunctionBehavior
> org.eclipse.uml2.uml.StateMachine
> org.eclipse.uml2.uml.ProtocolStateMachine
> org.eclipse.uml2.uml.Component
> org.eclipse.uml2.uml.Node (also extends
> org.eclipse.uml2.uml.DeploymentTarget)
> org.eclipse.uml2.uml.Device
> org.eclipse.uml2.uml.ExecutionEnvironment
> org.eclipse.uml2.uml.Stereotype
>
> Also fullfill this test. So maybe someone has an idea how to find out
> if it is an actual class.
>
> regards
>
> Florian


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to identify a Class correctly? [message #988641 is a reply to message #988617] Fri, 30 November 2012 19:52 Go to previous message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 161
Registered: July 2009
Senior Member
Quote:
I'm not sure if the
generatedUML2Package has a Literals interface with a CLASS constant


Yeah, that would be UMLPackage.Literals.CLASS.

HTH,

Rafael
Previous Topic:Growing profile file size
Next Topic:Using UML2 Java Code in Eclipse
Goto Forum:
  


Current Time: Tue Apr 16 11:52:51 GMT 2024

Powered by FUDForum. Page generated in 0.20382 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top