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.
|
applyToObject, noArgs
applyMethodType, applyToConsumerDefault, applyToConsumerMethod, applyToObjectDefault, applyToObjectMethod, compilerKey, compilerXKey, inlineIfConstantSymbol, validateApplyKey, validateXApplyKey
nameKey
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 |
getModuleClassExp() |
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) . |
applyToObject
apply0, apply1, apply2, apply3, apply4, applyL, applyToConsumerDefault, applyToObjectDefault, checkArgCount, checkBadCode, getApplyMethod, getApplyToConsumerMethod, getApplyToObjectMethod, getSetter, getSourceLocation, isSideEffectFree, lookupApplyHandle, maxArgs, maxArgs, minArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation, toString
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
public 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 int numArgs()
Procedure
minArgs()|(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 Inlineable
public Type getReturnType(Expression[] args)
Procedure
getReturnType
in class Procedure
public static Expression getModuleClassExp()
public static Expression getModuleClassURI(Compilation comp)
public static gnu.kawa.io.URLPath classResourcePath(java.lang.Class clas)