View Javadoc

1   /*
2    * Copyright 2004-2005 the original author or authors.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5    * use this file except in compliance with the License. You may obtain a copy of
6    * the License at
7    * 
8    * http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13   * License for the specific language governing permissions and limitations under
14   * the License.
15   */
16  package net.sf.morph.reflect;
17  
18  /**
19   * <p>
20   * An extension of the Reflector interface that defines extra methods. All
21   * methods specified in this interface can be easily implemented using just the
22   * methods in the Reflector interface. Thus, if you are defining your own
23   * reflector you should implement only the Reflector interface. If you extend
24   * from {@link net.sf.morph.reflect.reflectors.BaseReflector}, your reflector
25   * will implement this inteface automatically.
26   * </p>
27   * 
28   * <p>
29   * If you don't want to extend from <code>BaseReflector</code>, you can still
30   * easily expose this interface by using the
31   * {@link net.sf.morph.reflect.reflectors.ReflectorDecorator}.
32   * </p>
33   * 
34   * @author Matt Sgarlata
35   * @since Dec 13, 2004
36   */
37  public interface DecoratedReflector extends Reflector {
38  
39  	/**
40  	 * Indicates whether the given type is reflectable by this reflector.
41  	 * 
42  	 * @param reflectedType
43  	 *            the type to test
44  	 * @return <code>true</code>, if this reflector can reflect the given
45  	 *         class or <br>
46  	 *         <code>false</code>, if this reflector cannot reflect the given
47  	 *         class
48  	 * @throws ReflectionException
49  	 *             if an error occurrs
50  	 */
51  	public boolean isReflectable(Class reflectedType)
52  		throws ReflectionException;
53  
54  }