Package ptolemy.data.expr
Class CachedMethod.TypeArgumentConversion
- java.lang.Object
-
- ptolemy.data.expr.CachedMethod.ArgumentConversion
-
- ptolemy.data.expr.CachedMethod.TypeArgumentConversion
-
- Enclosing class:
- CachedMethod
public static class CachedMethod.TypeArgumentConversion extends CachedMethod.ArgumentConversion
A class representing an argument conversion to another ptolemy type, followed by the given conversion. This conversion always has preference two.
-
-
Field Summary
-
Fields inherited from class ptolemy.data.expr.CachedMethod.ArgumentConversion
_preference
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
convert(Token input)
Convert the given token into an object that can be used to invoke a method through the reflection mechanism.boolean
isPreferableTo(CachedMethod.ArgumentConversion conversion)
Return true if this conversion is preferable to the given conversion.java.lang.String
toString()
Return a string representation of this conversion.-
Methods inherited from class ptolemy.data.expr.CachedMethod.ArgumentConversion
getPreference
-
-
-
-
Method Detail
-
convert
public java.lang.Object convert(Token input) throws IllegalActionException
Convert the given token into an object that can be used to invoke a method through the reflection mechanism. Derived classes will override this method to provide different types of argument conversions.- Overrides:
convert
in classCachedMethod.ArgumentConversion
- Parameters:
input
- The token to be converted- Returns:
- The object that can be used to invoke a method through the reflection method.
- Throws:
IllegalActionException
- Always thrown in this base class.
-
isPreferableTo
public boolean isPreferableTo(CachedMethod.ArgumentConversion conversion)
Return true if this conversion is preferable to the given conversion.- Overrides:
isPreferableTo
in classCachedMethod.ArgumentConversion
- Parameters:
conversion
- The conversion to be tested.- Returns:
- True if this conversion is prefereable to the given conversion.
-
toString
public java.lang.String toString()
Return a string representation of this conversion.- Overrides:
toString
in classCachedMethod.ArgumentConversion
- Returns:
- A string representation of this conversion.
-
-