public boolean doesClassExist(String className) { try { _resolver.findClass(className); return true; } catch (ApplicationRuntimeException ex) { return false; } }
/** * Overrides the default implementation to have the resource resolver find * the class. */ protected Class resolveClass(ObjectStreamClass v) throws IOException, ClassNotFoundException { return _resolver.findClass(v.getName()); } }
/** * Overrides the default implementation to have the resource resolver find * the class. */ protected Class resolveClass(ObjectStreamClass v) throws IOException, ClassNotFoundException { return _resolver.findClass(v.getName()); } }
public Object createStateObject() { try { Class c = _classResolver.findClass(_className); return c.newInstance(); } catch (Exception ex) { throw new ApplicationRuntimeException(StateMessages .unableToInstantiateObject(_className, ex), getLocation(), ex); } }
public Object createStateObject() { try { Class c = _classResolver.findClass(_className); return c.newInstance(); } catch (Exception ex) { throw new ApplicationRuntimeException(StateMessages .unableToInstantiateObject(_className, ex), getLocation(), ex); } }
public Class convertTypeName(String type) { Defense.notNull(type, "type"); Class result = _javaClassMapping.getType(type); if (result == null) { result = _resolver.findClass(type); _javaClassMapping.recordType(type, result); } return result; }
public Class convertTypeName(String type) { Defense.notNull(type, "type"); Class result = _javaClassMapping.getType(type); if (result == null) { result = _resolver.findClass(type); _javaClassMapping.recordType(type, result); } return result; }
private Rule instantiateRule(String ruleClassName) { try { Class ruleClass = _resolver.findClass(ruleClassName); return (Rule) ruleClass.newInstance(); } catch (Exception ex) { throw new ApplicationRuntimeException(ParseMessages.badRuleClass( ruleClassName, getLocation(), ex), getLocation(), ex); } }
/** * Invoked to instantiate an instance of the extension and return it. It also configures * properties of the extension. */ public Object instantiateExtension() { if (LOG.isDebugEnabled()) LOG.debug("Instantiating extension class " + _className + "."); Class extensionClass = null; Object result = null; try { extensionClass = _resolver.findClass(_className); } catch (Exception ex) { throw new ApplicationRuntimeException(Tapestry.format( "ExtensionSpecification.bad-class", _className), getLocation(), ex); } result = instantiateInstance(extensionClass, result); initializeProperties(result); return result; }
private Class lookupClass(RuleDirectedParser parser, String className) { if (HiveMind.isBlank(className)) return null; try { return _resolver.findClass(className); } catch (Exception ex) { throw new DocumentParseException(Tapestry.format( "ScriptParser.unable-to-resolve-class", className), parser .getLocation(), ex); } } }
/** * Invoked to instantiate an instance of the extension and return it. It also configures * properties of the extension. */ public Object instantiateExtension() { if (LOG.isDebugEnabled()) LOG.debug("Instantiating extension class " + _className + "."); Class extensionClass = null; Object result = null; try { extensionClass = _resolver.findClass(_className); } catch (Exception ex) { throw new ApplicationRuntimeException(Tapestry.format( "ExtensionSpecification.bad-class", _className), getLocation(), ex); } result = instantiateInstance(extensionClass, result); initializeProperties(result); return result; }
private Class lookupClass(RuleDirectedParser parser, String className) { if (HiveMind.isBlank(className)) return null; try { return _resolver.findClass(className); } catch (Exception ex) { throw new DocumentParseException(Tapestry.format( "ScriptParser.unable-to-resolve-class", className), parser .getLocation(), ex); } } }
public ComponentConstructor getComponentConstructor(IComponentSpecification specification, String className) { Defense.notNull(specification, "specification"); try { _lock.lockInterruptibly(); ComponentConstructor result = (ComponentConstructor) _cachedConstructors.get(specification); if (result == null) { Class baseClass = _classResolver.findClass(className); EnhancementOperationImpl eo = new EnhancementOperationImpl(_classResolver, specification, baseClass, _classFactory, _log); // Invoking on the chain is the same as invoking on every // object in the chain (because method performEnhancement() is type void). _chain.performEnhancement(eo, specification); result = eo.getConstructor(); // TODO: This should be optional to work around that IBM JVM bug. _validator.validate(baseClass, result.getComponentClass(), specification); _cachedConstructors.put(specification, result); } return result; } catch (InterruptedException e) { throw new ApplicationRuntimeException(e); } finally { _lock.unlock(); } }
public ComponentConstructor getComponentConstructor(IComponentSpecification specification, String className) { Defense.notNull(specification, "specification"); try { _lock.lockInterruptibly(); ComponentConstructor result = (ComponentConstructor) _cachedConstructors.get(specification); if (result == null) { Class baseClass = _classResolver.findClass(className); EnhancementOperationImpl eo = new EnhancementOperationImpl(_classResolver, specification, baseClass, _classFactory, _log); // Invoking on the chain is the same as invoking on every // object in the chain (because method performEnhancement() is type void). _chain.performEnhancement(eo, specification); result = eo.getConstructor(); // TODO: This should be optional to work around that IBM JVM bug. _validator.validate(baseClass, result.getComponentClass(), specification); _cachedConstructors.put(specification, result); } return result; } catch (InterruptedException e) { throw new ApplicationRuntimeException(e); } finally { _lock.unlock(); } }
Class pageClass = _classResolver.findClass(className);
else Class componentClass = _classResolver.findClass(className);
Class pageClass = _classResolver.findClass(className);
else Class componentClass = _classResolver.findClass(className);