Class DefaultJavaExecutable

    • Field Detail

      • exceptions

        private java.util.List<JavaClass> exceptions
      • varArgs

        private boolean varArgs
      • sourceCode

        private java.lang.String sourceCode
    • Constructor Detail

      • DefaultJavaExecutable

        public DefaultJavaExecutable()
    • Method Detail

      • getParameters

        public java.util.List<JavaParameter> getParameters()
        Equivalent of Executable.getParameterTypes(), where a JavaParameter also contains the original name if available.
        Specified by:
        getParameters in interface JavaExecutable
        Returns:
        a list of JavaParameters, never null
      • getExceptions

        public java.util.List<JavaClass> getExceptions()
        Equivalent of Executable.getExceptionTypes()
        Specified by:
        getExceptions in interface JavaExecutable
        Returns:
        a list of Exceptions, never null
      • isVarArgs

        public boolean isVarArgs()
        Equivalent of Executable.isVarArgs()
        Specified by:
        isVarArgs in interface JavaExecutable
        Returns:
        true if the final parameter is a varArg, otherwise false
      • setParameters

        public void setParameters​(java.util.List<JavaParameter> javaParameters)
      • setExceptions

        public void setExceptions​(java.util.List<JavaClass> exceptions)
      • signatureMatches

        protected boolean signatureMatches​(java.util.List<JavaType> parameterTypes,
                                           boolean varArgs)
      • isPublic

        public boolean isPublic()
        Equivalent of Modifier.isPublic(int)
        Specified by:
        isPublic in interface JavaMember
        Overrides:
        isPublic in class AbstractJavaEntity
        Returns:
        true if entity is public, otherwise false
      • getParameterTypes

        public java.util.List<JavaType> getParameterTypes()
        Equivalent of Executable.getParameterTypes()
        Specified by:
        getParameterTypes in interface JavaExecutable
        Returns:
        a list of JavaParameters, never null
      • getParameterTypes

        public java.util.List<JavaType> getParameterTypes​(boolean resolve)
        If a class inherits this method from a generic class or interface, you can use this method to get the resolved parameter types
        Specified by:
        getParameterTypes in interface JavaExecutable
        Parameters:
        resolve - true if the resolved types should be returned, otherwise false
        Returns:
        the parameter types
      • getSourceCode

        public java.lang.String getSourceCode()
        Get the original source code of the body of this method.
        Specified by:
        getSourceCode in interface JavaExecutable
        Returns:
        Code as string.
      • setSourceCode

        public void setSourceCode​(java.lang.String sourceCode)
      • getReturns

        protected JavaType getReturns()
      • getSignature

        protected java.lang.String getSignature​(boolean withModifiers,
                                                boolean isDeclaration)
        Since:
        1.3