Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

bossa.syntax
Class FormalParameters  view FormalParameters download FormalParameters.java

java.lang.Object
  extended bybossa.syntax.Node
      extended bybossa.syntax.FormalParameters

public class FormalParameters
extends Node

Parameters of a method declaration.

Version:
$Date: 2003/11/22 16:37:39 $

Nested Class Summary
static class FormalParameters.NamedParameter
          A named parameter.
static class FormalParameters.OptionalParameter
          A named parameter with a default value.
static class FormalParameters.Parameter
          An anonymous formal parameter.
 
Field Summary
private  FormalParameters.Parameter[] parameters
           
(package private)  int size
           
(package private) static LocatedString thisName
           
 
Fields inherited from class bossa.syntax.Node
children, currentFunction, down, global, none, propagate, scope, thisExp, typeScope, upper
 
Constructor Summary
(package private) FormalParameters(FormalParameters.Parameter[] parameters)
           
  FormalParameters(java.util.List parameters)
          Main class
 
Method Summary
(package private)  void addThis(Monotype type)
           
(package private)  boolean containsAlike()
          Walk methods, used in NiceMethod.create
(package private)  void doResolve()
           
(package private)  boolean fill(int[] map, int num)
           
(package private)  boolean fill(int[] map, java.lang.String id, int num)
           
 MonoSymbol[] getMonoSymbols()
           
 LocatedString getName(int rank)
           
 java.util.List getNamedParameters()
           
 java.util.Stack[] getParameterCopies()
           
 java.util.List getRequiredParameters()
           
(package private)  boolean hasDefaultValue(int rank)
           
 boolean hasMatchFor(java.lang.String s)
           
(package private)  boolean hasThis()
           
 java.util.Iterator iterator()
           
(package private)  boolean match(Arguments args, FunSymbol symbol)
          Check if arguments match the formal parameters.
(package private)  void resolveCalledFromAnalyse(Info info)
          This is a hack to allow bossa.syntax.analyse to make the default values be resolved.
(package private)  void substitute(java.util.Map map)
           
 java.lang.String toString()
          Misc.
(package private)  void typecheck(mlsub.typing.Monotype[] domain)
           
(package private)  Monotype[] types()
           
 
Methods inherited from class bossa.syntax.Node
addChild, addChildren, addFirstChild, addSymbol, addTypeMap, addTypeSymbol, addTypeSymbols, buildScope, buildScope, child, doTypecheck, getCurrentFunction, getGlobalScope, getGlobalTypeScope, getScope, getTypeScope, removeChild, resolve, setCurrentFunction, setModule, typecheck
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

thisName

static final LocatedString thisName

parameters

private FormalParameters.Parameter[] parameters

size

int size
Constructor Detail

FormalParameters

public FormalParameters(java.util.List parameters)
Main class


FormalParameters

FormalParameters(FormalParameters.Parameter[] parameters)
Method Detail

addThis

void addThis(Monotype type)

hasThis

boolean hasThis()

getName

public LocatedString getName(int rank)

hasDefaultValue

boolean hasDefaultValue(int rank)

containsAlike

boolean containsAlike()
Walk methods, used in NiceMethod.create


substitute

void substitute(java.util.Map map)

types

Monotype[] types()

getMonoSymbols

public MonoSymbol[] getMonoSymbols()

typecheck

void typecheck(mlsub.typing.Monotype[] domain)

doResolve

void doResolve()
Overrides:
doResolve in class Node

resolveCalledFromAnalyse

void resolveCalledFromAnalyse(Info info)
This is a hack to allow bossa.syntax.analyse to make the default values be resolved.


match

boolean match(Arguments args,
              FunSymbol symbol)
Check if arguments match the formal parameters. If succesfull, append to args's applicationExpressions the computed array of expressions, that denote the call, including the default values of the optional parameters not passed.


fill

boolean fill(int[] map,
             int num)

fill

boolean fill(int[] map,
             java.lang.String id,
             int num)

hasMatchFor

public boolean hasMatchFor(java.lang.String s)

toString

public java.lang.String toString()
Misc.


iterator

public java.util.Iterator iterator()

getNamedParameters

public java.util.List getNamedParameters()

getRequiredParameters

public java.util.List getRequiredParameters()

getParameterCopies

public java.util.Stack[] getParameterCopies()