BeanReferenceInspectable
, Replicable
public class Token extends java.lang.Object implements BeanReferenceInspectable, Replicable
The following symbols are used to distinguish the providers of values:
Refers to a bean specified by the Bean Registry.
ex)Refers to a string formatted from the Template Rule Registry.
ex)Refers to a parameter value.
ex)Refers to an attribute value.
ex)Refers to a property from the specified Properties file or environment variables.
ex)Created: 2008. 03. 27 PM 10:20:06
Constructor | Description |
---|---|
Token(TokenType type,
TokenDirectiveType directiveType,
java.lang.String value) |
Instantiates a new Token.
|
Token(TokenType type,
java.lang.String name) |
Instantiates a new Token.
|
Token(java.lang.String defaultValue) |
Instantiates a new Token.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object token) |
|
java.lang.Object |
getAlternativeValue() |
Gets the alternative value.
|
BeanRefererType |
getBeanRefererType() |
|
java.lang.String |
getDefaultValue() |
Gets the default value.
|
TokenDirectiveType |
getDirectiveType() |
Gets the token directive type.
|
java.lang.String |
getGetterName() |
Gets the name of the property whose value is to be retrieved.
|
java.lang.String |
getName() |
Gets the token name.
|
TokenType |
getType() |
Gets the token type.
|
java.lang.String |
getValue() |
Returns the class name of the bean or the classpath of the Properties file,
depending on the type of token.
|
int |
hashCode() |
|
static boolean |
isTokenSymbol(char c) |
Returns whether a specified character is the token symbol.
|
Token |
replicate() |
Creates and returns a new instance after replicating a rule or Object.
|
static TokenType |
resolveTypeAsSymbol(char symbol) |
Returns the token type for the specified character.
|
void |
setAlternativeValue(java.lang.Object value) |
Sets the alternative value.
|
void |
setDefaultValue(java.lang.String defaultValue) |
Sets the default value.
|
void |
setGetterName(java.lang.String getterName) |
Sets the name of the property whose value is to be retrieved.
|
void |
setValue(java.lang.String value) |
Sets the class name of the bean or the classpath of the Properties file,
depending on the type of the token.
|
java.lang.String |
stringify() |
Convert a Token object into a string.
|
java.lang.String |
toString() |
public Token(java.lang.String defaultValue)
defaultValue
- the default valuepublic Token(TokenType type, java.lang.String name)
type
- the token typename
- the token namepublic Token(TokenType type, TokenDirectiveType directiveType, java.lang.String value)
type
- the token typedirectiveType
- the token directive typevalue
- the token valuepublic TokenType getType()
public TokenDirectiveType getDirectiveType()
TokenDirectiveType
public java.lang.String getName()
public java.lang.String getValue()
public void setValue(java.lang.String value)
value
- the class name of the bean or the classpath of the Properties filepublic java.lang.String getGetterName()
public java.lang.Object getAlternativeValue()
public void setAlternativeValue(java.lang.Object value)
value
- the new alternative valuepublic void setGetterName(java.lang.String getterName)
getterName
- the name of the property whose value is to be retrievedpublic java.lang.String getDefaultValue()
public void setDefaultValue(java.lang.String defaultValue)
defaultValue
- the new default valuepublic BeanRefererType getBeanRefererType()
getBeanRefererType
in interface BeanReferenceInspectable
public java.lang.String stringify()
public boolean equals(java.lang.Object token)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Token replicate()
Replicable
replicate
in interface Replicable
public java.lang.String toString()
toString
in class java.lang.Object
public static boolean isTokenSymbol(char c)
c
- a characterpublic static TokenType resolveTypeAsSymbol(char symbol)
symbol
- the token symbol characterCopyright © 2008–2018 The Aspectran Project. All rights reserved.