ptolemy.data.expr
Class CachedMethod.TypeArgumentConversion

java.lang.Object
  extended by ptolemy.data.expr.CachedMethod.ArgumentConversion
      extended by 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
private  CachedMethod.ArgumentConversion _conversion
           
private  Type _conversionType
           
 
Fields inherited from class ptolemy.data.expr.CachedMethod.ArgumentConversion
_preference
 
Constructor Summary
private CachedMethod.TypeArgumentConversion(Type type, CachedMethod.ArgumentConversion conversion)
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_conversionType

private Type _conversionType

_conversion

private CachedMethod.ArgumentConversion _conversion
Constructor Detail

CachedMethod.TypeArgumentConversion

private CachedMethod.TypeArgumentConversion(Type type,
                                            CachedMethod.ArgumentConversion conversion)
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 class CachedMethod.ArgumentConversion
Parameters:
input - The token to be converted
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 class CachedMethod.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 class CachedMethod.ArgumentConversion
Returns:
A string representation of this conversion.