Public Member Functions | Protected Member Functions

org.exolab.javasource.JConstructor Class Reference

List of all members.

Public Member Functions

void addParameter (JParameter parameter) throws IllegalArgumentException
JClass getDeclaringClass ()
JModifiers getModifiers ()
JParameter[] getParameters ()
JSourceCode getSourceCode ()
void print (JSourceWriter jsw)
void setModifiers (JModifiers modifiers)
void setSourceCode (String sourceCode)
void setSourceCode (JSourceCode sourceCode)
String toString ()

Protected Member Functions

 JConstructor (JClass declaringClass)

Detailed Description

A class for handling source code for a constructor of a JClass

Author:
Keith Visco
Version:
Revision:
1.2
Date:
2004/12/03 18:39:10

Constructor & Destructor Documentation

org.exolab.javasource.JConstructor.JConstructor ( JClass  declaringClass  )  [protected]

Creates a new method with the given name and returnType.

For "void" return types, simply pass in null as the returnType


Member Function Documentation

void org.exolab.javasource.JConstructor.addParameter ( JParameter  parameter  )  throws IllegalArgumentException

Adds the given parameter to this Methods list of parameters

Parameters:
parameter the parameter to add to the this Methods

list of parameters.

Exceptions:
IllegalArgumentException when a parameter already

exists for this Method with the same name as the new parameter

References org.exolab.javasource.JStructure.addImport(), org.exolab.javasource.JNamedMap.get(), org.exolab.javasource.JType.getName(), org.exolab.javasource.JStructure.getName(), org.exolab.javasource.JType.isPrimitive(), and org.exolab.javasource.JNamedMap.put().

Referenced by org.exolab.javasource.JClass.createConstructor().

JClass org.exolab.javasource.JConstructor.getDeclaringClass (  ) 

Returns the class in which this JMember has been declared

Returns:
the class in which this JMember has been declared
JModifiers org.exolab.javasource.JConstructor.getModifiers (  ) 

Returns the modifiers for this JConstructor

Returns:
the modifiers for this JConstructor
JParameter [] org.exolab.javasource.JConstructor.getParameters (  ) 

Returns an array of JParameters consisting of the parameters of this Method in declared order

Returns:
a JParameter array consisting of the parameters of this Method in declared order

References org.exolab.javasource.JNamedMap.get(), and org.exolab.javasource.JNamedMap.size().

JSourceCode org.exolab.javasource.JConstructor.getSourceCode (  ) 
void org.exolab.javasource.JConstructor.print ( JSourceWriter  jsw  ) 
void org.exolab.javasource.JConstructor.setModifiers ( JModifiers  modifiers  ) 
void org.exolab.javasource.JConstructor.setSourceCode ( String  sourceCode  ) 
void org.exolab.javasource.JConstructor.setSourceCode ( JSourceCode  sourceCode  ) 
String org.exolab.javasource.JConstructor.toString (  ) 

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties