Skip to content

Commit

Permalink
Fix generics on CallableDeclaration
Browse files Browse the repository at this point in the history
  • Loading branch information
matozoid committed Apr 23, 2017
1 parent c9f2a4f commit 38362bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -27,8 +27,8 @@
import com.github.javaparser.ast.NodeList;
import com.github.javaparser.ast.expr.AnnotationExpr;
import com.github.javaparser.ast.expr.SimpleName;
import com.github.javaparser.ast.nodeTypes.NodeWithAnnotations;
import com.github.javaparser.ast.nodeTypes.NodeWithTypeArguments;
import com.github.javaparser.ast.nodeTypes.*;
import com.github.javaparser.ast.nodeTypes.modifiers.*;
import com.github.javaparser.ast.observer.ObservableProperty;
import com.github.javaparser.ast.type.ArrayType;
import com.github.javaparser.ast.type.ReferenceType;
Expand All @@ -48,7 +48,7 @@
/**
* Represents a declaration which is callable eg. a method or a constructor.
*/
public abstract class CallableDeclaration<T extends Node> extends BodyDeclaration<T> {
public abstract class CallableDeclaration<T extends Node> extends BodyDeclaration<T> implements NodeWithAccessModifiers<T>, NodeWithDeclaration, NodeWithSimpleName<T>, NodeWithParameters<T>, NodeWithThrownExceptions<T>, NodeWithTypeParameters<T>, NodeWithJavadoc<T>, NodeWithAbstractModifier<T>, NodeWithStaticModifier<T>, NodeWithFinalModifier<T>, NodeWithStrictfpModifier<T> {

private EnumSet<Modifier> modifiers;

Expand Down
Expand Up @@ -181,8 +181,8 @@ public boolean isTopLevelType() {
/**
* @return methods or constructors whose signature match the passed signature.
*/
public List<CallableDeclaration> getCallablesWithSignature(CallableDeclaration.Signature signature) {
return getMembers().stream().filter(m -> m instanceof CallableDeclaration).map(m -> ((CallableDeclaration) m)).filter(m -> m.getSignature().equals(signature)).collect(toList());
public List<CallableDeclaration<?>> getCallablesWithSignature(CallableDeclaration.Signature signature) {
return getMembers().stream().filter(m -> m instanceof CallableDeclaration).map(m -> ((CallableDeclaration<?>) m)).filter(m -> m.getSignature().equals(signature)).collect(toList());
}

/**
Expand Down

0 comments on commit 38362bb

Please sign in to comment.