gnu.kawa.functions
Class GetNamedPart

java.lang.Object
  extended by gnu.mapping.PropertySet
      extended by gnu.mapping.Procedure
          extended by gnu.mapping.Procedure2
              extended by gnu.kawa.functions.GetNamedPart
All Implemented Interfaces:
CanInline, HasSetter, Named

public class GetNamedPart
extends Procedure2
implements HasSetter, CanInline

Procedure to get the value of a named component of an object.


Field Summary
static java.lang.String CAST_METHOD_NAME
          Pseudo-method-name for the cast operation.
static java.lang.String CLASSTYPE_FOR
          PREFIX:<> is equivalent to the ClassType bound to PREFIX.
static GetNamedPart getNamedPart
           
static java.lang.String INSTANCEOF_METHOD_NAME
          Pseudo-method-name for class-membership-test (instanceof) operation.
 
Constructor Summary
GetNamedPart()
           
 
Method Summary
 java.lang.Object apply2(java.lang.Object container, java.lang.Object part)
           
static java.lang.String combineName(Expression part1, Expression part2)
           
static java.lang.Object getMemberPart(java.lang.Object container, java.lang.String name)
           
static java.lang.Object getNamedPart(java.lang.Object container, Symbol part)
           
 Procedure getSetter()
           
static java.lang.Object getTypePart(Type type, java.lang.String name)
           
 Expression inline(ApplyExp exp, ExpWalker walker)
          Inline an application of this Procedure and return result.
static Expression makeExp(Expression clas, Expression member)
           
static Expression makeExp(Expression clas, java.lang.String member)
           
static Expression makeExp(Type type, java.lang.String member)
           
 
Methods inherited from class gnu.mapping.Procedure2
apply0, apply1, apply3, apply4, applyN, numArgs
 
Methods inherited from class gnu.mapping.Procedure
apply, apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getSourceLocation, match0, match1, match2, match3, match4, matchN, maxArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation, toString
 
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

getNamedPart

public static final GetNamedPart getNamedPart

CLASSTYPE_FOR

public static final java.lang.String CLASSTYPE_FOR
PREFIX:<> is equivalent to the ClassType bound to PREFIX.

See Also:
Constant Field Values

CAST_METHOD_NAME

public static final java.lang.String CAST_METHOD_NAME
Pseudo-method-name for the cast operation.

See Also:
Constant Field Values

INSTANCEOF_METHOD_NAME

public static final java.lang.String INSTANCEOF_METHOD_NAME
Pseudo-method-name for class-membership-test (instanceof) operation.

See Also:
Constant Field Values
Constructor Detail

GetNamedPart

public GetNamedPart()
Method Detail

combineName

public static java.lang.String combineName(Expression part1,
                                           Expression part2)

makeExp

public static Expression makeExp(Expression clas,
                                 Expression member)

makeExp

public static Expression makeExp(Expression clas,
                                 java.lang.String member)

makeExp

public static Expression makeExp(Type type,
                                 java.lang.String member)

inline

public Expression inline(ApplyExp exp,
                         ExpWalker walker)
Description copied from interface: CanInline
Inline an application of this Procedure and return result. Can return original expression.

Specified by:
inline in interface CanInline

apply2

public java.lang.Object apply2(java.lang.Object container,
                               java.lang.Object part)
                        throws java.lang.Throwable
Specified by:
apply2 in class Procedure2
Throws:
java.lang.Throwable

getTypePart

public static java.lang.Object getTypePart(Type type,
                                           java.lang.String name)
                                    throws java.lang.Throwable
Throws:
java.lang.Throwable

getNamedPart

public static java.lang.Object getNamedPart(java.lang.Object container,
                                            Symbol part)
                                     throws java.lang.Throwable
Throws:
java.lang.Throwable

getMemberPart

public static java.lang.Object getMemberPart(java.lang.Object container,
                                             java.lang.String name)
                                      throws java.lang.Throwable
Throws:
java.lang.Throwable

getSetter

public Procedure getSetter()
Specified by:
getSetter in interface HasSetter
Overrides:
getSetter in class Procedure