Public Member Functions | Protected Member Functions

org.exolab.javasource.JField Class Reference

Inheritance diagram for org.exolab.javasource.JField:
org.exolab.javasource.JMember

List of all members.

Public Member Functions

 JField (JType type, String name)
JDocComment getComment ()
JClass getDeclaringClass ()
String getInitString ()
JModifiers getModifiers ()
String getName ()
JType getType ()
void setComment (JDocComment comment)
void setComment (String comment)
void setInitString (String init)
void setName (String name) throws IllegalArgumentException
void setModifiers (JModifiers modifiers)
String toString ()

Protected Member Functions

void setDeclaringClass (JClass declaringClass)

Detailed Description

A class which holds information about a field. Modelled closely after the Java Reflection API. This class is part of package which is used to create source code in memory.

Author:
Keith Visco
Version:
Revision:
1.2
Date:
2004/12/03 18:41:33

Constructor & Destructor Documentation


Member Function Documentation

JDocComment org.exolab.javasource.JField.getComment (  ) 

Returns the comment describing this member.

Returns:
the comment describing this member, or null if no comment has been set.

Referenced by org.exolab.javasource.JInterface.print(), and org.exolab.javasource.JClass.print().

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

Returns the class in which this JField has been declared

Returns:
the class in which this JField has been declared
String org.exolab.javasource.JField.getInitString (  ) 

Returns the initialization String for this JField

Returns:
the initialization String for this JField, or null if no initialization String was specified.

Referenced by org.exolab.javasource.JInterface.print(), and org.exolab.javasource.JClass.print().

JModifiers org.exolab.javasource.JField.getModifiers (  ) 
JType org.exolab.javasource.JField.getType (  ) 
void org.exolab.javasource.JField.setComment ( String  comment  ) 

Sets the comment describing this member.

Parameters:
comment the JDocComment for this member
void org.exolab.javasource.JField.setComment ( JDocComment  comment  ) 

Sets the comment describing this member.

Parameters:
comment the JDocComment for this member

Referenced by org.exolab.castor.builder.FieldInfo.createJavaField().

void org.exolab.javasource.JField.setDeclaringClass ( JClass  declaringClass  )  [protected]
void org.exolab.javasource.JField.setInitString ( String  init  ) 

Sets the initialization string for this JField; Allows some flexibility in declaring default values.

Parameters:
init the initialization string for this member.

Referenced by org.exolab.castor.builder.FieldInfo.createJavaField().

void org.exolab.javasource.JField.setModifiers ( JModifiers  modifiers  ) 
void org.exolab.javasource.JField.setName ( String  name  )  throws IllegalArgumentException

Sets the name of this JField

Parameters:
name the name of this JField
Exceptions:
IllegalArgumentException when the name is not a valid Java member name, or if a member with the given name already exists in the declaring class

Referenced by org.exolab.javasource.JField.JField().

String org.exolab.javasource.JField.toString (  ) 

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