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.PROTECTED; 7 8 /** 9 * A node that can be protected. 10 */ 11 public interface NodeWithProtectedModifier<N extends Node> extends NodeWithModifiers<N> { isProtected()12 default boolean isProtected() { 13 return hasModifier(PROTECTED); 14 } 15 16 @SuppressWarnings("unchecked") setProtected(boolean set)17 default N setProtected(boolean set) { 18 return setModifier(PROTECTED, set); 19 } 20 } 21