JBoss Logging I18n Tools 1.0.0.Beta7

org.jboss.logging.generator
Class ReturnType

java.lang.Object
  extended by org.jboss.logging.generator.ReturnType

public class ReturnType
extends Object

Describes information about the return type.

Author:
James R. Perkins

Method Summary
 boolean equals(Object obj)
           
 String getReturnTypeAsString()
          Returns a string version of the return type.
 boolean hasDefaultConstructor()
          If the return type is a default constructor true is returned.
 int hashCode()
           
 boolean hasStringAndThrowableConstructor()
          If the return type is a constructor and has a String and Throwable constructor, true is returned.
 boolean hasStringConstructor()
          If the return type is a constructor and has a String constructor, true is returned.
 boolean hasThrowableAndStringConstructor()
          If the return type is a constructor and has a Throwable and String constructor, true is returned.
 boolean hasThrowableConstructor()
          If the return type is a constructor and has a Throwable constructor, true is returned.
 boolean isException()
          Checks to see if the return type is an exception, extends Throwable.
 boolean isPrimitive()
          Indicates whether or not the return type is a primitive.
static ReturnType of(TypeMirror returnType, Types typeUtil)
          Creates a new descriptor that is not primitive.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

of

public static ReturnType of(TypeMirror returnType,
                            Types typeUtil)
Creates a new descriptor that is not primitive.

Parameters:
returnType - the class name of the return type.
typeUtil - the type utilities.
Returns:
the return type descriptor.

isPrimitive

public boolean isPrimitive()
Indicates whether or not the return type is a primitive.

Returns:
true if a primitive, otherwise false.

getReturnTypeAsString

public String getReturnTypeAsString()
Returns a string version of the return type.

Returns:
a string version of the return type.

hasDefaultConstructor

public boolean hasDefaultConstructor()
If the return type is a default constructor true is returned. Otherwise false is returned.

Returns:
true if the throwable has a default constructor, otherwise false.

hasStringAndThrowableConstructor

public boolean hasStringAndThrowableConstructor()
If the return type is a constructor and has a String and Throwable constructor, true is returned. Otherwise false is returned.

Returns:
true if the throwable has both a string and throwable constructor, otherwise false.

hasStringConstructor

public boolean hasStringConstructor()
If the return type is a constructor and has a String constructor, true is returned. Otherwise false is returned.

Returns:
true if the throwable has a string constructor, otherwise false.

hasThrowableAndStringConstructor

public boolean hasThrowableAndStringConstructor()
If the return type is a constructor and has a Throwable and String constructor, true is returned. Otherwise false is returned.

Returns:
true if the throwable has both a throwable and string constructor, otherwise false.

hasThrowableConstructor

public boolean hasThrowableConstructor()
If the return type is a constructor and has a Throwable constructor, true is returned. Otherwise false is returned.

Returns:
true if the throwable has a throwable constructor, otherwise false.

isException

public boolean isException()
Checks to see if the return type is an exception, extends Throwable.

Returns:
true if the return type is an exception, otherwise false.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

JBoss Logging I18n Tools 1.0.0.Beta7

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.