types/src/main/java/com/google/common/html/types/SafeStyleSheets.java
public static SafeStyleSheet fromConstant(@CompileTimeConstant final String styleSheet) {
    if (styleSheet.length() == 0) {
      return SafeStyleSheet.EMPTY;
    }
    for (int i = 0; i < styleSheet.length(); i++) {
      if (styleSheet.charAt(i) == '<') {
        throw new IllegalArgumentException(
            "Forbidden '<' character in style sheet string: " + styleSheet);
      }
    }
    return create(styleSheet);
  }
public static SafeStyleSheet fromConstant(@CompileTimeConstant final String styleSheet) {
    if (styleSheet.length() == 0) {
      return SafeStyleSheet.EMPTY;
    }
    for (int i = 0; i < styleSheet.length(); i++) {
      if (styleSheet.charAt(i) == '<') {
        throw new IllegalArgumentException(
            "Forbidden '<' character in style sheet string: " + styleSheet);
      }
    }
    return create(styleSheet);
  }
public static SafeStyleSheet fromConstant ( @ CompileTimeConstant final String styleSheet ) { if ( styleSheet . length ( ) == 0 ) { return SafeStyleSheet . EMPTY ; } for ( int i = 0 ; i < styleSheet . length ( ) ; i ++ ) { if ( styleSheet . charAt ( i ) == ' ' ) { throw new IllegalArgumentException ( "Forbidden '<' character in style sheet string: " + styleSheet ) ; } } return create ( styleSheet ) ; }
Creates a SafeStyleSheet from the given compile-time constant string {@code style}.

<p>{@code styleSheet} must not have any &lt; characters in it so that the syntactic
structure of any surrounding CSS and HTML is not affected.

@throws IllegalArgumentException if {@code styleSheet} contains &lt;
Creates a SafeStyleSheet from the given compile - time constant string { @code style } .