Class PrimitiveGenerator
java.lang.Object
com.comphenix.protocol.reflect.instances.PrimitiveGenerator
- All Implemented Interfaces:
InstanceProvider
Provides constructors for primtive types, wrappers, arrays and strings.
- Author:
- Kristian
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic PrimitiveGeneratorShared instance of this generator.static StringDefault value for Strings. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate an instance given a type, if possible.Retrieve the string default.
-
Field Details
-
STRING_DEFAULT
Default value for Strings.- See Also:
- Constant Field Values
-
INSTANCE
Shared instance of this generator.
-
-
Constructor Details
-
PrimitiveGenerator
-
-
Method Details
-
getStringDefault
Retrieve the string default.- Returns:
- Default instance of a string.
-
create
Description copied from interface:InstanceProviderCreate an instance given a type, if possible.- Specified by:
createin interfaceInstanceProvider- Parameters:
type- - type to create.- Returns:
- The instance, or NULL if the type cannot be created.
-