Skip to content

Commit

Permalink
Tidy up type parameters
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@248 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
pmuir committed Nov 5, 2008
1 parent 0fceaf5 commit e25c065
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
Expand Up @@ -13,7 +13,7 @@ public class InjectableParameter<T> extends Injectable<T, Object>

protected InjectableParameter() {}

public InjectableParameter(Annotation[] bindingTypes, Class<? extends T> type)
public InjectableParameter(Annotation[] bindingTypes, Class<T> type)
{
super(new SimpleAnnotatedParameter<T>(bindingTypes, type));
}
Expand All @@ -23,7 +23,7 @@ public InjectableParameter(AnnotatedParameter<T> annotatedParameter)
super(annotatedParameter);
}

public InjectableParameter(Class<? extends T> type)
public InjectableParameter(Class<T> type)
{
this(currentBinding, type);
}
Expand Down
Expand Up @@ -51,7 +51,7 @@ public boolean isAnnotationPresent(

public S getDelegate();

public Class<? extends T> getType();
public Class<T> getType();

public boolean isAssignableFrom(AnnotatedItem<?, ?> that);

Expand Down
Expand Up @@ -45,7 +45,7 @@ public Class<T> getDelegate()
return clazz;
}

public Class<? extends T> getType()
public Class<T> getType()
{
return clazz;
}
Expand Down
Expand Up @@ -64,13 +64,13 @@ private void initParameters()
if (constructor.getParameterAnnotations()[i].length > 0)
{
Class<? extends Object> clazz = constructor.getParameterTypes()[i];
AnnotatedParameter<Object> parameter = new SimpleAnnotatedParameter<Object>(constructor.getParameterAnnotations()[i], clazz);
AnnotatedParameter<Object> parameter = new SimpleAnnotatedParameter<Object>(constructor.getParameterAnnotations()[i], (Class<Object>) clazz);
parameters.add(parameter);
}
else
{
Class<? extends Object> clazz = constructor.getParameterTypes()[i];
AnnotatedParameter<Object> parameter = new SimpleAnnotatedParameter<Object>(new Annotation[0], clazz);
AnnotatedParameter<Object> parameter = new SimpleAnnotatedParameter<Object>(new Annotation[0], (Class<Object>) clazz);
parameters.add(parameter);
}
}
Expand Down
Expand Up @@ -11,21 +11,21 @@ public class SimpleAnnotatedItem<T, S> extends AbstractAnnotatedItem<T, S>
{

private Type[] actualTypeArguments = new Type[0];
private Class<? extends T> type;
private Class<T> type;
private Annotation[] actualAnnotations;

private SimpleAnnotatedItem(Map<Class<? extends Annotation>, Annotation> annotationMap)
{
super(annotationMap);
}

private SimpleAnnotatedItem(Map<Class<? extends Annotation>, Annotation> annotationMap, Class<? extends T> type)
private SimpleAnnotatedItem(Map<Class<? extends Annotation>, Annotation> annotationMap, Class<T> type)
{
super(annotationMap);
this.type = type;
}

private SimpleAnnotatedItem(Map<Class<? extends Annotation>, Annotation> annotationMap, TypeLiteral<? extends T> apiType)
private SimpleAnnotatedItem(Map<Class<? extends Annotation>, Annotation> annotationMap, TypeLiteral<T> apiType)
{
super(annotationMap);
this.type = apiType.getRawType();
Expand All @@ -35,7 +35,7 @@ private SimpleAnnotatedItem(Map<Class<? extends Annotation>, Annotation> annotat
}
}

private SimpleAnnotatedItem(Map<Class<? extends Annotation>, Annotation> annotationMap, Class<? extends T> type, Type[] actualTypeArguments)
private SimpleAnnotatedItem(Map<Class<? extends Annotation>, Annotation> annotationMap, Class<T> type, Type[] actualTypeArguments)
{
this(annotationMap, type);
this.actualTypeArguments = actualTypeArguments;
Expand All @@ -47,19 +47,19 @@ public SimpleAnnotatedItem(Annotation[] annotations)
this.actualAnnotations = annotations;
}

public SimpleAnnotatedItem(Annotation[] annotations, Class<? extends T> type)
public SimpleAnnotatedItem(Annotation[] annotations, Class<T> type)
{
this(buildAnnotationMap(annotations), type);
this.actualAnnotations = annotations;
}

public SimpleAnnotatedItem(Annotation[] annotations, TypeLiteral<? extends T> apiType)
public SimpleAnnotatedItem(Annotation[] annotations, TypeLiteral<T> apiType)
{
this(buildAnnotationMap(annotations), apiType);
this.actualAnnotations = annotations;
}

public SimpleAnnotatedItem(Annotation[] annotations, Class<? extends T> type, Type[] actualTypeArguments)
public SimpleAnnotatedItem(Annotation[] annotations, Class<T> type, Type[] actualTypeArguments)
{
this(buildAnnotationMap(annotations), type, actualTypeArguments);
this.actualAnnotations = annotations;
Expand All @@ -70,7 +70,7 @@ public S getDelegate()
return null;
}

public Class<? extends T> getType()
public Class<T> getType()
{
return type;
}
Expand Down
Expand Up @@ -64,13 +64,13 @@ private void initParameters()
if (method.getParameterAnnotations()[i].length > 0)
{
Class<? extends Object> clazz = method.getParameterTypes()[i];
AnnotatedParameter<Object> parameter = new SimpleAnnotatedParameter<Object>(method.getParameterAnnotations()[i], clazz);
AnnotatedParameter<Object> parameter = new SimpleAnnotatedParameter<Object>(method.getParameterAnnotations()[i], (Class<Object>) clazz);
parameters.add(parameter);
}
else
{
Class<? extends Object> clazz = method.getParameterTypes()[i];
AnnotatedParameter<Object> parameter = new SimpleAnnotatedParameter<Object>(new Annotation[0], clazz);
AnnotatedParameter<Object> parameter = new SimpleAnnotatedParameter<Object>(new Annotation[0], (Class<Object>) clazz);
parameters.add(parameter);
}
}
Expand Down
Expand Up @@ -8,12 +8,12 @@
public class SimpleAnnotatedParameter<T> extends AbstractAnnotatedItem<T, Object> implements AnnotatedParameter<T>
{

private Class<? extends T> type;
private Class<T> type;
private Type[] actualTypeArguments = new Type[0];
private boolean _final;
private boolean _static;

public SimpleAnnotatedParameter(Annotation[] annotations, Class<? extends T> type)
public SimpleAnnotatedParameter(Annotation[] annotations, Class<T> type)
{
super(buildAnnotationMap(annotations));
this.type = type;
Expand All @@ -29,7 +29,7 @@ public Object getDelegate()
return null;
}

public Class<? extends T> getType()
public Class<T> getType()
{
return type;
}
Expand Down

0 comments on commit e25c065

Please sign in to comment.