gnu.kawa.functions

Class GetModuleClass

Implemented Interfaces:
Inlineable, Named

public class GetModuleClass
extends Procedure0
implements Inlineable

Special procedure to get the Class of the current module. Since "current module" is defined by lexical scope, this isn't a first-class procedure - it has to be inlined.

Field Summary

static GetModuleClass
getModuleClass

Method Summary

Object
apply0()
void
compile(ApplyExp exp, Compilation comp, Target target)
static Expression
getModuleClassURI(Compilation comp)
Return an expression that evaluates to a module-relative URI.
Type
getReturnType(Expression[] args)

Methods inherited from class gnu.mapping.Procedure0

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

getModuleClass

public static final GetModuleClass getModuleClass

Method Details

apply0

public Object apply0()
Overrides:
apply0 in interface Procedure0

compile

public void compile(ApplyExp exp,
                    Compilation comp,
                    Target target)
Specified by:
compile in interface Inlineable

getModuleClassURI

public static Expression getModuleClassURI(Compilation comp)
Return an expression that evaluates to a module-relative URI. This has the Kawa-specific URI scheme "class-resource:" and an assocatied ClassLoader (using a WekaHashMap). It used to reference resources located using the compiled class's ClassLoader.

getReturnType

public Type getReturnType(Expression[] args)
Specified by:
getReturnType in interface Inlineable