Skip to main content



      Home
Home » Modeling » UML2 » How to identify a Class correctly?
How to identify a Class correctly? [message #988608] Fri, 30 November 2012 12:03 Go to next message
Eclipse UserFriend
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 12:23 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: How to identify a Class correctly? [message #988641 is a reply to message #988617] Fri, 30 November 2012 14:52 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 13:24:49 EDT 2025

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

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

Back to the top