public class Identifier extends java.lang.Object implements java.lang.Comparable<Identifier>
| Modifier | Constructor and Description |
|---|---|
protected |
Identifier(java.lang.String text)
Constructs an unquoted identifier instance.
|
|
Identifier(java.lang.String text,
boolean quoted)
Constructs an identifier instance.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
areEqual(Identifier id1,
Identifier id2) |
int |
compareTo(Identifier o) |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getCanonicalName() |
java.lang.String |
getText()
Get the identifiers name (text)
|
int |
hashCode() |
boolean |
isQuoted()
Is this a quoted identifier>
|
static boolean |
isQuoted(java.lang.String name)
Is the given identifier text considered quoted.
|
static Identifier |
quote(Identifier identifier) |
java.lang.String |
render() |
java.lang.String |
render(Dialect dialect)
If this is a quoted identifier, then return the identifier name
enclosed in dialect-specific open- and end-quotes; otherwise,
simply return the unquoted identifier.
|
static Identifier |
toIdentifier(java.lang.String text)
Means to generate an
Identifier instance from its simple text form. |
static Identifier |
toIdentifier(java.lang.String text,
boolean quote)
Means to generate an
Identifier instance from its simple text form. |
java.lang.String |
toString() |
public Identifier(java.lang.String text,
boolean quoted)
text - The identifier text.quoted - Is this a quoted identifier?protected Identifier(java.lang.String text)
text - The identifier text.public static Identifier toIdentifier(java.lang.String text)
Identifier instance from its simple text form.
If passed text is null, null is returned.
If passed text is surrounded in quote markers, the generated Identifier
is considered quoted. Quote markers include back-ticks (`), and
double-quotes (").text - The text formnull if text was nullpublic static Identifier toIdentifier(java.lang.String text, boolean quote)
Identifier instance from its simple text form.
If passed text is null, null is returned.
If passed text is surrounded in quote markers, the generated Identifier
is considered quoted. Quote markers include back-ticks (`), and
double-quotes (").text - The text formquote - Whether to quote unquoted text formsnull if text was nullpublic static boolean isQuoted(java.lang.String name)
`name`[name]"name"name - public java.lang.String getText()
public boolean isQuoted()
public java.lang.String render(Dialect dialect)
dialect - The dialect whose dialect-specific quoting should be used.public java.lang.String render()
public java.lang.String getCanonicalName()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic static boolean areEqual(Identifier id1, Identifier id2)
public static Identifier quote(Identifier identifier)
public int compareTo(Identifier o)
compareTo in interface java.lang.Comparable<Identifier>Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.