APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.beans.finder

public final Class ConstructorFinder

extends AbstractFinder<Constructor<?>>
Class Inheritance
Imports
com.sun.beans.util.Cache, java.lang.reflect.Constructor, .Modifier

This utility class provides static methods to find a public constructor with specified parameter types in specified class.
Author
Sergey A. Malenkov
Since
1.7

Field Summary

Modifier and TypeField and Description
private static final Cache<Signature, Constructor<?>>

Constructor Summary

AccessConstructor and Description
private
ConstructorFinder(Class<?>[]
the array of parameter types
args
)

Creates constructor finder with specified array of parameter types.

Method Summary

Modifier and TypeMethod and Description
public static Constructor<?>

Returns:

object that represents found constructor
findConstructor
(Class<?>
the class that can have constructor
type
,
Class<?>...
parameter types that is used to find constructor
args
)

Finds public constructor that is declared in public class.

Inherited from com.sun.beans.finder.AbstractFinder:
findisValid

Field Detail

CACHEback to summary
private static final Cache<Signature, Constructor<?>> CACHE

Constructor Detail

ConstructorFinderback to summary
private ConstructorFinder(Class<?>[] args)

Creates constructor finder with specified array of parameter types.

Parameters
args:Class<?>[]

the array of parameter types

Method Detail

findConstructorback to summary
public static Constructor<?> findConstructor(Class<?> type, Class<?>... args) throws NoSuchMethodException

Finds public constructor that is declared in public class.

Parameters
type:Class<?>

the class that can have constructor

args:Class<?>[]

parameter types that is used to find constructor

Returns:Constructor<?>

object that represents found constructor

Exceptions
NoSuchMethodException:
if constructor could not be found or some constructors are found