VcParam.java

00001 
00027 package org.objectweb.jonas_ejb.genic;
00028 
00029 import org.objectweb.jonas_ejb.deployment.api.BeanDesc;
00030 import org.objectweb.jonas_ejb.lib.JavaType;
00031 import org.objectweb.jonas_ejb.lib.JormType;
00032 
00038 public class VcParam {
00039 
00043     private String mTypeName = null;
00044 
00048     private String mJormTypeName = null;
00049 
00053     private boolean mIsEjbLocal = false;
00057     private String mEjbName = null;
00058 
00064     VcParam(Class type, BeanDesc dd) {
00065         mTypeName = JavaType.getName(type);
00066         mJormTypeName = JormType.getPTypeDef(type, false);
00067         mIsEjbLocal = javax.ejb.EJBLocalObject.class.isAssignableFrom(type);
00068         if (mIsEjbLocal) {
00069             BeanDesc bdp = dd.getDeploymentDesc().getBeanDescWithLocalInterface(mTypeName);
00070             if (bdp == null) {
00071                 throw new Error("VcParam: Cannot get the BeanDesc associated to the interface local '" + mTypeName + "'");
00072             }
00073             mEjbName = bdp.getEjbName();
00074         }
00075     }
00076 
00080     public String getTypeName() {
00081         return mTypeName;
00082     }
00083 
00087     public String getJormType() {
00088         return mJormTypeName;
00089     }
00090 
00094     public boolean isEjbLocal() {
00095         return mIsEjbLocal;
00096     }
00097 
00101     public String getEjbName() {
00102         if (!isEjbLocal()) {
00103             throw new Error("VcParam.getEjbName(): No BeanDesc associated to the param '"
00104                             + mTypeName + "'");
00105         }
00106         return mEjbName;
00107     }
00108 
00109 }
00110 

Generated on Tue Feb 15 15:05:48 2005 for JOnAS by  doxygen 1.3.9.1