|
-
February 9th, 2011, 06:39 AM
#1
What's Constructor<?>
In the wikipedia page on the factory pattern
What does Constructor<?> mean in the statement
HashMap<String,Constructor<?>> factoryServices ?
-
February 9th, 2011, 07:13 AM
#2
Re: What's Constructor<?>
Constructor is a class in the java.lang.reflect package. Instances of this class represent a single constructor in another class and provide information about that constructor. They also allow access to the constructor so by using the newInstance(...) method you can create an object of the type the Constructor represents.
-
February 9th, 2011, 07:31 AM
#3
Re: What's Constructor<?>
Many thanks for your reply. I was wondering about the <?> , what does that mean ?
-
February 9th, 2011, 07:55 AM
#4
Re: What's Constructor<?>
It's a generics wildcard character meaning the constructor can be a constructor for an object of any type.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|