Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

oracle.apps.fnd.applcore.flex.runtime.util.common
Class PortableExpression

java.lang.Object
  extended by oracle.apps.fnd.applcore.flex.runtime.util.common.PortableExpression
Direct Known Subclasses:
PortableViewAttrExpression

public class PortableExpression
extends java.lang.Object

A portable expression where one token can be subtituted in the expression. The token can appear in the expression more than once but a portable expression can only perform subtitution for one token.


Constructor Summary
protected PortableExpression(java.lang.String expr)
          Constructs a portable expression that does not require token subtitution.
protected PortableExpression(java.lang.String token, java.lang.String encodedExpr)
          Constructs a portable expression that requires token subtitution.
 
Method Summary
static java.lang.String getClassName(java.lang.String s)
          Gets the class name in a String returned by toString().
 java.lang.String getExpression()
          Gets the decoded expression.
 java.lang.String getExpression(java.lang.String tokenReplacement)
          Gets the expression where the original token is replaced by a replacement.
 java.lang.String getToken()
          Gets the raw token.
 java.lang.String toString()
          Returns a String representation of this object.
static PortableExpression valueOf(java.lang.String s)
          Constructs a PortableExpression from a String returned by the toString() method of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PortableExpression

protected PortableExpression(java.lang.String token,
                             java.lang.String encodedExpr)
Constructs a portable expression that requires token subtitution.

Parameters:
token - the raw token used in the expression
encodedExpr - the expression that contains the encoded token
Throws:
java.lang.IllegalArgumentException - if the given token or expression is null
See Also:
encodeToken(java.lang.String)

PortableExpression

protected PortableExpression(java.lang.String expr)
Constructs a portable expression that does not require token subtitution.

Parameters:
expr - the expression
Throws:
java.lang.IllegalArgumentException - if the given expression is null
Method Detail

getToken

public final java.lang.String getToken()
Gets the raw token.

Returns:
the raw token; null if this portable expression does not require token subtitution

getExpression

public java.lang.String getExpression()
Gets the decoded expression.

Returns:
the decoded expression
See Also:
getExpression(String)

getExpression

public java.lang.String getExpression(java.lang.String tokenReplacement)
Gets the expression where the original token is replaced by a replacement.

Parameters:
tokenReplacement - the replacement
Returns:
the expression with the original token replaced
Throws:
java.lang.IllegalArgumentException - if the given token replacement is null

toString

public java.lang.String toString()
Returns a String representation of this object. The return String always starts with the value of this.getClass().getName() followed by "#" while the rest of the String may be subclass-specific.

Subclasses that override this method must always start the String with the full class name followed by "#".

Overrides:
toString in class java.lang.Object
Returns:
the String representation of this object
See Also:
valueOf(String)

getClassName

public static java.lang.String getClassName(java.lang.String s)
Gets the class name in a String returned by toString(). To check if a String is created by a certain subclass, calling java.lang.String#startsWith is sufficient, because a String representation of a PortableExpression object, if valid, must start with the full class name followed by "#".

Parameters:
s - a String representation of a PortableExpression object
Returns:
the class name; null if the given String is null or invalid

valueOf

public static PortableExpression valueOf(java.lang.String s)
Constructs a PortableExpression from a String returned by the toString() method of this class. A subclass must define its own valueOf(String) if it overrides toString().

Parameters:
s - the string representation of a PortableExpression object
Returns:
the PortableExpression object; null if the string is null or not valid

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 1 (11.1.1.6)

E22562-03

Copyright © 2012 Oracle. All Rights Reserved.