gnu.kawa.functions
Class GetModuleClass

java.lang.Object
  extended by gnu.mapping.PropertySet
      extended by gnu.mapping.Procedure
          extended by gnu.mapping.Procedure0
              extended by gnu.kawa.functions.GetModuleClass
All 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
           
 
Constructor Summary
GetModuleClass()
           
 
Method Summary
 java.lang.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
apply1, apply2, apply3, apply4, applyN, numArgs
 
Methods inherited from class gnu.mapping.Procedure
apply, apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getSetter, getSourceLocation, match0, match1, match2, match3, match4, matchN, maxArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation, toString
 
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

getModuleClass

public static final GetModuleClass getModuleClass
Constructor Detail

GetModuleClass

public GetModuleClass()
Method Detail

apply0

public java.lang.Object apply0()
Specified by:
apply0 in class Procedure0

compile

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

getReturnType

public Type getReturnType(Expression[] args)
Specified by:
getReturnType 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.