/** * Public constructor. * * @param execContext The Smooks Container Request that the parser is being instantiated on behalf of. * @param saxDriverConfig SAX Parser configuration. See <a href="#parserconfig">.cdrl Configuration</a>. */ public AbstractParser(ExecutionContext execContext, SmooksResourceConfiguration saxDriverConfig) { AssertArgument.isNotNull(execContext, "execContext"); this.execContext = execContext; this.saxDriverConfig = saxDriverConfig; }
public Descriptor(List<Properties> descriptors, EntityResolver schemaResolver, EntityResolver bindingResolver, ClassLoader classloader) throws SAXException, IOException { AssertArgument.isNotNullAndNotEmpty(descriptors, "descriptors"); AssertArgument.isNotNull(bindingResolver, "bindingResolver"); AssertArgument.isNotNull(classloader, "classloader"); this.classloader = classloader; intialize(descriptors, schemaResolver, bindingResolver); }
/** * Public constructor. * @param owner The owning {@link SAXVisitor} instance. * @param encodeSpecialChars Encode special XML characters. */ public SAXToXMLWriter(SAXVisitor owner, boolean encodeSpecialChars) { AssertArgument.isNotNull(owner, "owner"); this.owner = owner; this.encodeSpecialChars = encodeSpecialChars; }
/** * Public constructor. * @param bean The bean instance. */ public BeanMetadata(Object bean) { AssertArgument.isNotNull(bean, "bean"); this.bean = bean; }
public ArchiveClassLoader(ClassLoader parent, Archive archive) { super(parent); AssertArgument.isNotNull(archive, "archive"); this.archive = archive; }
/** * @param connection */ public ExternalTransactionManager(Connection connection, boolean autoCommit, boolean isSetAutoCommitAllowed) { AssertArgument.isNotNull(connection, "connection"); this.connection = connection; this.autoCommit = autoCommit; this.isSetAutoCommitAllowed = isSetAutoCommitAllowed; }
public DirectDataSource setUsername(String username) { AssertArgument.isNotNull(username, "username"); this.username = username; return this; }
/** * Add literal text to the supplied element. * @param element Target DOM Element. * @param literalText Literal text to be added. */ public static void addLiteral(Element element, String literalText) { AssertArgument.isNotNull(element, "element"); AssertArgument.isNotNull(literalText, "literalText"); Document document = element.getOwnerDocument(); Text literal = document.createTextNode(literalText); element.appendChild(literal); }
public void addEvaluator(XPathExpressionEvaluator evaluator) { AssertArgument.isNotNull(evaluator, "evaluator"); evaluators.add(evaluator); evalCount = evaluators.size(); }
/** * Remove all child nodes from the supplied node. * @param node to be "cleared". */ public static void removeChildren(Node node) { AssertArgument.isNotNull(node, "node"); NodeList children = node.getChildNodes(); int nodeCount = children.getLength(); for(int i = 0; i < nodeCount; i++) { node.removeChild(children.item(0)); } }
/** * */ public LookupMethod(final Method method) { AssertArgument.isNotNull(method, "method"); this.method = method; analyzeParameters(); }
public String encode(Object date) throws DataDecodeException { AssertArgument.isNotNull(date, "date"); if(!(date instanceof Date)) { throw new DataDecodeException("Cannot encode Object type '" + date.getClass().getName() + "'. Must be type '" + Date.class.getName() + "'."); } // Must be sync'd - DateFormat is not synchronized. synchronized(decoder) { return decoder.format((Date) date); } } }
/** * * @param daoClass */ AnnotatedDaoRuntimeInfo(final Class<?> daoClass) { AssertArgument.isNotNull(daoClass, "daoClass"); this.daoClass = daoClass; analyze(); }
public SerializationContext(Object rootObject, String rootObjectBeanId) { AssertArgument.isNotNull(rootObject, "rootObject"); this.rootObject = rootObject; addObject(rootObjectBeanId, rootObject); }
public boolean containsBean(BeanId beanId) { AssertArgument.isNotNull(beanId, "beanId"); int index = beanId.getIndex(); return entries.size() > index && entries.get(index).getValue() != null; }
public Object getBean(BeanId beanId) { AssertArgument.isNotNull(beanId, "beanId"); int index = beanId.getIndex(); if (entries.size() <= index) { return null; } return entries.get(index).getValue(); }
public BeanId getBeanId(String beanId) { AssertArgument.isNotNull(beanId, "beanId"); BeanId beanIdObj = beanIdStore.getBeanId(beanId); if (beanIdObj == null) { beanIdObj = beanIdStore.register(beanId); } return beanIdObj; }
public Object remove(Object key) { AssertArgument.isNotNull(key, "key"); if (key instanceof String == false) { return null; } BeanId beanId = beanIdStore.getBeanId((String) key); return beanId == null ? null : removeBean(beanId, null); }
/** * Get the bean map associated with the supplied request instance. * @param executionContext The execution context. * @return The bean map associated with the supplied request. * */ public static HashMap<String, Object> getBeans(ExecutionContext executionContext) { warnUsingDeprecatedMethod(); AssertArgument.isNotNull(executionContext, "executionContext"); return (HashMap<String, Object>) getBeanMap(executionContext); }