com.jogamp.gluegen.cgram.types
Class FunctionSymbol

java.lang.Object
  extended by com.jogamp.gluegen.cgram.types.FunctionSymbol

public class FunctionSymbol
extends Object

Describes a function symbol, which includes the name and type. Since we are currently only concerned with processing functions this is the only symbol type, though plausibly more types should be added and a true symbol table constructed during parsing.


Constructor Summary
FunctionSymbol(String name, FunctionType type)
           
 
Method Summary
 void addArgument(Type argumentType, String argumentName)
          Add an argument's name and type.
 boolean equals(Object arg)
           
 String getArgumentName(int i)
          Returns the name of the ith argument.
 Type getArgumentType(int i)
          Returns the type of the ith argument.
 String getName()
           
 int getNumArguments()
           
 Type getReturnType()
          Returns the return type of this function.
 FunctionType getType()
          Returns the type of this function.
 int hashCode()
           
 String toString()
           
 String toString(boolean emitNativeTag)
          Helper routine for emitting native javadoc tags
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FunctionSymbol

public FunctionSymbol(String name,
                      FunctionType type)
Method Detail

getName

public String getName()

getType

public FunctionType getType()
Returns the type of this function. Do not add arguments to it directly; use addArgument instead.


getReturnType

public Type getReturnType()
Returns the return type of this function.


getNumArguments

public int getNumArguments()

getArgumentName

public String getArgumentName(int i)
Returns the name of the ith argument. May return null if no argument names were available during parsing.


getArgumentType

public Type getArgumentType(int i)
Returns the type of the ith argument.


addArgument

public void addArgument(Type argumentType,
                        String argumentName)
Add an argument's name and type. Use null for unknown argument names.


toString

public String toString()
Overrides:
toString in class Object

toString

public String toString(boolean emitNativeTag)
Helper routine for emitting native javadoc tags


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object arg)
Overrides:
equals in class Object