示例#1
0
 /// <summary>
 /// Returns a string describing this {@code Constructor},
 /// including type parameters.  The string is formatted as the
 /// constructor access modifiers, if any, followed by an
 /// angle-bracketed comma separated list of the constructor's type
 /// parameters, if any, followed by the fully-qualified name of the
 /// declaring class, followed by a parenthesized, comma-separated
 /// list of the constructor's generic formal parameter types.
 ///
 /// If this constructor was declared to take a variable number of
 /// arguments, instead of denoting the last parameter as
 /// "<tt><i>Type</i>[]</tt>", it is denoted as
 /// "<tt><i>Type</i>...</tt>".
 ///
 /// A space is used to separate access modifiers from one another
 /// and from the type parameters or return type.  If there are no
 /// type parameters, the type parameter list is elided; if the type
 /// parameter list is present, a space separates the list from the
 /// class name.  If the constructor is declared to throw
 /// exceptions, the parameter list is followed by a space, followed
 /// by the word "{@code throws}" followed by a
 /// comma-separated list of the thrown exception types.
 ///
 /// <para>The only possible modifiers for constructors are the access
 /// modifiers {@code public}, {@code protected} or
 /// {@code private}.  Only one of these may appear, or none if the
 /// constructor has default (package) access.
 ///
 /// </para>
 /// </summary>
 /// <returns> a string describing this {@code Constructor},
 /// include type parameters
 ///
 /// @since 1.5
 /// @jls 8.8.3. Constructor Modifiers </returns>
 public override String ToGenericString()
 {
     return(SharedToGenericString(Modifier.ConstructorModifiers(), false));
 }
示例#2
0
 /// <summary>
 /// Returns a string describing this {@code Constructor}.  The string is
 /// formatted as the constructor access modifiers, if any,
 /// followed by the fully-qualified name of the declaring class,
 /// followed by a parenthesized, comma-separated list of the
 /// constructor's formal parameter types.  For example:
 /// <pre>
 ///    public java.util.Hashtable(int,float)
 /// </pre>
 ///
 /// <para>The only possible modifiers for constructors are the access
 /// modifiers {@code public}, {@code protected} or
 /// {@code private}.  Only one of these may appear, or none if the
 /// constructor has default (package) access.
 ///
 /// </para>
 /// </summary>
 /// <returns> a string describing this {@code Constructor}
 /// @jls 8.8.3. Constructor Modifiers </returns>
 public override String ToString()
 {
     return(SharedToString(Modifier.ConstructorModifiers(), false, ParameterTypes_Renamed, ExceptionTypes_Renamed));
 }