/** * Instantiate the given class, taking into account the default package. */ protected Class<?> classForName(String name) throws SAXException { if ("Entity".equals(name)) return PersistenceCapable.class; return super.classForName(name, isRuntime()); }
/** * Instantiate the given class, taking into account the default package. */ protected Class classForName(String name) throws SAXException { if ("Entity".equals(name)) return PersistenceCapable.class; return super.classForName(name, isRuntime()); } }
/** * Instantiate the given class, taking into account the default package. */ protected Class<?> classForName(String name) throws SAXException { if ("Entity".equals(name)) return PersistenceCapable.class; return super.classForName(name, isRuntime()); }
/** * Instantiate the given class, taking into account the default package. */ protected Class<?> classForName(String name) throws SAXException { if ("Entity".equals(name)) return PersistenceCapable.class; return super.classForName(name, isRuntime()); }
/** * Instantiate the given class, taking into account the default package. */ protected Class<?> classForName(String name) throws SAXException { if ("Entity".equals(name)) return PersistenceCapable.class; return super.classForName(name, isRuntime()); }
/** * Helper method to create the {@link Class} for the given name, * taking into account the package currently being parsed for relative * class names. */ protected Class<?> classForName(String name, boolean resolve) throws SAXException { if (name == null) return null; Class<?> cls = classForName(name, _package, resolve, currentClassLoader()); if (cls == null) throw getException(_loc.get("invalid-class", name).getMessage()); return cls; }
/** * Helper method to create the {@link Class} for the given name, * taking into account the package currently being parsed for relative * class names. */ protected Class classForName(String name, boolean resolve) throws SAXException { if (name == null) return null; Class cls = classForName(name, _package, resolve, currentClassLoader()); if (cls == null) throw getException(_loc.get("invalid-class", name).getMessage()); return cls; }
/** * Helper method to create the {@link Class} for the given name, * taking into account the package currently being parsed for relative * class names. */ protected Class<?> classForName(String name, boolean resolve) throws SAXException { if (name == null) return null; Class<?> cls = classForName(name, _package, resolve, currentClassLoader()); if (cls == null) throw getException(_loc.get("invalid-class", name).getMessage()); return cls; }
/** * Helper method to create the {@link Class} for the given name, * taking into account the package currently being parsed for relative * class names. */ protected Class<?> classForName(String name, boolean resolve) throws SAXException { if (name == null) return null; Class<?> cls = classForName(name, _package, resolve, currentClassLoader()); if (cls == null) throw getException(_loc.get("invalid-class", name).getMessage()); return cls; }
/** * Check the given name against the same set of standard packages used * when parsing metadata. */ private static Class classForName(String name, ClassMetaData meta, Class dec, ValueMetaData vmd, ClassLoader loader) { // special case for PersistenceCapable and Object if ("PersistenceCapable".equals(name) || "javax.jdo.PersistenceCapable".equals(name)) // backwards compat return PersistenceCapable.class; if ("Object".equals(name)) return Object.class; MetaDataRepository rep = meta.getRepository(); boolean runtime = (rep.getValidate() & rep.VALIDATE_RUNTIME) != 0; if (loader == null) loader = rep.getConfiguration().getClassResolverInstance(). getClassLoader(dec, meta.getEnvClassLoader()); // try the owner's package String pkg = Strings.getPackageName(dec); Class cls = CFMetaDataParser.classForName(name, pkg, runtime, loader); if (cls == null && vmd != null) { // try against this value type's package too pkg = Strings.getPackageName(vmd.getDeclaredType()); cls = CFMetaDataParser.classForName(name, pkg, runtime, loader); } if (cls == null) throw new MetaDataException(_loc.get("bad-class", name, (vmd == null) ? (Object) meta : (Object) vmd)); return cls; }
Class<?> cls = CFMetaDataParser.classForName(name, pkg, runtime, loader); if (cls == null && vmd != null) { cls = CFMetaDataParser.classForName(name, pkg, runtime, loader); loader = rep.getConfiguration().getClassResolverInstance(). getClassLoader(dec, meta.getEnvClassLoader()); cls = CFMetaDataParser.classForName(name, pkg, runtime, loader);
Class<?> cls = CFMetaDataParser.classForName(name, pkg, runtime, loader); if (cls == null && vmd != null) { cls = CFMetaDataParser.classForName(name, pkg, runtime, loader); loader = rep.getConfiguration().getClassResolverInstance(). getClassLoader(dec, meta.getEnvClassLoader()); cls = CFMetaDataParser.classForName(name, pkg, runtime, loader);
Class<?> cls = CFMetaDataParser.classForName(name, pkg, runtime, loader); if (cls == null && vmd != null) { cls = CFMetaDataParser.classForName(name, pkg, runtime, loader); loader = rep.getConfiguration().getClassResolverInstance(). getClassLoader(dec, meta.getEnvClassLoader()); cls = CFMetaDataParser.classForName(name, pkg, runtime, loader);
Class<?> cls = CFMetaDataParser.classForName(name, pkg, runtime, loader); if (cls == null && vmd != null) { cls = CFMetaDataParser.classForName(name, pkg, runtime, loader); loader = rep.getConfiguration().getClassResolverInstance(). getClassLoader(dec, meta.getEnvClassLoader()); cls = CFMetaDataParser.classForName(name, pkg, runtime, loader);