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   * A reflector that is composed of multiple component reflectors.
20   * 
21   * @author Matt Sgarlata
22   * @since Feb 2, 2006
23   */
24  public interface CompositeReflector extends Reflector {
25  
26  	/**
27  	 * Indicates whether this reflector can support the operations specified in
28  	 * <code>reflectorType</code> when reflecting instances of
29  	 * <code>reflectedType</code>.
30  	 * 
31  	 * @param reflectedType
32  	 *            the type of the object for which we wish to determine
33  	 *            reflectability
34  	 * @param reflectorType
35  	 *            the interface which defines the operations we would like to
36  	 *            perform on instances of <code>reflectedType</code>
37  	 * @return <code>true</code>, if this reflector can support the
38  	 *         operations specified in <code>reflectorType</code> when
39  	 *         reflecting instances of <code>reflectedType</code>
40  	 * @throws ReflectionException
41  	 *             if this reflector could not determine whether it could
42  	 *             support the operations specified in
43  	 *             <code>reflectorType</code>.
44  	 */
45  	public boolean isReflectable(Class reflectedType, Class reflectorType)
46  		throws ReflectionException;
47  
48  }