1 package com.github.javaparser.ast.nodeTypes.modifiers; 2 3 import com.github.javaparser.ast.Node; 4 import com.github.javaparser.ast.nodeTypes.NodeWithModifiers; 5 6 import static com.github.javaparser.ast.Modifier.Keyword.PUBLIC; 7 8 /** 9 * A node that can be public. 10 */ 11 public interface NodeWithPublicModifier<N extends Node> extends NodeWithModifiers<N> { isPublic()12 default boolean isPublic() { 13 return hasModifier(PUBLIC); 14 } 15 16 @SuppressWarnings("unchecked") setPublic(boolean set)17 default N setPublic(boolean set) { 18 return setModifier(PUBLIC, set); 19 } 20 21 } 22