1 /*
2  * Copyright 2002-2007 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of 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,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package org.springframework.beans;
18 
19 import java.io.IOException;
20 
21 /**
22  * Interface used for {@link org.springframework.beans.TestBean}.
23  *
24  * <p>Two methods are the same as on Person, but if this
25  * extends person it breaks quite a few tests..
26  *
27  * @author Rod Johnson
28  * @author Juergen Hoeller
29  */
30 public interface ITestBean {
31 
getAge()32 	int getAge();
33 
setAge(int age)34 	void setAge(int age);
35 
getName()36 	String getName();
37 
setName(String name)38 	void setName(String name);
39 
getSpouse()40 	ITestBean getSpouse();
41 
setSpouse(ITestBean spouse)42 	void setSpouse(ITestBean spouse);
43 
getSpouses()44 	ITestBean[] getSpouses();
45 
getStringArray()46 	String[] getStringArray();
47 
setStringArray(String[] stringArray)48 	void setStringArray(String[] stringArray);
49 
50 	/**
51 	 * Throws a given (non-null) exception.
52 	 */
exceptional(Throwable t)53 	void exceptional(Throwable t) throws Throwable;
54 
returnsThis()55 	Object returnsThis();
56 
getDoctor()57 	INestedTestBean getDoctor();
58 
getLawyer()59 	INestedTestBean getLawyer();
60 
getNestedIndexedBean()61 	IndexedTestBean getNestedIndexedBean();
62 
63 	/**
64 	 * Increment the age by one.
65 	 * @return the previous age
66 	 */
haveBirthday()67 	int haveBirthday();
68 
unreliableFileOperation()69 	void unreliableFileOperation() throws IOException;
70 
71 }