org.omegahat.Environment.GUITools
Class Signature

java.lang.Object
  |
  +--org.omegahat.Environment.GUITools.Signature

public class Signature
extends java.lang.Object

Class used to represent the types in the signature of a Java method and manipulate them for use in generating Java byte-code for class definitions.


Field Summary
protected  java.util.Vector types
          (Ordered) collection containing the names of the classes of the arguments in the signature.
 
Constructor Summary
Signature()
          Default constructor.
Signature(java.lang.String arg)
          Create a signature with a single argument whose class is identified by the argument.
Signature(java.lang.String[] args)
          Create a signature specifying the classes/types of the arguments as an array of strings which are resolved to Java Classes
 
Method Summary
 java.util.Vector addType(java.lang.String n)
          Add the specified class name to the types collection.
 java.util.Vector addTypes(java.lang.String[] names)
          Add each element of the array, naming a Java class, to the collection of argument types.
 java.lang.String argsToString()
          Convert the argument types into a single string that can be used when defining a method in the Jas byte-code generator.
 jas.CodeAttr createCode()
          Does nothing!
 java.lang.String separator()
          Accessor to the String used to separate the different argument types/elements of the signature when concatenating them into a single String.
 int size()
          Return the number of entries currently stored in the signature representation.
 java.util.Vector types()
          Accessor to the types field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

types

protected java.util.Vector types
(Ordered) collection containing the names of the classes of the arguments in the signature.
Constructor Detail

Signature

public Signature(java.lang.String arg)
Create a signature with a single argument whose class is identified by the argument.

Signature

public Signature()
Default constructor.

Signature

public Signature(java.lang.String[] args)
Create a signature specifying the classes/types of the arguments as an array of strings which are resolved to Java Classes
Method Detail

createCode

public jas.CodeAttr createCode()
Does nothing!

addType

public java.util.Vector addType(java.lang.String n)
Add the specified class name to the types collection.

addTypes

public java.util.Vector addTypes(java.lang.String[] names)
Add each element of the array, naming a Java class, to the collection of argument types.

types

public java.util.Vector types()
Accessor to the types field.

argsToString

public java.lang.String argsToString()
Convert the argument types into a single string that can be used when defining a method in the Jas byte-code generator.

separator

public java.lang.String separator()
Accessor to the String used to separate the different argument types/elements of the signature when concatenating them into a single String.

size

public int size()
Return the number of entries currently stored in the signature representation.