Skip to content

Commit

Permalink
correct javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepSnowNeeL committed Aug 24, 2016
1 parent 650de78 commit 034162a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.util.List;

import com.github.javaparser.ast.Node;
import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration;
import com.github.javaparser.ast.type.ClassOrInterfaceType;

public interface NodeWithExtends<T> {
Expand All @@ -12,21 +11,21 @@ public interface NodeWithExtends<T> {
public T setExtends(final List<ClassOrInterfaceType> extendsList);

/**
* Add an extends to this class or interface and automatically add the import
* Add an extends to this and automatically add the import
*
* @param clazz the class to extand from
* @return this, the {@link ClassOrInterfaceDeclaration}
* @return this
*/
public default T addExtends(Class<?> clazz) {
((Node) this).tryAddImportToParentCompilationUnit(clazz);
return addExtends(clazz.getSimpleName());
}

/**
* Add an extends to this class or interface
* Add an extends to this
*
* @param name the name of the type to extends from
* @return this, the {@link ClassOrInterfaceDeclaration}
* @return this
*/
@SuppressWarnings("unchecked")
public default T addExtends(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.util.List;

import com.github.javaparser.ast.Node;
import com.github.javaparser.ast.body.EnumDeclaration;
import com.github.javaparser.ast.type.ClassOrInterfaceType;

public interface NodeWithImplements<T> {
Expand All @@ -15,7 +14,7 @@ public interface NodeWithImplements<T> {
* Add an implements to this
*
* @param name the name of the type to extends from
* @return this, the {@link EnumDeclaration}
* @return this
*/
@SuppressWarnings("unchecked")
public default T addImplements(String name) {
Expand All @@ -29,7 +28,7 @@ public default T addImplements(String name) {
* Add an implements to this and automatically add the import
*
* @param clazz the type to implements from
* @return this, the {@link EnumDeclaration}
* @return this
*/
public default T addImplements(Class<?> clazz) {
((Node) this).tryAddImportToParentCompilationUnit(clazz);
Expand Down

0 comments on commit 034162a

Please sign in to comment.