Package com.squareup.javawriter

# Class StringLiteral

java.lang.Object
com.squareup.javawriter.StringLiteral

public final class StringLiteral extends Object
Represents a string literal as found in Java source code.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object obj)`
`static StringLiteral`
`forValue(String value)`
Returns a new `StringLiteral` instance for the intended value of the literal.
`int`
`hashCode()`
`String`
`literal()`
`String`
`toString()`
`String`
`value()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Method Details

### forValue

public static StringLiteral forValue(String value)
Returns a new `StringLiteral` instance for the intended value of the literal.

### value

public String value()

### literal

public String literal()

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`