public class

OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml

extends Object
implements SafeHtml
java.lang.Object
   ↳ com.google.gwt.safehtml.shared.OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml

Class Overview

A string wrapped as an object of type SafeHtml.

This class is intended only for use in generated code where the code generator guarantees that instances of this type will adhere to the SafeHtml contract (hence the purposely unwieldy class name).

Summary

Public Constructors
OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml(String html)
Constructs an instance from a given HTML String.
Public Methods
String asString()
Returns this object's contained HTML as a string.
boolean equals(Object obj)
Compares this string to the specified object.
int hashCode()
Returns a hash code for this string.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.google.gwt.safehtml.shared.SafeHtml

Public Constructors

public OnlyToBeUsedInGeneratedCodeStringBlessedAsSafeHtml (String html)

Constructs an instance from a given HTML String.

Parameters
html an HTML String that is assumed to be safe

Public Methods

public String asString ()

Returns this object's contained HTML as a string.

Based on this class' contract, the returned value will be non-null and a string that is safe to use in an HTML context.

Returns
  • the contents as a String

public boolean equals (Object obj)

Compares this string to the specified object.

public int hashCode ()

Returns a hash code for this string.