View Javadoc

1   package org.andromda.core.simpleuml;
2   
3   import org.andromda.core.uml14.UMLStaticHelper;
4   import org.omg.uml.foundation.core.Attribute;
5   
6   
7   /***
8    * dynamic proxy for an Attribute: dynamically supports the UMLAttribute, 
9    * and org.omg.uml.foundation.core.Attribute interfaces.
10   *
11   *@author  <A HREF="http://www.amowers.com">Anthony Mowers</A>
12   */
13  public class PAttribute
14  	extends PModelElement
15  	implements UMLAttribute
16  {
17  	private UMLStaticHelper scriptHelper;
18  
19  
20  	/***
21  	 *  Description of the Method
22  	 *
23  	 *@param  classifier    Description of the Parameter
24  	 *@param  scriptHelper  Description of the Parameter
25  	 *@return               Description of the Return Value
26  	 */
27  	public static Attribute newInstance(
28  		UMLStaticHelper scriptHelper,
29  		Attribute attribute)
30  	{
31  		Class[] interfaces = new Class[]
32  			{
33  			UMLAttribute.class,
34  			Attribute.class
35  			};
36  
37  		return (Attribute)java.lang.reflect.Proxy.newProxyInstance(
38  			attribute.getClass().getClassLoader(),
39  			interfaces,
40  			new PAttribute(attribute, scriptHelper));
41  	}
42  
43  
44  	
45  	private PAttribute(
46  		Attribute attribute,
47  		UMLStaticHelper scriptHelper)
48  	{
49  		super(attribute,scriptHelper);
50  	}
51  
52  
53  	public Object getId()
54  	{
55  		return modelElement;
56  	}
57  
58  }
59