Fix some raw types

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829545 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2009-10-25 11:44:15 +00:00
parent f4ace74c76
commit 7072a549e5
1 changed files with 4 additions and 4 deletions

View File

@ -255,7 +255,7 @@ public class ConstructorUtils {
* @see Class#getConstructor * @see Class#getConstructor
* @see #getAccessibleConstructor(java.lang.reflect.Constructor) * @see #getAccessibleConstructor(java.lang.reflect.Constructor)
*/ */
public static Constructor getAccessibleConstructor(Class<?> cls, public static Constructor<?> getAccessibleConstructor(Class<?> cls,
Class<?> parameterType) { Class<?> parameterType) {
return getAccessibleConstructor(cls, new Class[] { parameterType }); return getAccessibleConstructor(cls, new Class[] { parameterType });
} }
@ -268,7 +268,7 @@ public class ConstructorUtils {
* @see Class#getConstructor * @see Class#getConstructor
* @see #getAccessibleConstructor(java.lang.reflect.Constructor) * @see #getAccessibleConstructor(java.lang.reflect.Constructor)
*/ */
public static Constructor getAccessibleConstructor(Class<?> cls, public static Constructor<?> getAccessibleConstructor(Class<?> cls,
Class<?>[] parameterTypes) { Class<?>[] parameterTypes) {
try { try {
return getAccessibleConstructor(cls.getConstructor(parameterTypes)); return getAccessibleConstructor(cls.getConstructor(parameterTypes));
@ -283,7 +283,7 @@ public class ConstructorUtils {
* @return <code>null</code> if accessible constructor can not be found. * @return <code>null</code> if accessible constructor can not be found.
* @see java.lang.SecurityManager * @see java.lang.SecurityManager
*/ */
public static Constructor getAccessibleConstructor(Constructor ctor) { public static Constructor<?> getAccessibleConstructor(Constructor<?> ctor) {
return MemberUtils.isAccessible(ctor) return MemberUtils.isAccessible(ctor)
&& Modifier.isPublic(ctor.getDeclaringClass().getModifiers()) ? ctor && Modifier.isPublic(ctor.getDeclaringClass().getModifiers()) ? ctor
: null; : null;
@ -304,7 +304,7 @@ public class ConstructorUtils {
* @param parameterTypes find method with compatible parameters * @param parameterTypes find method with compatible parameters
* @return a valid Constructor object. If there's no matching constructor, returns <code>null</code>. * @return a valid Constructor object. If there's no matching constructor, returns <code>null</code>.
*/ */
public static Constructor getMatchingAccessibleConstructor(Class<?> cls, public static Constructor<?> getMatchingAccessibleConstructor(Class<?> cls,
Class<?>[] parameterTypes) { Class<?>[] parameterTypes) {
// see if we can find the constructor directly // see if we can find the constructor directly
// most of the time this works and it's much faster // most of the time this works and it's much faster