public class NamedLocationIdentity extends LocationIdentity implements Kind.FormatWithToString
LocationIdentity with a name.| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
NamedLocationIdentity.DB
Map for asserting all
NamedLocationIdentity instances have a unique name. |
| Modifier and Type | Field and Description |
|---|---|
static LocationIdentity |
ARRAY_LENGTH_LOCATION
Denotes the location of the length field of a Java array.
|
private static EnumMap<Kind,LocationIdentity> |
ARRAY_LOCATIONS |
static LocationIdentity |
FINAL_LOCATION
Denotes the location of a value that is guaranteed to be unchanging.
|
private boolean |
immutable |
private String |
name |
ANY_LOCATION| Modifier | Constructor and Description |
|---|---|
protected |
NamedLocationIdentity(String name,
boolean immutable) |
| Modifier and Type | Method and Description |
|---|---|
static LocationIdentity |
any() |
private static NamedLocationIdentity |
create(String name,
boolean immutable)
Creates a named unique location identity for read and write operations.
|
static LocationIdentity |
getArrayLocation(Kind elementKind)
Returns the named location identity for an array of the given element kind.
|
static NamedLocationIdentity |
immutable(String name)
Creates a named unique location identity for read operations against immutable memory.
|
private static EnumMap<Kind,LocationIdentity> |
initArrayLocations() |
boolean |
isImmutable()
Denotes a location is unchanging in all cases.
|
static NamedLocationIdentity |
mutable(String name)
Creates a named unique location identity for read and write operations against mutable
memory.
|
String |
toString() |
isAny, isMutable, isSingle, overlapspublic static final LocationIdentity FINAL_LOCATION
public static final LocationIdentity ARRAY_LENGTH_LOCATION
private final boolean immutable
private static final EnumMap<Kind,LocationIdentity> ARRAY_LOCATIONS
protected NamedLocationIdentity(String name, boolean immutable)
public static LocationIdentity any()
public static NamedLocationIdentity mutable(String name)
name - the name of the new location identitypublic static NamedLocationIdentity immutable(String name)
name - the name of the new location identityprivate static NamedLocationIdentity create(String name, boolean immutable)
name - the name of the new location identityimmutable - true if the location is immutablepublic boolean isImmutable()
LocationIdentityisImmutable in class LocationIdentitypublic static LocationIdentity getArrayLocation(Kind elementKind)
private static EnumMap<Kind,LocationIdentity> initArrayLocations()