- Revision
- 1301
- Author
- rfscholte
- Date
- 2011-08-21 05:34:20 -0500 (Sun, 21 Aug 2011)
Log Message
Push AbstractBaseMethod.typeParameters down to be able to give generics the right type
Modified Paths
Diff
Modified: trunk/qdox/src/main/java/com/thoughtworks/qdox/model/AbstractBaseMethod.java (1300 => 1301)
--- trunk/qdox/src/main/java/com/thoughtworks/qdox/model/AbstractBaseMethod.java 2011-08-20 15:57:37 UTC (rev 1300) +++ trunk/qdox/src/main/java/com/thoughtworks/qdox/model/AbstractBaseMethod.java 2011-08-21 10:34:20 UTC (rev 1301) @@ -14,7 +14,6 @@ extends AbstractInheritableJavaEntity { - private List<TypeVariable<?>> typeParameters = Collections.emptyList(); private List<JavaParameter> parameters = Collections.emptyList(); private List<Type> exceptions = Collections.emptyList(); private boolean varArgs; @@ -111,16 +110,6 @@ return result; } - public void setTypeParameters( List<TypeVariable<?>> typeParameters ) - { - this.typeParameters = typeParameters; - } - - public List<TypeVariable<?>> getTypeParameters() - { - return typeParameters; - } - public List<Type> getParameterTypes() { return getParameterTypes( false );
Modified: trunk/qdox/src/main/java/com/thoughtworks/qdox/model/DefaultJavaConstructor.java (1300 => 1301)
--- trunk/qdox/src/main/java/com/thoughtworks/qdox/model/DefaultJavaConstructor.java 2011-08-20 15:57:37 UTC (rev 1300) +++ trunk/qdox/src/main/java/com/thoughtworks/qdox/model/DefaultJavaConstructor.java 2011-08-21 10:34:20 UTC (rev 1301) @@ -1,5 +1,6 @@ package com.thoughtworks.qdox.model; +import java.util.Collections; import java.util.Iterator; import java.util.List; @@ -11,9 +12,19 @@ public class DefaultJavaConstructor extends AbstractBaseMethod implements JavaConstructor { + + private List<TypeVariable<?>> typeParameters = Collections.emptyList(); + + public void setTypeParameters( List<TypeVariable<?>> typeParameters ) + { + this.typeParameters = typeParameters; + } + + public List<TypeVariable<?>> getTypeParameters() + { + return typeParameters; + } - - public boolean signatureMatches( List<Type> parameterTypes ) { return signatureMatches( parameterTypes, false );
Modified: trunk/qdox/src/main/java/com/thoughtworks/qdox/model/DefaultJavaMethod.java (1300 => 1301)
--- trunk/qdox/src/main/java/com/thoughtworks/qdox/model/DefaultJavaMethod.java 2011-08-20 15:57:37 UTC (rev 1300) +++ trunk/qdox/src/main/java/com/thoughtworks/qdox/model/DefaultJavaMethod.java 2011-08-21 10:34:20 UTC (rev 1301) @@ -20,6 +20,7 @@ */ import java.beans.Introspector; +import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.ListIterator; @@ -27,6 +28,7 @@ public class DefaultJavaMethod extends AbstractBaseMethod implements JavaMethod { private Type returns = Type.VOID; + private List<TypeVariable<?>> typeParameters = Collections.emptyList(); /** * The default constructor @@ -60,7 +62,17 @@ public Type getReturns() { return returns; } + + public void setTypeParameters( List<TypeVariable<?>> typeParameters ) + { + this.typeParameters = typeParameters; + } + public List<TypeVariable<?>> getTypeParameters() + { + return typeParameters; + } + /* (non-Javadoc) * @see com.thoughtworks.qdox.model.JavaMethod#getCodeBlock() */ @@ -399,5 +411,4 @@ } return signatureMatches( parameterTypes, varArg ); } - }
To unsubscribe from this list please visit:
