Consistent use of Class<?>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -48,14 +48,14 @@ public class InjectionMetadata {
|
||||
|
||||
private final Log logger = LogFactory.getLog(InjectionMetadata.class);
|
||||
|
||||
private final Class targetClass;
|
||||
private final Class<?> targetClass;
|
||||
|
||||
private final Collection<InjectedElement> injectedElements;
|
||||
|
||||
private volatile Set<InjectedElement> checkedElements;
|
||||
|
||||
|
||||
public InjectionMetadata(Class targetClass, Collection<InjectedElement> elements) {
|
||||
public InjectionMetadata(Class<?> targetClass, Collection<InjectedElement> elements) {
|
||||
this.targetClass = targetClass;
|
||||
this.injectedElements = elements;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public class InjectionMetadata {
|
||||
return this.member;
|
||||
}
|
||||
|
||||
protected final Class getResourceType() {
|
||||
protected final Class<?> getResourceType() {
|
||||
if (this.isField) {
|
||||
return ((Field) this.member).getType();
|
||||
}
|
||||
@@ -122,16 +122,16 @@ public class InjectionMetadata {
|
||||
}
|
||||
}
|
||||
|
||||
protected final void checkResourceType(Class resourceType) {
|
||||
protected final void checkResourceType(Class<?> resourceType) {
|
||||
if (this.isField) {
|
||||
Class fieldType = ((Field) this.member).getType();
|
||||
Class<?> fieldType = ((Field) this.member).getType();
|
||||
if (!(resourceType.isAssignableFrom(fieldType) || fieldType.isAssignableFrom(resourceType))) {
|
||||
throw new IllegalStateException("Specified field type [" + fieldType +
|
||||
"] is incompatible with resource type [" + resourceType.getName() + "]");
|
||||
}
|
||||
}
|
||||
else {
|
||||
Class paramType =
|
||||
Class<?> paramType =
|
||||
(this.pd != null ? this.pd.getPropertyType() : ((Method) this.member).getParameterTypes()[0]);
|
||||
if (!(resourceType.isAssignableFrom(paramType) || paramType.isAssignableFrom(resourceType))) {
|
||||
throw new IllegalStateException("Specified parameter type [" + paramType +
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -44,7 +44,7 @@ public class DependencyDescriptor implements Serializable {
|
||||
|
||||
private transient Field field;
|
||||
|
||||
private Class declaringClass;
|
||||
private Class<?> declaringClass;
|
||||
|
||||
private String methodName;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user