Class com.symantec.itools.vcafe.openapi.dtreflect.DTMethod
All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class com.symantec.itools.vcafe.openapi.dtreflect.DTMethod
Object
   |
   +----DTMember
           |
           +----com.symantec.itools.vcafe.openapi.dtreflect.DTMethod
  -  public class DTMethod
  
-  extends DTMember
  
-  implements Serializable
   
A Method provides information about, and access to, a single method
 on a class or interface.  The reflected method may be a class method
 or an instance method (including an abstract method).
 A Method permits widening conversions to occur when matching the
 actual parameters to invokewith the underlying method's formal
 parameters, but it throws an IllegalArgumentException if a
 narrowing conversion would occur.
  -  Author:
  
 -  RKF
    
 -  See Also:
    
 -  DTMember, getMethods(), getMethod(), getDeclaredMethods(), getDeclaredMethod()
 
  
  -  
	equals(Object)
   -   Compares this DTMethod against the specified object.
  
 -  
	equals(DTMethod)
   -   Compares this DTMethod against the specified DTMethod.
  
 -  
	getJavadocRange()
   -   gets the text range from the beginning of the first line of the method's Javadoc comment
 to the closing asterisk-slash characters
  
 -  
	getReturnType()
   -   Get the method's return type.
  
 -  
	getSourceRange()
   -   gets the text range from the beginning of the method declaration to the closing brace
 (or semicolon for native or abstract members)
  
 -  
	rename(String)
   -   Renames the method to new name
 
  
 -  
	toShortString()
   -   Returns a short string describing this DTMethod.
  
 -  
	toString()
   -   Compares the formal signature of this DTMethod with another.
  
 -  
	validate()
   -   Ensure that this member is valid in its project
 
  
equals
public boolean equals(Object obj)
  -  Compares this DTMethod against the specified object.  Returns
 true if the objects are the same.  Two Methods are the same if
 they were declared by the same class and have the same name,
 formal parameter types, return type, exceptions thrown
 and modifiers.
  
 
 
    -  Overrides:
    
 -  equals in class DTMember
  
 
 
 
equals
public boolean equals(DTMethod other)
  -  Compares this DTMethod against the specified DTMethod.  Returns
 true if the methods are the same.  Two Methods are the same if
 they were declared by the same class and have the same name,
 formal parameter types, return type, exceptions thrown
 and modifiers.
  
 
 
getJavadocRange
public com.symantec.itools.vcafe.openapi.Range getJavadocRange()
  -  gets the text range from the beginning of the first line of the method's Javadoc comment
 to the closing asterisk-slash characters
  
 
 
    -  Overrides:
    
 -  getJavadocRange in class DTMember
  
 
 
 
getReturnType
public com.symantec.itools.vcafe.openapi.dtreflect.DTClass getReturnType()
  -  Get the method's return type.
  
 
 
getSourceRange
public com.symantec.itools.vcafe.openapi.Range getSourceRange()
  -  gets the text range from the beginning of the method declaration to the closing brace
 (or semicolon for native or abstract members)
  
 
 
    -  Overrides:
    
 -  getSourceRange in class DTMember
  
 
 
 
rename
public boolean rename(String newName)
  -  Renames the method to new name
  
 
 
    -  Parameters:
    
 -  newName: - The new name of the field
    
 -  Returns:
    
 -  Success (true) or failure (false)...
  
 
 
 
toShortString
public java.lang.String toShortString()
  -  Returns a short string describing this DTMethod.
 The string consists of the method name followed by the
 parameter types in parenthesis, e.g., "substring(int,int)".
  
 
 
toString
public java.lang.String toString()
  -  Compares the formal signature of this DTMethod with another.
 Returns true if the unqualified method name and number and
 types of arguments are the same.
public boolean equalSignatures(DTMember other) {
if (other != null
&& getName().equals(other.getName())
&& getParameters().equals(other.getParameters()))
return true;
return false;
}
/**
 Returns a string describing this DTMethod.  The string is
 formatted as the method access modifiers, if any, followed by
 the method return type, followed by a space, followed by the
 class declaring the method, followed by a period, followed by
 the method name, followed by a parenthesized, comma-separated
 list of the method's formal parameter types. If the method
 throws checked exceptions, the parameter list is followed by a
 space, followed by the word throws followed by a
 comma-separated list of the thrown exception types.
 For example:
 
	public boolean java.lang.Object.equals(java.lang.Object)
 
 The access modifiers are placed in canonical order as
 specified by "The Java Language Specification".  This is
 public, protected or private first,
 and then other modifiers in the following order:
 abstract, static, final,
 synchronized native.
  
 
 
    -  Overrides:
    
 -  toString in class Object
  
 
 
 
validate
public boolean validate()
  -  Ensure that this member is valid in its project
  
 
 
    -  Overrides:
    
 -  validate in class DTMember
  
 
 
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index