FieldNode extends VariableNode implements IField { public boolean isPublic() { return is( Modifier.PUBLIC ); } protected  FieldNode( final IParserNode rootNode ); @Override FieldNode compute(); IParserNode getAsDoc(); boolean isPublic(); boolean isStatic();  }
@Test public void testVisibility() throws PMDException { assertTrue( first.is( Modifier.PRIVATE ) ); assertFalse( first.isPublic() ); assertFalse( first.is( Modifier.PROTECTED ) ); assertTrue( second.is( Modifier.PROTECTED ) ); assertFalse( second.isPublic() ); assertFalse( second.is( Modifier.PRIVATE ) ); assertTrue( third.isPublic() ); assertFalse( third.is( Modifier.PROTECTED ) ); assertFalse( third.is( Modifier.PRIVATE ) ); }