站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.5.1

MethodParameter (NetBeans Java Hierarchy API) - NetBeans API Javadoc 5.5.1

org.openide.src 1.8.31

org.openide.src
Class MethodParameter

java.lang.Object
  extended by org.openide.src.MethodParameter
All Implemented Interfaces:
Serializable

public final class MethodParameter
extends Object
implements Serializable

Describes an argument of a method.

See Also:
Serialized Form

Constructor Summary
MethodParameter(String name, Type type, boolean fin)
          Create new parameter.
 
Method Summary
 boolean compareTo(MethodParameter param, boolean onlyType, boolean source)
          Compare the specified MethodParameter with this for equality.
 boolean equals(Object o)
           
 String getFullString()
           
 String getName()
          Get the name of the parameter variable.
 String getSourceString()
           
 Type getType()
          Get the parameter type.
 int hashCode()
           
 boolean isFinal()
          Test whether this parameter is final.
static MethodParameter parse(String text)
          Create a method parameter by parsing its textual representation.
 void setFinal(boolean fin)
          Make this parameter final or not.
 void setName(String name)
          Set the name of the parameter variable.
 void setType(Type type)
          Set the parameter type.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodParameter

public MethodParameter(String name,
                       Type type,
                       boolean fin)
Create new parameter.

Parameters:
name - the name of the parameter
type - the type of the parameter
fin - true if this parameter is final
Method Detail

parse

public static MethodParameter parse(String text)
                             throws IllegalArgumentException
Create a method parameter by parsing its textual representation.

Parameters:
text - the text to be parsed
Returns:
a new method parameter described by the text
Throws:
IllegalArgumentException - if the syntax is not recognized

getType

public Type getType()
Get the parameter type.

Returns:
the type

setType

public void setType(Type type)
Set the parameter type.

Parameters:
type - the new type

getName

public String getName()
Get the name of the parameter variable.

Returns:
the name

setName

public void setName(String name)
Set the name of the parameter variable.

Parameters:
name - the new name

setFinal

public void setFinal(boolean fin)
Make this parameter final or not.

Parameters:
fin - true to make it final, false to make it unfinal

isFinal

public boolean isFinal()
Test whether this parameter is final.

Returns:
true if so

getFullString

public String getFullString()

getSourceString

public String getSourceString()

toString

public String toString()
Overrides:
toString in class Object

compareTo

public boolean compareTo(MethodParameter param,
                         boolean onlyType,
                         boolean source)
Compare the specified MethodParameter with this for equality.

Parameters:
param - MethodParameter to be compared with this
onlyType - Compares only the type (not name and final flag)
source - Determine if the source name (for class types) should be also compared. If false only fully qualified name is compared.
Returns:
true if the specified object equals to specified MethodParameter otherwise false.

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

org.openide.src 1.8.31

Built on March 26 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.