public class WrongGenericsContextException extends GenericSourceException
AbstractGenericsContext where incoming type is explicitly checked
for compatibility (to prevent usage errors).
Most common reason is trying to resolve type without changing context type (for example, when using
getMethod() or getField()).
Error message contains usage hint if it is possible to resolve type correctly.
| Constructor and Description |
|---|
WrongGenericsContextException(java.lang.reflect.Type type,
java.lang.reflect.TypeVariable variable,
java.lang.Class<?> context,
GenericsInfo info) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class<?> |
getContextType() |
java.lang.String |
getGenericName() |
java.lang.reflect.GenericDeclaration |
getGenericSource() |
java.lang.reflect.Type |
getType() |
formatSourcepublic WrongGenericsContextException(java.lang.reflect.Type type,
java.lang.reflect.TypeVariable variable,
java.lang.Class<?> context,
GenericsInfo info)
public java.lang.reflect.Type getType()
public java.lang.String getGenericName()
getGenericName in class GenericSourceExceptionpublic java.lang.reflect.GenericDeclaration getGenericSource()
getGenericSource in class GenericSourceExceptionpublic java.lang.Class<?> getContextType()
getContextType in class GenericSourceException