public class ClassMethods extends Procedure2
| Modifier and Type | Field and Description |
|---|---|
static ClassMethods |
classMethods |
applyToObjectapplyMethodType, applyToConsumerDefault, applyToConsumerMethod, applyToObjectDefault, applyToObjectMethod, compilerKey, compilerXKey, inlineIfConstantSymbol, validateApplyKey, validateXApplyKeynameKey| Constructor and Description |
|---|
ClassMethods() |
| Modifier and Type | Method and Description |
|---|---|
static MethodProc |
apply(ObjectType dtype,
java.lang.String mname,
char mode,
Language language)
Find methods.
|
static MethodProc |
apply(Procedure thisProc,
java.lang.Object arg0,
java.lang.Object arg1) |
java.lang.Object |
apply2(java.lang.Object arg0,
java.lang.Object arg1)
Create a method or generic of the matching methods.
|
static PrimProcedure[] |
getMethods(ObjectType dtype,
java.lang.String mname,
char mode,
ClassType caller,
Language language)
Return the methods of a class with the specified name and flag.
|
static int |
selectApplicable(PrimProcedure[] methods,
int numArgs,
boolean maybeMore)
Select methods that have the right number of parameters.
|
static long |
selectApplicable(PrimProcedure[] methods,
Type[] atypes,
Type restType)
Re-order the methods such that the ones that are definite
applicable (all argtypes is subset of parameter type) are first;
those possibly applicable next (argtype overlaps parameter types);
and ending with those definitely not applicable (some argtype does
overlap its parameter type).
|
apply0, apply1, apply3, apply4, applyN, applyToObject, numArgsapplyL, applyToConsumerDefault, applyToObjectDefault, checkArgCount, checkBadCode, getApplyMethod, getApplyToConsumerMethod, getApplyToObjectMethod, getReturnType, getSetter, getSourceLocation, isSideEffectFree, lookupApplyHandle, maxArgs, maxArgs, minArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation, toStringgetName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbolpublic static final ClassMethods classMethods
public java.lang.Object apply2(java.lang.Object arg0,
java.lang.Object arg1)
apply2 in class Procedure2arg0 - a Class, ClassType, or a CharSequence or Symbol
that names a class.arg1 - a method name (a CharSequence, or Symbol)
Loosely the same as GetNamedPart.make(arg0, arg1),
but with some extra conversions and checks.public static MethodProc apply(Procedure thisProc, java.lang.Object arg0, java.lang.Object arg1)
public static PrimProcedure[] getMethods(ObjectType dtype, java.lang.String mname, char mode, ClassType caller, Language language)
caller - if non-null, check that methods are accessible in it.public static long selectApplicable(PrimProcedure[] methods, Type[] atypes, Type restType)
((number of definitely applicable methods) << 32
+ (number of possibly applicable methods.public static int selectApplicable(PrimProcedure[] methods, int numArgs, boolean maybeMore)
public static MethodProc apply(ObjectType dtype, java.lang.String mname, char mode, Language language)
dtype - class to searchmname - method name (already mangled, if need be).mode - one of 'P' (use invokespecial). 'V' (require this argument
even if method is static), or '\0' (otherwise).