gnu.kawa.functions
Class GetNamedPart
java.lang.Object
gnu.mapping.PropertySet
gnu.mapping.Procedure
gnu.mapping.Procedure2
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.
|
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,
InlineCalls walker,
boolean argsInlined)
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.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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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
GetNamedPart
public GetNamedPart()
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,
InlineCalls walker,
boolean argsInlined)
- Description copied from interface:
CanInline
- Inline an application of this Procedure and return result.
Unless
argsInlined is true, then this method
is responsible for walking exp.getArgs();
you can handle this using exp.getArgs(walker, argsInlined).
(The exp.getFunction() has been walked, regardless.)
- Specified by:
inline in interface CanInline
argsInlined - true if the arguments have been inlined.
Can return original expression.
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