modifyType
public JavaType modifyType(JavaType type,
Type jdkType,
TypeBindings bindings,
TypeFactory typeFactory)
Method called to let modifier change constructed type definition.
Note that this is only guaranteed to be called for
non-container types ("simple" types not recognized as arrays,
java.util.Collection or java.util.Map).
- Specified by:
modifyType in class TypeModifier
- Parameters:
type - Instance to modify
jdkType - JDK type that was used to construct instance to modify
bindings - Type resolution context used for the type
typeFactory - Type factory that can be used to construct parameter type; note,
however, that care must be taken to avoid infinite loops -- specifically, do not
construct instance of primary type itself
- Returns:
- Actual type instance to use; usually either
type (as is or with
modifications), or a newly constructed type instance based on it. Cannot be null.