public class ReflectionTestClass extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ReflectionTestClass.Mode
An enumeration class for testing conversions to enumeration literals.
|
| Modifier and Type | Field and Description |
|---|---|
static Integer |
ANSWER
A test constant.
|
protected static Integer |
SECRET_ANSWER
A constant with restricted access.
|
| Constructor and Description |
|---|
ReflectionTestClass()
Creates a new instance of
ReflectionTestClass. |
ReflectionTestClass(Object obj,
int i)
Creates a new instance of
ReflectionTestClass and initializes the
object and the number property. |
ReflectionTestClass(String s)
Creates a new instance of
ReflectionTestClass and initializes
the string property. |
ReflectionTestClass(String s,
int i)
Creates a new instance of
ReflectionTestClass and initializes
the properties. |
| Modifier and Type | Method and Description |
|---|---|
String |
create(String prefix)
A method for for testing whether a factory method from another bean can
be invoked.
|
Object |
getData() |
static ReflectionTestClass |
getInstance(String s,
int i)
A static factory method for testing static method invocations.
|
int |
getIntProp() |
ReflectionTestClass.Mode |
getMode() |
String |
getReadOnlyProperty()
A synthetic property that can only be read.
|
String |
getStringProp() |
String |
initialize(String s,
int i)
Initializes the properties of this instance.
|
void |
initializeOverloaded(ReflectionTestClass.Mode mode,
String s,
int i)
Another overloaded initializing method with a different order of
arguments.
|
void |
initializeOverloaded(String s,
int i,
ReflectionTestClass.Mode mode)
An overloaded method for initializing some properties.
|
void |
initializeOverloaded(String s,
int i,
String dataStr)
Another overloaded initializing method which affects some other property
types.
|
void |
initializeOverloaded(String s,
Object data,
int i,
ReflectionTestClass.Mode mode)
And still another overloaded initializing method which also initializes
the data property.
|
boolean |
isShutdown()
Returns a flag whether the
shutdown() method was called. |
void |
methodThatThrowsAnException() |
void |
setData(Object data) |
void |
setExceptionProperty(String s)
A property that will cause an exception when being set.
|
void |
setIntProp(int intProp) |
void |
setMode(ReflectionTestClass.Mode mode) |
void |
setStringProp(String stringProp) |
StringBuilder |
setStringProp(StringBuilder buf)
An overloaded method for making parameter matching more interesting.
|
void |
setTestCase(junit.framework.TestCase t)
A property with a not supported custom type.
|
void |
shutdown()
Shuts down this object.
|
public static final Integer ANSWER
protected static final Integer SECRET_ANSWER
public ReflectionTestClass()
ReflectionTestClass. Default
constructor.public ReflectionTestClass(String s, int i)
ReflectionTestClass and initializes
the properties.s - the string propertyi - the int propertypublic ReflectionTestClass(String s)
ReflectionTestClass and initializes
the string property.s - the string propertypublic ReflectionTestClass(Object obj, int i)
ReflectionTestClass and initializes the
object and the number property.obj - the data for the object propertyi - the numeric propertypublic String getStringProp()
public void setStringProp(String stringProp)
public StringBuilder setStringProp(StringBuilder buf)
buf - the buffer with the string to setpublic int getIntProp()
public void setIntProp(int intProp)
public Object getData()
public void setData(Object data)
public ReflectionTestClass.Mode getMode()
public void setMode(ReflectionTestClass.Mode mode)
public void methodThatThrowsAnException()
public String getReadOnlyProperty()
public void setTestCase(junit.framework.TestCase t)
t - the valuepublic void setExceptionProperty(String s)
s - the valuepublic String initialize(String s, int i)
s - the string propertyi - the int propertypublic void initializeOverloaded(String s, int i, ReflectionTestClass.Mode mode)
s - the string propertyi - the numeric propertymode - the mode propertypublic void initializeOverloaded(ReflectionTestClass.Mode mode, String s, int i)
mode - the mode propertys - the string propertyi - the numeric propertypublic void initializeOverloaded(String s, int i, String dataStr)
s - the string propertyi - the numeric propertydataStr - the data property as stringpublic void initializeOverloaded(String s, Object data, int i, ReflectionTestClass.Mode mode)
s - the string propertydata - the data propertyi - the numeric propertymode - the mode propertypublic void shutdown()
public boolean isShutdown()
shutdown() method was called.shutdown() was calledpublic static ReflectionTestClass getInstance(String s, int i)
s - the string propertyi - the int propertyCopyright © 2016 The JGUIraffe Team. All rights reserved.