|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jwalk.out.Report org.jwalk.out.ProtocolReport
public class ProtocolReport
ProtocolReport is a report on the test class's public interface.
A ProtocolReport is responsible for formatting the data generated by a
ClassInspector. It also provides direct access to the test class and
its constructors and methods.
The intention is that client programs will either use the default
getContent() method to return the whole textual content; or they will
extract individual elements and format them separately. As a convenience,
several toString(object) methods are provided to convert classes,
constructors and methods into a standard printable representation.
Field Summary |
---|
Fields inherited from class org.jwalk.out.Report |
---|
edition, walker |
Constructor Summary | |
---|---|
|
ProtocolReport(ClassInspector walker)
Creates a ProtocolReport. |
protected |
ProtocolReport(Edition edition,
ClassInspector walker)
Secretly initialises the edition and walker. |
Method Summary | |
---|---|
protected java.lang.String |
banner()
Creates a text banner to use at the start of the report. |
java.util.List<java.lang.Enum<?>> |
getConstants()
Returns the public enumerated constants of the test class. |
java.util.List<java.lang.reflect.Constructor<?>> |
getConstructors()
Returns the public constructors of the test class. |
java.lang.String |
getContent()
Returns the content of this ProtocolReport as formatted text. |
ClassInspector |
getJWalker()
Return the ClassInspector which was the source of this report. |
java.util.List<java.lang.reflect.Method> |
getMethods()
Returns the public methods of the test class. |
java.lang.Class<?> |
getTestClass()
Returns the test class. |
protected boolean |
isAbstract(java.lang.reflect.Method method)
Reports whether a method is abstract. |
java.lang.String |
toString(java.lang.Class<?> aClass)
Returns a formatted version of a given class's name. |
java.lang.String |
toString(java.lang.reflect.Constructor<?> constructor)
Returns a formatted constructor signature. |
java.lang.String |
toString(java.lang.reflect.Method method)
Returns a formatted method signature. |
Methods inherited from class org.jwalk.out.Report |
---|
getEdition, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ProtocolReport(ClassInspector walker)
walker
- a ClassInspector.protected ProtocolReport(Edition edition, ClassInspector walker)
edition
- an indicator of the kind of Report.walker
- a JWalker that inspected the test class.Method Detail |
---|
public ClassInspector getJWalker()
getJWalker
in class Report
public java.util.List<java.lang.Enum<?>> getConstants()
public java.util.List<java.lang.reflect.Constructor<?>> getConstructors()
public java.util.List<java.lang.reflect.Method> getMethods()
public java.lang.Class<?> getTestClass()
protected java.lang.String banner()
public java.lang.String getContent()
getContent
in class Report
protected boolean isAbstract(java.lang.reflect.Method method)
method
- a method to inspect.
public java.lang.String toString(java.lang.Class<?> aClass)
aClass
- the Class to format.
public java.lang.String toString(java.lang.reflect.Constructor<?> constructor)
constructor
- the Constructor to format.
public java.lang.String toString(java.lang.reflect.Method method)
method
- the Method to format.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |