Skip to content

Commit

Permalink
Fix checkstyle issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskleeh committed Aug 1, 2018
1 parent 653c244 commit cf038fd
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import org.codehaus.groovy.ast.MethodNode;
import org.codehaus.groovy.ast.Parameter;

import java.util.Objects;

/**
* This class was created to pass to the {@link io.micronaut.ast.groovy.annotation.GroovyAnnotationMetadataBuilder} because
* the method node the parameter belongs to is not available from the {@link org.codehaus.groovy.ast.Parameter} class
Expand All @@ -14,11 +16,15 @@
* @since 1.0
*/
@Internal
public class ExtendedParameter extends AnnotatedNode {
public final class ExtendedParameter extends AnnotatedNode {

private final MethodNode methodNode;
private final Parameter parameter;

/**
* @param methodNode The method node that contains the parameter
* @param parameter The parameter
*/
public ExtendedParameter(MethodNode methodNode, Parameter parameter) {
this.methodNode = methodNode;
this.parameter = parameter;
Expand All @@ -28,14 +34,25 @@ public ExtendedParameter(MethodNode methodNode, Parameter parameter) {
this.setHasNoRealSourcePosition(parameter.hasNoRealSourcePosition());
}

/**
* @return The method node that contains the parameter
*/
public MethodNode getMethodNode() {
return methodNode;
}

/**
* @return The parameter
*/
public Parameter getParameter() {
return parameter;
}

@Override
public int hashCode() {
return parameter.hashCode();
}

@Override
public boolean equals(Object o) {
return (o instanceof ExtendedParameter) &&
Expand Down

0 comments on commit cf038fd

Please sign in to comment.