Class HandlerConstructor
- java.lang.Object
-
- org.glassfish.jersey.server.model.HandlerConstructor
-
- All Implemented Interfaces:
Parameterized
,ResourceModelComponent
public final class HandlerConstructor extends java.lang.Object implements Parameterized, ResourceModelComponent
Abstraction for a resource handler class constructor.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.Constructor<?>
constructor
private java.util.List<Parameter>
parameters
-
Constructor Summary
Constructors Constructor Description HandlerConstructor(java.lang.reflect.Constructor<?> constructor, java.util.List<Parameter> parameters)
Creates a new instance of ResourceConstructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(ResourceModelVisitor visitor)
A component should call the visitor back with an appropriate visitor interface method to give it a chance to process.java.util.List<ResourceModelComponent>
getComponents()
Should return all existing resource model sub-components.java.lang.reflect.Constructor<?>
getConstructor()
Get the underlying java constructor.java.util.List<Parameter>
getParameters()
Provides access to all parameters associated with given Parameterized instance.boolean
requiresEntity()
Provides information on presence of an entity parameter.
-
-
-
Field Detail
-
constructor
private final java.lang.reflect.Constructor<?> constructor
-
parameters
private final java.util.List<Parameter> parameters
-
-
Constructor Detail
-
HandlerConstructor
HandlerConstructor(java.lang.reflect.Constructor<?> constructor, java.util.List<Parameter> parameters)
Creates a new instance of ResourceConstructor.- Parameters:
constructor
- underlying Java constructor.parameters
- constructor parameters.
-
-
Method Detail
-
getConstructor
public java.lang.reflect.Constructor<?> getConstructor()
Get the underlying java constructor.- Returns:
- underlying java constructor.
-
getParameters
public java.util.List<Parameter> getParameters()
Description copied from interface:Parameterized
Provides access to all parameters associated with given Parameterized instance.- Specified by:
getParameters
in interfaceParameterized
- Returns:
- list of actual parameters
-
requiresEntity
public boolean requiresEntity()
Description copied from interface:Parameterized
Provides information on presence of an entity parameter.- Specified by:
requiresEntity
in interfaceParameterized
- Returns:
- true if entity parameter is present, false otherwise
-
accept
public void accept(ResourceModelVisitor visitor)
Description copied from interface:ResourceModelComponent
A component should call the visitor back with an appropriate visitor interface method to give it a chance to process.- Specified by:
accept
in interfaceResourceModelComponent
- Parameters:
visitor
- resource model visitor.
-
getComponents
public java.util.List<ResourceModelComponent> getComponents()
Description copied from interface:ResourceModelComponent
Should return all existing resource model sub-components.- Specified by:
getComponents
in interfaceResourceModelComponent
- Returns:
- list of all sub-components
-
-