Package randoop.condition
Class ThrowsClause
- java.lang.Object
-
- randoop.condition.ThrowsClause
-
public class ThrowsClause extends Object
Represents an expected exception in a throws-condition.
-
-
Field Summary
Fields Modifier and Type Field Description private String
comment
The descriptive text for this exception.private ClassOrInterfaceType
exceptionType
The type of the exception.
-
Constructor Summary
Constructors Constructor Description ThrowsClause(ClassOrInterfaceType exceptionType, String comment)
Creates aThrowsClause
object with the given type, and comment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
String
getComment()
Returns the descriptive comment for thisThrowsClause
.ClassOrInterfaceType
getExceptionType()
Returns the type of the exception.int
hashCode()
String
toString()
-
-
-
Field Detail
-
comment
private final String comment
The descriptive text for this exception.
-
exceptionType
private final ClassOrInterfaceType exceptionType
The type of the exception.
-
-
Constructor Detail
-
ThrowsClause
ThrowsClause(ClassOrInterfaceType exceptionType, String comment)
Creates aThrowsClause
object with the given type, and comment.- Parameters:
exceptionType
- the type of the expected exceptioncomment
- the text description of the throws clause
-
-
Method Detail
-
getExceptionType
public ClassOrInterfaceType getExceptionType()
Returns the type of the exception.- Returns:
- the type of the exception
-
getComment
public String getComment()
Returns the descriptive comment for thisThrowsClause
.- Returns:
- the comment for this
ThrowsClause
-
-