Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed Jul 29, 2010
1 parent 776f501 commit 78c3824
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions impl/src/main/java/org/jboss/weld/util/reflection/Reflections.java
Expand Up @@ -41,8 +41,6 @@
import org.slf4j.cal10n.LocLogger;
import org.slf4j.ext.XLogger;

import ch.qos.cal10n.IMessageConveyor;

/**
* Utility class for static reflection-type operations
*
Expand All @@ -55,9 +53,6 @@ public class Reflections
static final LocLogger log = loggerFactory().getLogger(UTIL);
static final XLogger xLog = loggerFactory().getXLogger(UTIL);

// Exception messages
private static final IMessageConveyor messageConveyer = loggerFactory().getMessageConveyor();

public static final Type[] EMPTY_TYPES = {};
public static final Annotation[] EMPTY_ANNOTATIONS = {};
public static final Class<?>[] EMPTY_CLASSES = new Class<?>[0];
Expand Down Expand Up @@ -391,7 +386,7 @@ public static boolean isAssignableFrom(Type type1, Type[] types2)

public static boolean isAssignableFrom(Type type1, Type type2)
{
if (type1 instanceof Class)
if (type1 instanceof Class<?>)
{
Class<?> clazz = (Class<?>) type1;
if (isAssignableFrom(clazz, EMPTY_TYPES, type2))
Expand All @@ -402,7 +397,7 @@ public static boolean isAssignableFrom(Type type1, Type type2)
if (type1 instanceof ParameterizedType)
{
ParameterizedType parameterizedType1 = (ParameterizedType) type1;
if (parameterizedType1.getRawType() instanceof Class)
if (parameterizedType1.getRawType() instanceof Class<?>)
{
if (isAssignableFrom((Class<?>) parameterizedType1.getRawType(), parameterizedType1.getActualTypeArguments(), type2))
{
Expand Down Expand Up @@ -458,7 +453,7 @@ public static boolean matches(Type type1, Type type2)
if (type1 instanceof ParameterizedType)
{
ParameterizedType parameterizedType1 = (ParameterizedType) type1;
if (parameterizedType1.getRawType() instanceof Class)
if (parameterizedType1.getRawType() instanceof Class<?>)
{
if (matches((Class<?>) parameterizedType1.getRawType(), parameterizedType1.getActualTypeArguments(), type2))
{
Expand Down Expand Up @@ -525,25 +520,25 @@ public static boolean isAssignableFrom(Class<?> rawType1, Type[] actualTypeArgum
if (type2 instanceof ParameterizedType)
{
ParameterizedType parameterizedType = (ParameterizedType) type2;
if (parameterizedType.getRawType() instanceof Class)
if (parameterizedType.getRawType() instanceof Class<?>)
{
if (isAssignableFrom(rawType1, actualTypeArguments1, (Class<?>) parameterizedType.getRawType(), parameterizedType.getActualTypeArguments()))
{
return true;
}
}
}
else if (type2 instanceof Class)
else if (type2 instanceof Class<?>)
{
Class<?> clazz = (Class<?>) type2;
if (isAssignableFrom(rawType1, actualTypeArguments1, clazz, EMPTY_TYPES))
{
return true;
}
}
else if (type2 instanceof TypeVariable)
else if (type2 instanceof TypeVariable<?>)
{
TypeVariable typeVariable = (TypeVariable) type2;
TypeVariable<?> typeVariable = (TypeVariable<?>) type2;
if (isTypeBounded(rawType1, actualTypeArguments1, typeVariable.getBounds()))
{
return true;
Expand Down

0 comments on commit 78c3824

Please sign in to comment.