public class ArgSpec extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ArgSpec.AF |
static class |
ArgSpec.Arg |
Modifier and Type | Field and Description |
---|---|
static String |
ARG_ALLOW_OTHER_KEYS |
static String |
ARG_EAGER |
static String |
ARG_KEY |
static String |
ARG_LAZY |
static String |
ARG_MANDATORY |
static String |
ARG_OPTIONAL |
static String |
ARG_PIPE |
static String |
ARG_PIPE_REST |
static String |
ARG_REST |
Constructor and Description |
---|
ArgSpec(ASTNList argSpecs,
Compiler comp) |
ArgSpec(Object[] argSpecs,
Compiler comp)
Build ArgSpec from array of arguments specifications.
|
ArgSpec(String[] argspecs) |
ArgSpec(String[] argspecs,
Compiler comp) |
Modifier and Type | Method and Description |
---|---|
List<String> |
asSpecList()
Return list of argument specifiers.
|
ArgSpec.Arg |
getArg(int idx) |
ArgSpec.Arg[] |
getArgs() |
ICompiled |
getInitForm(int idx) |
static boolean |
isArgsym(Symbol arg) |
boolean |
isHasRest() |
boolean |
isParameterVar(String name)
Check if name is a parameter variable.
|
boolean |
isPipeRest() |
int |
nameToIdx(String name)
Find argument index by name.
|
int |
size() |
int |
svarNameToIdx(String name)
Convert svar variable name to argument index.
|
public static final String ARG_REST
public static final String ARG_MANDATORY
public static final String ARG_OPTIONAL
public static final String ARG_KEY
public static final String ARG_ALLOW_OTHER_KEYS
public static final String ARG_EAGER
public static final String ARG_LAZY
public static final String ARG_PIPE
public static final String ARG_PIPE_REST
public ArgSpec(String[] argspecs) throws InvalidParametersException
InvalidParametersException
public ArgSpec(String[] argspecs, Compiler comp) throws InvalidParametersException
InvalidParametersException
public ArgSpec(ASTNList argSpecs, Compiler comp) throws InvalidParametersException
InvalidParametersException
public ArgSpec(Object[] argSpecs, Compiler comp) throws InvalidParametersException
InvalidParametersException
public static boolean isArgsym(Symbol arg)
public ArgSpec.Arg getArg(int idx)
public ArgSpec.Arg[] getArgs()
public boolean isHasRest()
public boolean isPipeRest()
public int nameToIdx(String name)
public ICompiled getInitForm(int idx)
public int size()
public int svarNameToIdx(String name)
public boolean isParameterVar(String name)
Copyright © 2022. All rights reserved.