⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 converterfactory.java

📁 Please read your package and describe it at least 40 bytes in English. System will automatically de
💻 JAVA
字号:
/* * Copyright 2002-2004 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * *      http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package de.mindmatters.faces.application;import java.util.Iterator;import javax.faces.application.Application;import javax.faces.convert.Converter;/** * <strong>Factory</strong> for managing {@link Converter}s. Used by * {@link ApplicationImpl}. *  * @author Andreas Kuhrwahl *  */public interface ConverterFactory {    /**     * Register a new mapping of converter id to the name of the corresponding     * {@link Converter} class. This allows subsequent calls to     * <code>createConverter()</code> to serve as a factory for     * {@link Converter} instances.     *      * @param application     *            the <strong>original</strong> Application of the underlying     *            JSF implementation     * @param converterId     *            The converter id to be registered     * @param converterClass     *            The fully qualified class name of the corresponding     *            {@link Converter} implementation     *      * @exception NullPointerException     *                if <code>converterId</code> or     *                <code>converterClass</code> is <code>null</code>     */    void addConverter(Application application, String converterId,            String converterClass);    /**     * Register a new converter class that is capable of performing conversions     * for the specified target class.     *      * @param application     *            the <strong>original</strong> Application of the underlying     *            JSF implementation     * @param targetClass     *            The class for which this converter is registered     * @param converterClass     *            The fully qualified class name of the corresponding     *            {@link Converter} implementation     *      * @exception NullPointerException     *                if <code>targetClass</code> or     *                <code>converterClass</code> is <code>null</code>     */    void addConverter(Application application, Class targetClass,            String converterClass);    /**     * Instantiate and return a new {@link Converter} instance of the class     * specified by a previous call to <code>addConverter()</code> for the     * specified converter id. If there is no such registration for this     * converter id, return <code>null</code>.     *      * @param application     *            the <strong>original</strong> Application of the underlying     *            JSF implementation     * @param converterId     *            The converter id for which to create and return a new     *            {@link Converter} instance     * @return the created Converter     * @exception javax.faces.FacesException     *                if the {@link Converter} cannot be created     * @exception NullPointerException     *                if <code>converterId</code> is <code>null</code>     */    Converter createConverter(Application application, String converterId);    /**     * Instantiate and return a new {@link Converter} instance of the class that     * has registered itself as capable of performing conversions for objects of     * the specified type. If no such {@link Converter} class can be identified,     * return <code>null</code>.     *      * <p>     * To locate an appropriate {@link Converter} class, the following algorithm     * is performed, stopping as soon as an appropriate {@link Converter} class     * is found:     * </p>     * <ul>     * <li>Locate a {@link Converter} registered for the target class itself.     * </li>     * <li>Locate a {@link Converter} registered for interfaces that are     * implemented by the target class (directly or indirectly).</li>     * <li>Locate a {@link Converter} registered for the superclass (if any) of     * the target class, recursively working up the inheritance hierarchy.</li>     * </ul>     *      * @param application     *            the <strong>original</strong> Application of the underlying     *            JSF implementation     * @param targetClass     *            Target class for which to return a {@link Converter}     * @return the created Converter     * @exception javax.faces.FacesException     *                if the {@link Converter} cannot be created     * @exception NullPointerException     *                if <code>targetClass</code> is <code>null</code>     */    Converter createConverter(Application application, Class targetClass);    /**     * Return an <code>Iterator</code> over the set of currently registered     * converter ids for this <code>Application</code>.     *      * @param application     *            the <strong>original</strong> Application of the underlying     *            JSF implementation     * @return An Iterator over the set of currently registered converter ids     */    Iterator getConverterIds(Application application);    /**     * Return an <code>Iterator</code> over the set of <code>Class</code>     * instances for which {@link Converter} classes have been explicitly     * registered.     *      * @param application     *            the <strong>original</strong> Application of the underlying     *            JSF implementation     * @return An Iterator over the set of <code>Class</code> instances for     *         which {@link Converter} classes have been explicitly registered     */    Iterator getConverterTypes(Application application);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -