Skip to content

Commit

Permalink
Add stubs for Spring web.util tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sauyon Lee committed Jul 14, 2021
1 parent 6dc612c commit 3a1fc9b
Show file tree
Hide file tree
Showing 69 changed files with 1,681 additions and 254 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Generated automatically from javax.servlet.AsyncContext for testing purposes

package javax.servlet;

import javax.servlet.AsyncListener;
import javax.servlet.ServletContext;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

public interface AsyncContext
{
<T extends AsyncListener> T createListener(Class<T> p0);
ServletRequest getRequest();
ServletResponse getResponse();
boolean hasOriginalRequestAndResponse();
long getTimeout();
static String ASYNC_CONTEXT_PATH = null;
static String ASYNC_MAPPING = null;
static String ASYNC_PATH_INFO = null;
static String ASYNC_QUERY_STRING = null;
static String ASYNC_REQUEST_URI = null;
static String ASYNC_SERVLET_PATH = null;
void addListener(AsyncListener p0);
void addListener(AsyncListener p0, ServletRequest p1, ServletResponse p2);
void complete();
void dispatch();
void dispatch(ServletContext p0, String p1);
void dispatch(String p0);
void setTimeout(long p0);
void start(Runnable p0);
}
20 changes: 20 additions & 0 deletions java/ql/test/stubs/javax-servlet-2.5/javax/servlet/AsyncEvent.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Generated automatically from javax.servlet.AsyncEvent for testing purposes

package javax.servlet;

import javax.servlet.AsyncContext;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

public class AsyncEvent
{
protected AsyncEvent() {}
public AsyncContext getAsyncContext(){ return null; }
public AsyncEvent(AsyncContext p0){}
public AsyncEvent(AsyncContext p0, ServletRequest p1, ServletResponse p2){}
public AsyncEvent(AsyncContext p0, ServletRequest p1, ServletResponse p2, Throwable p3){}
public AsyncEvent(AsyncContext p0, Throwable p1){}
public ServletRequest getSuppliedRequest(){ return null; }
public ServletResponse getSuppliedResponse(){ return null; }
public Throwable getThrowable(){ return null; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Generated automatically from javax.servlet.AsyncListener for testing purposes

package javax.servlet;

import java.util.EventListener;
import javax.servlet.AsyncEvent;

public interface AsyncListener extends EventListener
{
void onComplete(AsyncEvent p0);
void onError(AsyncEvent p0);
void onStartAsync(AsyncEvent p0);
void onTimeout(AsyncEvent p0);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Generated automatically from javax.servlet.DispatcherType for testing purposes

package javax.servlet;


public enum DispatcherType
{
ASYNC, ERROR, FORWARD, INCLUDE, REQUEST;
private DispatcherType() {}
}
15 changes: 15 additions & 0 deletions java/ql/test/stubs/javax-servlet-2.5/javax/servlet/Filter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Generated automatically from javax.servlet.Filter for testing purposes

package javax.servlet;

import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

public interface Filter
{
default void destroy(){}
default void init(FilterConfig p0){}
void doFilter(ServletRequest p0, ServletResponse p1, FilterChain p2);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Generated automatically from javax.servlet.FilterChain for testing purposes

package javax.servlet;

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

public interface FilterChain
{
void doFilter(ServletRequest p0, ServletResponse p1);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Generated automatically from javax.servlet.FilterConfig for testing purposes

package javax.servlet;

import java.util.Enumeration;
import javax.servlet.ServletContext;

public interface FilterConfig
{
Enumeration<String> getInitParameterNames();
ServletContext getServletContext();
String getFilterName();
String getInitParameter(String p0);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Generated automatically from javax.servlet.FilterRegistration for testing purposes

package javax.servlet;

import java.util.Collection;
import java.util.EnumSet;
import javax.servlet.DispatcherType;
import javax.servlet.Registration;

public interface FilterRegistration extends Registration
{
Collection<String> getServletNameMappings();
Collection<String> getUrlPatternMappings();
static public interface Dynamic extends FilterRegistration, Registration.Dynamic
{
}
void addMappingForServletNames(EnumSet<DispatcherType> p0, boolean p1, String... p2);
void addMappingForUrlPatterns(EnumSet<DispatcherType> p0, boolean p1, String... p2);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Generated automatically from javax.servlet.HttpConstraintElement for testing purposes

package javax.servlet;

import javax.servlet.annotation.ServletSecurity;

public class HttpConstraintElement
{
public HttpConstraintElement(){}
public HttpConstraintElement(ServletSecurity.EmptyRoleSemantic p0){}
public HttpConstraintElement(ServletSecurity.EmptyRoleSemantic p0, ServletSecurity.TransportGuarantee p1, String... p2){}
public HttpConstraintElement(ServletSecurity.TransportGuarantee p0, String... p1){}
public ServletSecurity.EmptyRoleSemantic getEmptyRoleSemantic(){ return null; }
public ServletSecurity.TransportGuarantee getTransportGuarantee(){ return null; }
public String[] getRolesAllowed(){ return null; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Generated automatically from javax.servlet.HttpMethodConstraintElement for testing purposes

package javax.servlet;

import javax.servlet.HttpConstraintElement;

public class HttpMethodConstraintElement extends HttpConstraintElement
{
protected HttpMethodConstraintElement() {}
public HttpMethodConstraintElement(String p0){}
public HttpMethodConstraintElement(String p0, HttpConstraintElement p1){}
public String getMethodName(){ return null; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Generated automatically from javax.servlet.MultipartConfigElement for testing purposes

package javax.servlet;

import javax.servlet.annotation.MultipartConfig;

public class MultipartConfigElement
{
protected MultipartConfigElement() {}
public MultipartConfigElement(MultipartConfig p0){}
public MultipartConfigElement(String p0){}
public MultipartConfigElement(String p0, long p1, long p2, int p3){}
public String getLocation(){ return null; }
public int getFileSizeThreshold(){ return 0; }
public long getMaxFileSize(){ return 0; }
public long getMaxRequestSize(){ return 0; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Generated automatically from javax.servlet.ReadListener for testing purposes

package javax.servlet;

import java.util.EventListener;

public interface ReadListener extends EventListener
{
void onAllDataRead();
void onDataAvailable();
void onError(Throwable p0);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Generated automatically from javax.servlet.Registration for testing purposes

package javax.servlet;

import java.util.Map;
import java.util.Set;

public interface Registration
{
Map<String, String> getInitParameters();
Set<String> setInitParameters(Map<String, String> p0);
String getClassName();
String getInitParameter(String p0);
String getName();
boolean setInitParameter(String p0, String p1);
static public interface Dynamic extends Registration
{
void setAsyncSupported(boolean p0);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@

public interface RequestDispatcher
{
static String ERROR_EXCEPTION = null;
static String ERROR_EXCEPTION_TYPE = null;
static String ERROR_MESSAGE = null;
static String ERROR_REQUEST_URI = null;
static String ERROR_SERVLET_NAME = null;
static String ERROR_STATUS_CODE = null;
static String FORWARD_CONTEXT_PATH = null;
static String FORWARD_MAPPING = null;
static String FORWARD_PATH_INFO = null;
static String FORWARD_QUERY_STRING = null;
static String FORWARD_REQUEST_URI = null;
static String FORWARD_SERVLET_PATH = null;
static String INCLUDE_CONTEXT_PATH = null;
static String INCLUDE_MAPPING = null;
static String INCLUDE_PATH_INFO = null;
static String INCLUDE_QUERY_STRING = null;
static String INCLUDE_REQUEST_URI = null;
static String INCLUDE_SERVLET_PATH = null;
void forward(ServletRequest p0, ServletResponse p1);
void include(ServletRequest p0, ServletResponse p1);
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

public interface ServletConfig
{
Enumeration getInitParameterNames();
Enumeration<String> getInitParameterNames();
ServletContext getServletContext();
String getInitParameter(String p0);
String getServletName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,79 @@
import java.io.InputStream;
import java.net.URL;
import java.util.Enumeration;
import java.util.EventListener;
import java.util.Map;
import java.util.Set;
import javax.servlet.Filter;
import javax.servlet.FilterRegistration;
import javax.servlet.RequestDispatcher;
import javax.servlet.Servlet;
import javax.servlet.ServletRegistration;
import javax.servlet.SessionCookieConfig;
import javax.servlet.SessionTrackingMode;
import javax.servlet.descriptor.JspConfigDescriptor;

public interface ServletContext
{
Enumeration getAttributeNames();
Enumeration getInitParameterNames();
Enumeration getServletNames();
Enumeration getServlets();
<T extends EventListener> T createListener(Class<T> p0);
<T extends EventListener> void addListener(T p0);
<T extends Filter> T createFilter(Class<T> p0);
<T extends Servlet> T createServlet(Class<T> p0);
ClassLoader getClassLoader();
Enumeration<Servlet> getServlets();
Enumeration<String> getAttributeNames();
Enumeration<String> getInitParameterNames();
Enumeration<String> getServletNames();
FilterRegistration getFilterRegistration(String p0);
FilterRegistration.Dynamic addFilter(String p0, Class<? extends Filter> p1);
FilterRegistration.Dynamic addFilter(String p0, Filter p1);
FilterRegistration.Dynamic addFilter(String p0, String p1);
InputStream getResourceAsStream(String p0);
JspConfigDescriptor getJspConfigDescriptor();
Map<String, ? extends FilterRegistration> getFilterRegistrations();
Map<String, ? extends ServletRegistration> getServletRegistrations();
Object getAttribute(String p0);
RequestDispatcher getNamedDispatcher(String p0);
RequestDispatcher getRequestDispatcher(String p0);
Servlet getServlet(String p0);
ServletContext getContext(String p0);
Set getResourcePaths(String p0);
ServletRegistration getServletRegistration(String p0);
ServletRegistration.Dynamic addJspFile(String p0, String p1);
ServletRegistration.Dynamic addServlet(String p0, Class<? extends Servlet> p1);
ServletRegistration.Dynamic addServlet(String p0, Servlet p1);
ServletRegistration.Dynamic addServlet(String p0, String p1);
SessionCookieConfig getSessionCookieConfig();
Set<SessionTrackingMode> getDefaultSessionTrackingModes();
Set<SessionTrackingMode> getEffectiveSessionTrackingModes();
Set<String> getResourcePaths(String p0);
String getContextPath();
String getInitParameter(String p0);
String getMimeType(String p0);
String getRealPath(String p0);
String getRequestCharacterEncoding();
String getResponseCharacterEncoding();
String getServerInfo();
String getServletContextName();
String getVirtualServerName();
URL getResource(String p0);
boolean setInitParameter(String p0, String p1);
int getEffectiveMajorVersion();
int getEffectiveMinorVersion();
int getMajorVersion();
int getMinorVersion();
int getSessionTimeout();
static String ORDERED_LIBS = null;
static String TEMPDIR = null;
void addListener(Class<? extends EventListener> p0);
void addListener(String p0);
void declareRoles(String... p0);
void log(Exception p0, String p1);
void log(String p0);
void log(String p0, Throwable p1);
void removeAttribute(String p0);
void setAttribute(String p0, Object p1);
void setRequestCharacterEncoding(String p0);
void setResponseCharacterEncoding(String p0);
void setSessionTimeout(int p0);
void setSessionTrackingModes(Set<SessionTrackingMode> p0);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
package javax.servlet;

import java.io.InputStream;
import javax.servlet.ReadListener;

abstract public class ServletInputStream extends InputStream
{
protected ServletInputStream(){}
public abstract boolean isFinished();
public abstract boolean isReady();
public abstract void setReadListener(ReadListener p0);
public int readLine(byte[] p0, int p1, int p2){ return 0; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
package javax.servlet;

import java.io.OutputStream;
import javax.servlet.WriteListener;

abstract public class ServletOutputStream extends OutputStream
{
protected ServletOutputStream(){}
public abstract boolean isReady();
public abstract void setWriteListener(WriteListener p0);
public void print(String p0){}
public void print(boolean p0){}
public void print(char p0){}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Generated automatically from javax.servlet.ServletRegistration for testing purposes

package javax.servlet;

import java.util.Collection;
import java.util.Set;
import javax.servlet.MultipartConfigElement;
import javax.servlet.Registration;
import javax.servlet.ServletSecurityElement;

public interface ServletRegistration extends Registration
{
Collection<String> getMappings();
Set<String> addMapping(String... p0);
String getRunAsRole();
static public interface Dynamic extends Registration.Dynamic, ServletRegistration
{
Set<String> setServletSecurity(ServletSecurityElement p0);
void setLoadOnStartup(int p0);
void setMultipartConfig(MultipartConfigElement p0);
void setRunAsRole(String p0);
}
}
Loading

0 comments on commit 3a1fc9b

Please sign in to comment.