All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.thoughtworks.qdox.model.JavaExecutable Maven / Gradle / Ivy

Go to download

QDox is a high speed, small footprint parser for extracting class/interface/method definitions from source files complete with JavaDoc @tags. It is designed to be used by active code generators or documentation tools.

There is a newer version: 2.1.0
Show newest version
package com.thoughtworks.qdox.model;

import java.util.List;

/**
 * A shared interface for the common functionality of Method and Constructor.
 * 
 * @author Robert Scholte
 * @since 2.0
 * 
 * @see java.lang.reflect.Executable
 */
public interface JavaExecutable extends JavaAnnotatedElement, JavaGenericDeclaration, JavaMember
{
    JavaClass getDeclaringClass();
    
    /**
     * Equivalent of {@link java.lang.reflect.Executable#getExceptionTypes()}
     * 
     * @return a list of Exceptions, never null
     */
    List getExceptions();
    
    List getExceptionTypes();
    
    /**
     * 
     * @param name the name of the parameter
     * @return the {@link JavaParameter} matching the name, otherwise null
     */
    JavaParameter getParameterByName( String name );
    
    /**
     * Equivalent of {@link java.lang.reflect.Executable#getParameterTypes()}, where a JavaParameter also contains the original name if available.
     * 
     * @return a list of JavaParameters, never null
     */
    List getParameters();
    
    /**
     * Equivalent of {@link java.lang.reflect.Executable#getParameterTypes()}
     * 
     * @return a list of JavaParameters, never null
     * @since 1.12 
     */
    List getParameterTypes();

    /**
     * If a class inherits this method from a generic class or interface, you can use this method to get the resolved parameter types
     * 
     * @param resolve {@code true} if the resolved types should be returned, otherwise {@code false}
     * @return the parameter types
     * @since 1.12
     */
    List getParameterTypes( boolean resolve );
    
    /**
     * Get the original source code of the body of this method.
     *
     * @return Code as string.
     */
    String getSourceCode();
    
    /**
     * Equivalent of {@link java.lang.reflect.Executable#isVarArgs()} 
     * 
     * @return true if the final parameter is a varArg, otherwise false
     */
    boolean isVarArgs();

    String getCallSignature();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy