[GME-commit]
GMESRC/Java/java/org/isis/gme/bon JBuilderFactory.java,1.5,1.6
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Mon Aug 8 22:51:33 CDT 2005
Update of /project/gme-repository/GMESRC/Java/java/org/isis/gme/bon
In directory escher:/tmp/cvs-serv16189
Modified Files:
JBuilderFactory.java
Log Message:
fixed some problems with the Reference creation.
CVS User: Brian Williams, ISIS (brianw)
Index: JBuilderFactory.java
===================================================================
RCS file: /project/gme-repository/GMESRC/Java/java/org/isis/gme/bon/JBuilderFactory.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** JBuilderFactory.java 17 Feb 2004 18:24:53 -0000 1.5
--- JBuilderFactory.java 8 Aug 2005 21:51:31 -0000 1.6
***************
*** 28,31 ****
--- 28,32 ----
import org.isis.gme.mga.*;
+
public class JBuilderFactory
{
***************
*** 139,155 ****
public static JBuilderReference createReference(MgaReference iRef, JBuilderModel parent) throws BONException
! { int objType = iRef.getObjType();
! if(objType == MgaObject.OBJTYPE_MODEL)
! return JBuilderFactory.createModelRef(iRef,parent);
! JBuilderReference o = new JBuilderReference(iRef,parent);
String kindName = iRef.getMeta().getName();
! String className = (String)customModelRefs.get(kindName);
if(className==null)
! { className = (String)customModelRefs.get("*");
if(className==null)
o = new JBuilderReference(iRef,parent);
}
if(className!=null)
! { Class RefClass;
Class argsType[] = new Class[2];
--- 140,155 ----
public static JBuilderReference createReference(MgaReference iRef, JBuilderModel parent) throws BONException
! {
String kindName = iRef.getMeta().getName();
! String className = (String)customAtomRefs.get(kindName);
! JBuilderReference o = null;
if(className==null)
! { className = (String)customAtomRefs.get("*");
if(className==null)
o = new JBuilderReference(iRef,parent);
}
if(className!=null)
! {
! Class RefClass;
Class argsType[] = new Class[2];
***************
*** 163,187 ****
args[1] = parent;
Constructor RefConst = RefClass.getDeclaredConstructor(argsType);
! o = (JBuilderModelReference)RefConst.newInstance(args);
}
catch(ClassNotFoundException e)
{
! throw new BONException("User Custom Class not found in JBuilderFactory.createModel");
}
catch(NoSuchMethodException e)
{
! throw new BONException("User Custom Class Constructor not found in JBuilderFactory.createModel");
}
catch(InstantiationException e)
{
! throw new BONException("User Custom Class Instantiation falied in JBuilderFactory.createModel");
}
catch(IllegalAccessException e)
{
! throw new BONException("User Custom Class Security access failed in CreateModel");
}
catch(InvocationTargetException e)
{
! throw new BONException("User Custom Class Invocation target exception in CreateModel");
}
--- 163,187 ----
args[1] = parent;
Constructor RefConst = RefClass.getDeclaredConstructor(argsType);
! o = (JBuilderReference)RefConst.newInstance(args);
}
catch(ClassNotFoundException e)
{
! throw new BONException("User Custom Class not found in JBuilderFactory.createReference");
}
catch(NoSuchMethodException e)
{
! throw new BONException("User Custom Class Constructor not found in JBuilderFactory.createReference");
}
catch(InstantiationException e)
{
! throw new BONException("User Custom Class Instantiation falied in JBuilderFactory.createReference");
}
catch(IllegalAccessException e)
{
! throw new BONException("User Custom Class Security access failed in CreateReference");
}
catch(InvocationTargetException e)
{
! throw new BONException("User Custom Class Invocation target exception in CreateReference");
}
More information about the GME-commit
mailing list