public class GetModuleClass extends ProcedureN implements Inlineable
| Modifier and Type | Field and Description |
|---|---|
static GetModuleClass |
getModuleClass
A function that returns the class of the current module.
|
static GetModuleClass |
getModuleUri
A function that returns the URLPath of the current module.
|
static GetModuleClass |
getModuleUriDummy
A dummy 1-argument functions used in implementing getModuleUri.
|
noArgscompilerKey, compilerXKey, validateApplyKey, validateXApplyKeynameKey| Constructor and Description |
|---|
GetModuleClass() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
applyN(java.lang.Object[] args) |
static gnu.kawa.io.URLPath |
classResourcePath(java.lang.Class clas) |
void |
compile(ApplyExp exp,
Compilation comp,
Target target) |
static Expression |
getModuleClassURI(Compilation comp)
Return an expression that evaluates to a module-relative URL.
|
Type |
getReturnType(Expression[] args)
Semi-deprecated - instead should be set at Inline time.
|
int |
numArgs()
Return
minArgs()|(maxArgs<<12). |
apply, apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getSetter, getSourceLocation, isSideEffectFree, match0, match1, match2, match3, match4, matchN, maxArgs, maxArgs, minArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation, toStringgetName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbolpublic static final GetModuleClass getModuleClass
public static final GetModuleClass getModuleUri
"class-resource:" URL (see ResourceStreamHandler),
though in immediate mode it gets optimized to a "file:" URL.public static final GetModuleClass getModuleUriDummy
public java.lang.Object applyN(java.lang.Object[] args)
applyN in class ProcedureNpublic int numArgs()
ProcedureminArgs()|(maxArgs<<12).
We use a single virtual function to reduce the number of methods
in the system, as well as the number of virtual method table entries.
We shift by 12 so the number can normally be represented using a
sipush instruction, without requiring a constant pool entry.public void compile(ApplyExp exp, Compilation comp, Target target)
compile in interface Inlineablepublic Type getReturnType(Expression[] args)
ProceduregetReturnType in class Procedurepublic static Expression getModuleClassURI(Compilation comp)
public static gnu.kawa.io.URLPath classResourcePath(java.lang.Class clas)