Example

public interface ICommonParsingConstants {
public static final int IF_TOKEN = 1;
public static final int WHILE_TOKEN = 2;
public static final String END_OF_LINE = "\n"; //$NON-NLS-1$
}

public class Parser implements ICommonParsingConstants {
public void processToken( int iToken ) {
if ( iToken == IF_TOKEN ) {
System.out.println( "if" ); //$NON-NLS-1$
} else if ( iToken == WHILE_TOKEN ) {
System.out.println( "while" ); //$NON-NLS-1$
}
}
}

public class Tokenizer implements ICommonParsingConstants {
public String getToken( String str ) {
return ( END_OF_LINE.equals( str ) ? "" : str ); //$NON-NLS-1$
}
}

Solução
  1. Mova cada constante para a interface ou para a classe à qual ela pertence logicamente.
  2. Remova a interface vazia.

public class Parser {

public static final int IF_TOKEN = 1;
public static final int WHILE_TOKEN = 2;

public void processToken( int iToken ) {
if ( iToken == IF_TOKEN ) {
System.out.println( "if" ); //$NON-NLS-1$
} else if ( iToken == WHILE_TOKEN ) {
System.out.println( "while" ); //$NON-NLS-1$
}
}
}

public class Tokenizer {
public static final String END_OF_LINE = "\n"; //$NON-NLS-1$

public String getToken( String str ) {
return ( END_OF_LINE.equals( str ) ? "" : str ); //$NON-NLS-1$
}
}