mjc

org.multijava.mjdoc.mjdoc_142
Class MjExecutableMemberDoc

java.lang.Object
  extended byorg.multijava.mjdoc.mjdoc_142.MjDoc
      extended byorg.multijava.mjdoc.mjdoc_142.MjProgramElementDoc
          extended byorg.multijava.mjdoc.mjdoc_142.MjMemberDoc
              extended byorg.multijava.mjdoc.mjdoc_142.MjExecutableMemberDoc
All Implemented Interfaces:
Comparable, com.sun.javadoc.Doc, com.sun.javadoc.ExecutableMemberDoc, com.sun.javadoc.MemberDoc, com.sun.javadoc.ProgramElementDoc
Direct Known Subclasses:
MjConstructorDoc, MjMethodDoc

public abstract class MjExecutableMemberDoc
extends MjMemberDoc
implements com.sun.javadoc.ExecutableMemberDoc

This class is a superclass representing common functionality between both methods and constructors; it wraps appropriate objects from the MJ classes and parse tree.

Author:
David R. Cok

Nested Class Summary
static class MjExecutableMemberDoc.Comp
          This class is used for sorting the gfs as listed on the package summary page and in the overview index lists.
 
Field Summary
private static long ACC
          A constant used only by longModifiers() that selects those modifier bits that are passed on to the default constructor.
private  String cachedFlatSignature
          Caches the signature (with non-qualified type names in the parameters) of this member.
private  com.sun.javadoc.Parameter[] cachedParameters
          Cached value of the parameter array for this member.
private  String cachedSignature
          Caches the signature (with fully-qualified type names in the parameters) of this member.
private  CMethod cmethod
          Holder for the MJC construct denoting the method being wrapped.
private  boolean isDeprecated
          Cached value indicating whether there is an @deprecated tag.
private  JMethodDeclarationType jmethod
          Holder for the object from the MJ parse tree, when source code is available.
 
Fields inherited from class org.multijava.mjdoc.mjdoc_142.MjProgramElementDoc
 
Fields inherited from class org.multijava.mjdoc.mjdoc_142.MjDoc
parser
 
Constructor Summary
MjExecutableMemberDoc(CMethod cm, MjClassDoc container)
          Constructs a wrapper object; to be used when no source is available.
MjExecutableMemberDoc(JMethodDeclarationType jmethod, MjClassDoc container)
          Constructs a wrapper object; to be used when source code is available; this makes available the javadoc comments and parameter identifiers.
 
Method Summary
 CMethod cmethod()
          Accessor for the wrapped CMethod.
protected  String compareString()
          Returns a String representation, used for ordering.
 String flatSignature()
          Returns the signature of the method, from ( to ), with a space after each comma, including dimensions and containing types, but no package names.
 boolean isNative()
          Returns true if the represented method is a native method.
 boolean isSynchronized()
          Returns true if this member has the 'synchronized' modifier in the java code.
 JMethodDeclarationType jmethod()
          Accessor for the wrapped JMethodDeclarationType.
 long longModifiers()
          Returns the (mjc) modifiers of the member.
abstract  String name()
          Returns the identifier of the method, without package or enclosing classes.
 com.sun.javadoc.Parameter[] parameters()
          Returns an array of the parameters of this member, as MjParameter objects that wrap the information from the MJC parse tree; identifiers for the parameters are available only if this object was constructed with a JMethod object providing a reference to the source code.
 String parameterSignature()
          Returns the signature of the method, from ( to ), with a space after each comma, including parameter names, dimensions and containing types, but no package names.
 com.sun.javadoc.ParamTag[] paramTags()
          Returns the '@param' javadoc tags of this member.
 String qualifiedName()
          Returns the fully qualified name (package + enclosing classes + class + method name) of the method.
 String signature()
          Returns the signature of the method, from ( to ), with a space after each comma, with dimensions and fully qualified type names (i.e. including package names).
 com.sun.javadoc.ClassDoc[] thrownExceptions()
          Returns the classes that are the exceptions declared to be thrown by this method.
 com.sun.javadoc.ThrowsTag[] throwsTags()
          Returns the '@throws' javadoc tags of this member.
 String toString()
          Returns a String representation, matches javadoc.
 
Methods inherited from class org.multijava.mjdoc.mjdoc_142.MjMemberDoc
isSynthetic
 
Methods inherited from class org.multijava.mjdoc.mjdoc_142.MjProgramElementDoc
containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier
 
Methods inherited from class org.multijava.mjdoc.mjdoc_142.MjDoc
commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isClass, isConstructor, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, notImplemented, position, seeTags, setIncluded, setRawCommentText, setRawCommentText, setRawCommentText, setRawCommentText, tags, tags, tags
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.javadoc.MemberDoc
isSynthetic
 
Methods inherited from interface com.sun.javadoc.ProgramElementDoc
containingClass, containingPackage, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, modifiers, modifierSpecifier
 
Methods inherited from interface com.sun.javadoc.Doc
commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isClass, isConstructor, isError, isException, isField, isIncluded, isInterface, isMethod, isOrdinaryClass, position, seeTags, setRawCommentText, tags, tags
 

Field Detail

cmethod

private CMethod cmethod
Holder for the MJC construct denoting the method being wrapped.


jmethod

private JMethodDeclarationType jmethod
Holder for the object from the MJ parse tree, when source code is available.


isDeprecated

private boolean isDeprecated
Cached value indicating whether there is an @deprecated tag.


cachedSignature

private String cachedSignature
Caches the signature (with fully-qualified type names in the parameters) of this member.


cachedFlatSignature

private String cachedFlatSignature
Caches the signature (with non-qualified type names in the parameters) of this member.


cachedParameters

private com.sun.javadoc.Parameter[] cachedParameters
Cached value of the parameter array for this member.


ACC

private static final long ACC
A constant used only by longModifiers() that selects those modifier bits that are passed on to the default constructor.

Constructor Detail

MjExecutableMemberDoc

public MjExecutableMemberDoc(CMethod cm,
                             MjClassDoc container)
Constructs a wrapper object; to be used when no source is available.

Parameters:
cm - The MJ object denoting the method to be wrapped by the constructed object
container - An object denoting the class that contains this member

MjExecutableMemberDoc

public MjExecutableMemberDoc(JMethodDeclarationType jmethod,
                             MjClassDoc container)
Constructs a wrapper object; to be used when source code is available; this makes available the javadoc comments and parameter identifiers.

Parameters:
jmethod - The MJ object denoting the method to be wrapped by the constructed object
container - An object denoting the class that contains this member
Method Detail

flatSignature

public String flatSignature()
Returns the signature of the method, from ( to ), with a space after each comma, including dimensions and containing types, but no package names. This signature is used in the html index.

Specified by:
flatSignature in interface com.sun.javadoc.ExecutableMemberDoc

parameterSignature

public String parameterSignature()
Returns the signature of the method, from ( to ), with a space after each comma, including parameter names, dimensions and containing types, but no package names.


signature

public String signature()
Returns the signature of the method, from ( to ), with a space after each comma, with dimensions and fully qualified type names (i.e. including package names). This signature is used in the HREF tag that enables navigation to a method directly.

Specified by:
signature in interface com.sun.javadoc.ExecutableMemberDoc

isNative

public boolean isNative()
Returns true if the represented method is a native method.

Specified by:
isNative in interface com.sun.javadoc.ExecutableMemberDoc

isSynchronized

public boolean isSynchronized()
Returns true if this member has the 'synchronized' modifier in the java code.

Specified by:
isSynchronized in interface com.sun.javadoc.ExecutableMemberDoc

parameters

public com.sun.javadoc.Parameter[] parameters()
Returns an array of the parameters of this member, as MjParameter objects that wrap the information from the MJC parse tree; identifiers for the parameters are available only if this object was constructed with a JMethod object providing a reference to the source code.

Specified by:
parameters in interface com.sun.javadoc.ExecutableMemberDoc

qualifiedName

public String qualifiedName()
Returns the fully qualified name (package + enclosing classes + class + method name) of the method.

Specified by:
qualifiedName in interface com.sun.javadoc.ProgramElementDoc

thrownExceptions

public com.sun.javadoc.ClassDoc[] thrownExceptions()
Returns the classes that are the exceptions declared to be thrown by this method.

Specified by:
thrownExceptions in interface com.sun.javadoc.ExecutableMemberDoc

paramTags

public com.sun.javadoc.ParamTag[] paramTags()
Returns the '@param' javadoc tags of this member.

Specified by:
paramTags in interface com.sun.javadoc.ExecutableMemberDoc

throwsTags

public com.sun.javadoc.ThrowsTag[] throwsTags()
Returns the '@throws' javadoc tags of this member.

Specified by:
throwsTags in interface com.sun.javadoc.ExecutableMemberDoc

name

public abstract String name()
Returns the identifier of the method, without package or enclosing classes.

Specified by:
name in interface com.sun.javadoc.Doc

longModifiers

public long longModifiers()
Returns the (mjc) modifiers of the member. Note that the modifiers of a default constructor are the same as the modifiers of the containing class.


cmethod

public CMethod cmethod()
Accessor for the wrapped CMethod.


jmethod

public JMethodDeclarationType jmethod()
Accessor for the wrapped JMethodDeclarationType.


compareString

protected String compareString()
Returns a String representation, used for ordering.

Overrides:
compareString in class MjDoc

toString

public String toString()
Returns a String representation, matches javadoc.

Overrides:
toString in class Object

mjc

mjc is Copyright (C) 2000-2004 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. mjc is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.