Top Description Fields Constructors Methods
org.jboss.marshalling.reflect

public Class ReflectiveCreator

extends Object
implements Creator
Class Inheritance
All Implemented Interfaces
org.jboss.marshalling.Creator
Known Direct Subclasses
org.jboss.marshalling.reflect.SunReflectiveCreator
Annotations
@Deprecated
Imports
java.lang.reflect.Constructor, .InvocationTargetException, java.security.Permission, java.io.InvalidClassException, .SerializablePermission, org.jboss.marshalling.Creator

Deprecated

This class is no longer used and will be removed in a future version.

A creator that simply uses reflection to locate and invoke a zero-argument constructor.

Field Summary

Modifier and TypeField and Description
private static final Permission
private static final SerializableClassRegistry

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public <T> T
create(final Class<T>
the type of object to create
clazz
)

Implements org.jboss.marshalling.Creator.create.

Create an object instance.
protected <T> Constructor<T>

Returns:

the constructor, or null if none is available
getNewConstructor
(final Class<T>
the class to get a constructor for
clazz
)

Get the constructor to use for a class.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CREATOR_PERMback to summary
private static final Permission CREATOR_PERM
registryback to summary
private static final SerializableClassRegistry registry

Constructor Detail

ReflectiveCreatorback to summary
public ReflectiveCreator()

Method Detail

createback to summary
public <T> T create(final Class<T> clazz) throws InvalidClassException

Implements org.jboss.marshalling.Creator.create.

Doc from org.jboss.marshalling.Creator.create.

Create an object instance.

Parameters
clazz:Class<T>

the type of object to create

Returns:T

the object instance

Exceptions
InvalidClassException:
if an instance of the class could not be instantiated for some reason
getNewConstructorback to summary
protected <T> Constructor<T> getNewConstructor(final Class<T> clazz)

Get the constructor to use for a class. Returns null if no suitable constructor is available.

Parameters
clazz:Class<T>

the class to get a constructor for

Returns:Constructor<T>

the constructor, or null if none is available