gnu.kawa.functions

Class GetNamedPart

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 String
CAST_METHOD_NAME
Pseudo-method-name for the cast operation.
static String
CLASSTYPE_FOR
PREFIX:<> is equivalent to the ClassType bound to PREFIX.
static String
INSTANCEOF_METHOD_NAME
Pseudo-method-name for class-membership-test (instanceof) operation.
static GetNamedPart
getNamedPart

Method Summary

Object
apply2(Object container, Object part)
static String
combineName(Expression part1, Expression part2)
static Object
getMemberPart(Object container, String name)
static Object
getNamedPart(Object container, Symbol part)
Procedure
getSetter()
static Object
getTypePart(Type type, String name)
Expression
inline(ApplyExp exp, ExpWalker walker)
static Expression
makeExp(Type type, String member)
static Expression
makeExp(Expression clas, String member)
static Expression
makeExp(Expression clas, Expression member)

Methods inherited from class gnu.mapping.Procedure2

apply0, apply1, apply2, apply3, apply4, applyN, numArgs

Methods inherited from class gnu.mapping.Procedure

apply, apply, apply0, apply1, apply2, apply3, apply4, applyN, check0, check1, check2, check3, check4, checkArgCount, checkN, getSetter, getSourceLocation, match0, match1, match2, match3, match4, matchN, maxArgs, minArgs, numArgs, set0, set1, setN, setSetter, setSourceLocation, toString

Methods inherited from class gnu.mapping.PropertySet

getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol

Field Details

CAST_METHOD_NAME

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

CLASSTYPE_FOR

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

INSTANCEOF_METHOD_NAME

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

getNamedPart

public static final GetNamedPart getNamedPart

Method Details

apply2

public Object apply2(Object container,
                     Object part)
            throws Throwable
Overrides:
apply2 in interface Procedure2

combineName

public static String combineName(Expression part1,
                                 Expression part2)

getMemberPart

public static Object getMemberPart(Object container,
                                   String name)
            throws Throwable

getNamedPart

public static Object getNamedPart(Object container,
                                  Symbol part)
            throws Throwable

getSetter

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

getTypePart

public static Object getTypePart(Type type,
                                 String name)
            throws Throwable

inline

public Expression inline(ApplyExp exp,
                         ExpWalker walker)
Specified by:
inline in interface CanInline

makeExp

public static Expression makeExp(Type type,
                                 String member)

makeExp

public static Expression makeExp(Expression clas,
                                 String member)

makeExp

public static Expression makeExp(Expression clas,
                                 Expression member)