public class Signature extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Signature.Rest |
Modifier and Type | Field and Description |
---|---|
static Signature |
NO_ARGUMENTS |
static Signature |
ONE_ARGUMENT |
static Signature |
ONE_REQUIRED |
static Signature |
OPTIONAL |
static Signature |
THREE_ARGUMENTS |
static Signature |
THREE_REQUIRED |
static Signature |
TWO_ARGUMENTS |
static Signature |
TWO_REQUIRED |
Constructor and Description |
---|
Signature(int pre,
int opt,
int post,
Signature.Rest rest,
int kwargs,
int requiredKwargs,
boolean restKwargs) |
Modifier and Type | Method and Description |
---|---|
Arity |
arity() |
int |
arityValue()
Best attempt at breaking the code of arity values! We figure out how many fixed/required parameters
must be supplied.
|
void |
checkArity(Ruby runtime,
IRubyObject[] args) |
static Signature |
decode(long l) |
long |
encode() |
static Signature |
from(ArgsNode args) |
static Signature |
from(Arity arity) |
static Signature |
from(ForNode iter) |
static Signature |
from(int pre,
int opt,
int post,
int kwargs,
int requiredKwargs,
Signature.Rest rest,
boolean restKwargs) |
static Signature |
from(IterNode iter) |
static Signature |
from(PostExeNode iter) |
static Signature |
from(PreExeNode iter) |
int |
getRequiredKeywordForArityCount() |
boolean |
hasKwargs() |
boolean |
hasRest() |
boolean |
isFixed()
Are their an exact (fixed) number of parameters to this signature?
|
int |
opt() |
int |
post() |
int |
pre() |
int |
required() |
Signature.Rest |
rest() |
boolean |
restKwargs() |
String |
toString() |
public static final Signature NO_ARGUMENTS
public static final Signature ONE_ARGUMENT
public static final Signature TWO_ARGUMENTS
public static final Signature THREE_ARGUMENTS
public static final Signature OPTIONAL
public static final Signature ONE_REQUIRED
public static final Signature TWO_REQUIRED
public static final Signature THREE_REQUIRED
public Signature(int pre, int opt, int post, Signature.Rest rest, int kwargs, int requiredKwargs, boolean restKwargs)
public int getRequiredKeywordForArityCount()
public boolean restKwargs()
public int pre()
public int opt()
public Signature.Rest rest()
public int post()
public boolean hasKwargs()
public boolean hasRest()
public boolean isFixed()
public int required()
public Arity arity()
public int arityValue()
public static Signature from(int pre, int opt, int post, int kwargs, int requiredKwargs, Signature.Rest rest, boolean restKwargs)
public static Signature from(PreExeNode iter)
public static Signature from(PostExeNode iter)
public long encode()
public static Signature decode(long l)
public void checkArity(Ruby runtime, IRubyObject[] args)
Copyright © 2001-2015 JRuby. All Rights Reserved.