1 /*xml 2 <module name="Checker"> 3 <module name="TreeWalker"> 4 <module name="InterfaceMemberImpliedModifier"/> 5 </module> 6 </module> 7 */ 8 package com.puppycrawl.tools.checkstyle.checks.modifier.interfacememberimpliedmodifier; 9 10 import java.util.List; 11 12 // xdoc section -- start 13 public interface Example1 { 14 15 public static final String UNKNOWN = "Unknown"; 16 String OTHER = "Other"; 17 // 3 violations above: 18 // 'Implied modifier 'final' should be explicit' 19 // 'Implied modifier 'public' should be explicit' 20 // 'Implied modifier 'static' should be explicit' 21 public static Example1 instance() { return null; } 22 23 public abstract Address createAddress(String addressLine, String city); 24 List<Address> findAddresses(String city); 25 // 2 violations above: 26 // 'Implied modifier 'abstract' should be explicit' 27 // 'Implied modifier 'public' should be explicit' 28 interface Address { 29 // 2 violations above: 30 // 'Implied modifier 'public' should be explicit' 31 // 'Implied modifier 'static' should be explicit' 32 String getCity(); 33 // 2 violations above: 34 // 'Implied modifier 'abstract' should be explicit' 35 // 'Implied modifier 'public' should be explicit' 36 } 37 } 38 // xdoc section -- end