org.nuiton.guix.generator
Class JavaArgument

java.lang.Object
  extended by org.nuiton.guix.generator.JavaArgument

public class JavaArgument
extends java.lang.Object

Represents an argument to a JavaMethod.

See Also:
JavaMethod

Constructor Summary
JavaArgument(java.lang.String type, java.lang.String name)
          Creates a new JavaArgument with the specified name and type.
JavaArgument(java.lang.String type, java.lang.String name, boolean isFinal)
          Creates a new JavaArgument with the specified name, type, and finality.
 
Method Summary
 java.lang.String getName()
          Returns the argument's name.
 java.lang.String getType()
          Returns the argument's type as it would be represented in Java source code.
 boolean isFinal()
          Returns true if the final keyword should appear before the argument.
 java.lang.String toString()
          Returns the Java source code for this argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaArgument

public JavaArgument(java.lang.String type,
                    java.lang.String name)
Creates a new JavaArgument with the specified name and type. For example, the method main() might have a JavaArgument with a name of "arg" and a type of "java.lang.String[]".

Parameters:
type - the argument's type, as it would appear in Java source code
name - the argument's name

JavaArgument

public JavaArgument(java.lang.String type,
                    java.lang.String name,
                    boolean isFinal)
Creates a new JavaArgument with the specified name, type, and finality. For example, the method main() might have a JavaArgument with a name of "arg" and a type of "java.lang.String[]". The isFinal parameter allows the presence of the final keyword on the argument to be controlled.

Parameters:
type - the argument's type, as it would appear in Java source code
name - the argument's name
isFinal - true if the argument should be marked final
Method Detail

getName

public java.lang.String getName()
Returns the argument's name.

Returns:
the name of the argument

getType

public java.lang.String getType()
Returns the argument's type as it would be represented in Java source code.

Returns:
the argument's type

isFinal

public boolean isFinal()
Returns true if the final keyword should appear before the argument.

Returns:
true if the argument is final

toString

public java.lang.String toString()
Returns the Java source code for this argument.

Overrides:
toString in class java.lang.Object
Returns:
the Java source code for this argument


Copyright © 2009 CodeLutin. All Rights Reserved.