1 package org.objectweb.modfact.jmi.reflect; 2 3 import javax.jmi.reflect.*; 4 import java.util.*; 5 6 public abstract class RefBaseObjectImpl 7 8 extends ReflectHelper 9 implements javax.jmi.reflect.RefBaseObject, java.io.Serializable { 10 11 static RefPackageImpl m3 = null; 12 13 RefObjectImpl metaObject = null; 14 RefPackageImpl container = null; 15 String name = null; 16 17 public RefBaseObjectImpl() { 18 } 19 20 public String refMofId() { 21 return String.valueOf(this.hashCode()); 22 } 23 24 public javax.jmi.reflect.RefPackage refOutermostPackage() { 25 Object r = this; 26 RefPackage p = this.refImmediatePackage(); 27 while(p!=null) { 28 r = p; 29 p = p.refImmediatePackage(); 30 } 31 return (RefPackage)r; 32 } 33 34 public javax.jmi.reflect.RefPackage refImmediatePackage() { 35 return container; 36 } 37 38 public java.util.Collection refVerifyConstraints(boolean param) { 39 throw new RuntimeException ("No implementation: refVerifyConstraints"); 40 } 41 42 44 public List refTypeName() { 45 List typeName; 46 RefBaseObjectImpl p = (RefBaseObjectImpl)refImmediatePackage(); 47 typeName = (p==null)? new Vector() : p.refTypeName(); 48 typeName.add( name ); 49 return typeName; 50 } 51 52 53 boolean isM3() { 54 return refOutermostPackage()==m3; 55 } 56 57 58 public String toString() { 59 String className = this.getClass().getName(); 60 String type = className.substring(className.lastIndexOf(".")+1 ,className.length()) +refTypeName().toString(); 62 return type; 63 } 64 65 66 72 } 73 | Popular Tags |