Skip to content

Commit

Permalink
Minor stuff
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@367 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
nickarls committed Nov 26, 2008
1 parent daafbde commit 77459fb
Show file tree
Hide file tree
Showing 6 changed files with 281 additions and 26 deletions.
273 changes: 268 additions & 5 deletions webbeans-ri/.settings/org.eclipse.jdt.core.prefs

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions webbeans-ri/.settings/org.eclipse.jdt.ui.prefs
@@ -1,5 +1,5 @@
#Tue Jun 24 10:21:10 BST 2008
eclipse.preferences.version=1
formatter_profile=_Web Beans
formatter_settings_version=11
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>
#Thu Nov 20 10:11:13 EET 2008
eclipse.preferences.version=1
formatter_profile=_WebBeans
formatter_settings_version=11
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>
Expand Up @@ -352,7 +352,7 @@ protected void initScopeType()
if (getAnnotatedItem().getMetaAnnotations(ScopeType.class).size() == 1)
{
this.scopeType = getAnnotatedItem().getMetaAnnotations(ScopeType.class).iterator().next().annotationType();
log.trace("Scope " + scopeType + " specified b annotation");
log.trace("Scope " + scopeType + " specified by annotation");
return;
}
}
Expand Down
Expand Up @@ -69,7 +69,7 @@ else if (type.isAnnotationPresent(STATEFUL_ANNOTATION))
for (AnnotatedMethod<Object> removeMethod : type.getAnnotatedMethods(REMOVE_ANNOTATION))
{
removeMethods.add(removeMethod);
if (removeMethod.getParameters().size() == 0)
if (removeMethod.getDelegate().getParameterTypes().length == 0)
{
noArgsRemoveMethods.add(removeMethod);
}
Expand Down
Expand Up @@ -92,15 +92,6 @@ protected static AnnotationMap buildAnnotationMap(Annotation[] annotations)
return annotationMap;
}

protected static Set<Annotation> populateAnnotationSet(Set<Annotation> annotationSet, AnnotationMap annotationMap)
{
for (Entry<Class<? extends Annotation>, Annotation> entry : annotationMap.entrySet())
{
annotationSet.add(entry.getValue());
}
return annotationSet;
}

protected static Object[] getParameterValues(List<AnnotatedParameter<Object>> parameters, ManagerImpl manager)
{
Object[] parameterValues = new Object[parameters.size()];
Expand Down Expand Up @@ -142,7 +133,8 @@ public Set<Annotation> getAnnotations()
{
if (annotationSet == null)
{
annotationSet = populateAnnotationSet(new HashSet<Annotation>(), annotationMap);
annotationSet = new HashSet<Annotation>();
annotationSet.addAll(annotationMap.values());
}
return annotationSet;
}
Expand All @@ -159,7 +151,7 @@ protected static <A extends Annotation> MetaAnnotationMap populateMetaAnnotation
Set<Annotation> s = new HashSet<Annotation>();
for (Entry<Class<? extends Annotation>, Annotation> entry : annotationMap.entrySet())
{
if (entry.getValue().annotationType().isAnnotationPresent(metaAnnotationType))
if (entry.getKey().isAnnotationPresent(metaAnnotationType))
{
s.add(entry.getValue());
}
Expand Down
Expand Up @@ -18,7 +18,7 @@
public class AnnotatedMethodImpl<T> extends AbstractAnnotatedMember<T, Method> implements AnnotatedMethod<T>
{

private Type[] actualTypeArgements = new Type[0];
private Type[] actualTypeArguments = new Type[0];

private Method method;

Expand All @@ -36,7 +36,7 @@ public AnnotatedMethodImpl(Method method, AnnotatedType<?> declaringClass)
this.declaringClass = declaringClass;
if (method.getGenericReturnType() instanceof ParameterizedType)
{
actualTypeArgements = ((ParameterizedType) method.getGenericReturnType()).getActualTypeArguments();
actualTypeArguments = ((ParameterizedType) method.getGenericReturnType()).getActualTypeArguments();
}
}

Expand All @@ -57,7 +57,7 @@ public Class<T> getType()

public Type[] getActualTypeArguments()
{
return actualTypeArgements;
return actualTypeArguments;
}

public List<AnnotatedParameter<Object>> getParameters()
Expand Down

0 comments on commit 77459fb

Please sign in to comment.