View Javadoc
1   /*
2   ParenPad
3   option = (default)nospace
4   tokens = LITERAL_SYNCHRONIZED, CTOR_DEF, CTOR_CALL, LITERAL_IF
5   
6   
7   */
8   
9   package com.puppycrawl.tools.checkstyle.checks.whitespace.parenpad;
10  
11  class InputParenPadForSynchronized {
12  
13      private static InputParenPadForSynchronized instance = null;
14      private InputParenPadForSynchronized() {
15      }
16  
17      public synchronized static InputParenPadForSynchronized getInstance() {
18          if(instance == null ) { // violation
19              instance = new InputParenPadForSynchronized();
20          }
21          return instance;
22      }
23  }