diff --git a/java/ql/lib/semmle/code/java/dataflow/ExternalFlow.qll b/java/ql/lib/semmle/code/java/dataflow/ExternalFlow.qll index de6143154f44..949ceb989da0 100644 --- a/java/ql/lib/semmle/code/java/dataflow/ExternalFlow.qll +++ b/java/ql/lib/semmle/code/java/dataflow/ExternalFlow.qll @@ -96,6 +96,7 @@ private module Frameworks { private import semmle.code.java.frameworks.spring.SpringValidation private import semmle.code.java.frameworks.spring.SpringWebClient private import semmle.code.java.frameworks.spring.SpringBeans + private import semmle.code.java.frameworks.spring.SpringWebMethod private import semmle.code.java.frameworks.spring.SpringWebMultipart private import semmle.code.java.frameworks.spring.SpringWebUtil private import semmle.code.java.security.ResponseSplitting diff --git a/java/ql/lib/semmle/code/java/frameworks/spring/SpringWebMethod.qll b/java/ql/lib/semmle/code/java/frameworks/spring/SpringWebMethod.qll new file mode 100644 index 000000000000..f157217625db --- /dev/null +++ b/java/ql/lib/semmle/code/java/frameworks/spring/SpringWebMethod.qll @@ -0,0 +1,30 @@ +/** Provides models of taint flow in `org.springframework.web.method` */ + +import java +private import semmle.code.java.dataflow.ExternalFlow + +// currently only models classes in the `support` subpackage +private class FlowSummaries extends SummaryModelCsv { + override predicate row(string row) { + row = + [ + // for review: arguably this shouldn't be modeled as the implementations of resolveArgument that I've seen are effectively sanitized + "org.springframework.web.method.support;HandlerMethodArgumentResolver;true;resolveArgument;;;Argument[2];ReturnValue;taint", + "org.springframework.web.method.support;UriComponentsContributor;true;contributeMethodArgument;;;Argument[1];Argument[2];taint", + "org.springframework.web.method.support;UriComponentsContributor;true;contributeMethodArgument;;;Argument[1];Argument[3];taint", + // InvocableHandlerMethod is not modeled as it is difficult to model method-like classes with CSV + // This is a very broad definition of data flow; there is a method `setRedirectModelScenario(boolean)` which is used to determine which of the `Default` and `Redirect` models are returned by `getModel`, and the methods that deal with attributes below are convenience methods for `.getModel().*`. + "org.springframework.web.method.support;ModelAndViewContainer;false;getModel;;;SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];ReturnValue;value", + "org.springframework.web.method.support;ModelAndViewContainer;false;getDefaultModel;;;SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];ReturnValue;value", + "org.springframework.web.method.support;ModelAndViewContainer;false;setRedirectModel;;;Argument[0];SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];value", + "org.springframework.web.method.support;ModelAndViewContainer;false;addAttribute;;;Argument[0];MapKey of SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];value", + "org.springframework.web.method.support;ModelAndViewContainer;false;addAttribute;;;Argument[1];MapValue of SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];value", + "org.springframework.web.method.support;ModelAndViewContainer;false;addAllAttributes;;;MapKey of Argument[0];MapKey of SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];value", + "org.springframework.web.method.support;ModelAndViewContainer;false;addAllAttributes;;;MapValue of Argument[0];MapValue of SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];value", + "org.springframework.web.method.support;ModelAndViewContainer;false;mergeAttributes;;;MapKey of Argument[0];MapKey of SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];value", + "org.springframework.web.method.support;ModelAndViewContainer;false;mergeAttributes;;;MapValue of Argument[0];MapValue of SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];value", + "org.springframework.web.method.support;ModelAndViewContainer;false;setView;;;Argument[0];SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.View] of Argument[-1];value", + "org.springframework.web.method.support;ModelAndViewContainer;false;getView;;;SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.View] of Argument[-1];ReturnValue;value" + ] + } +} diff --git a/java/ql/test/library-tests/frameworks/spring/web/MethodTest.java b/java/ql/test/library-tests/frameworks/spring/web/MethodTest.java new file mode 100644 index 000000000000..bebaefcc90eb --- /dev/null +++ b/java/ql/test/library-tests/frameworks/spring/web/MethodTest.java @@ -0,0 +1,136 @@ +package generatedtest; + +import java.util.Map; +import org.springframework.ui.ModelMap; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.method.support.HandlerMethodArgumentResolver; +import org.springframework.web.method.support.ModelAndViewContainer; +import org.springframework.web.method.support.UriComponentsContributor; +import org.springframework.web.util.UriComponentsBuilder; + +// Test case generated by GenerateFlowTestCase.ql +public class MethodTest { + + Object getMapKey(Map container) { return container.keySet().iterator().next(); } + Object getMapValue(Map container) { return container.get(null); } + ModelMap getModelAndViewContainer_Model(ModelAndViewContainer container) { return container.getModel(); } + Object getModelAndViewContainer_View(ModelAndViewContainer container) { return container.getView(); } + ModelAndViewContainer newWithModelAndViewContainer_Model(Object element) { ModelAndViewContainer ret = new ModelAndViewContainer(); ret.setRedirectModel((ModelMap)element); return ret; } + ModelAndViewContainer newWithModelAndViewContainer_View(Object element) { ModelAndViewContainer ret = new ModelAndViewContainer(); ret.setView(element); return ret; } + Object source() { return null; } + void sink(Object o) { } + + public void test() throws Exception { + + { + // "org.springframework.web.method.support;HandlerMethodArgumentResolver;true;resolveArgument;;;Argument[2];ReturnValue;taint" + Object out = null; + NativeWebRequest in = (NativeWebRequest)source(); + HandlerMethodArgumentResolver instance = null; + out = instance.resolveArgument(null, null, in, null); + sink(out); // $ hasTaintFlow + } + { + // "org.springframework.web.method.support;ModelAndViewContainer;false;addAllAttributes;;;MapKey of Argument[0];MapKey of SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];value" + ModelAndViewContainer out = null; + Map in = Map.of(source(), null); + out.addAllAttributes(in); + sink(getMapKey(getModelAndViewContainer_Model(out))); // $ hasValueFlow + } + { + // "org.springframework.web.method.support;ModelAndViewContainer;false;addAllAttributes;;;MapValue of Argument[0];MapValue of SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];value" + ModelAndViewContainer out = null; + Map in = Map.of(null, source()); + out.addAllAttributes(in); + sink(getMapValue(getModelAndViewContainer_Model(out))); // $ hasValueFlow + } + { + // "org.springframework.web.method.support;ModelAndViewContainer;false;addAttribute;;;Argument[0];MapKey of SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];value" + ModelAndViewContainer out = null; + String in = (String)source(); + out.addAttribute(in, null); + sink(getMapKey(getModelAndViewContainer_Model(out))); // $ hasValueFlow + } + { + // "org.springframework.web.method.support;ModelAndViewContainer;false;addAttribute;;;Argument[0];MapKey of SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];value" + ModelAndViewContainer out = null; + Object in = (Object)source(); + out.addAttribute(in); + sink(getMapKey(getModelAndViewContainer_Model(out))); // $ hasValueFlow + } + { + // "org.springframework.web.method.support;ModelAndViewContainer;false;addAttribute;;;Argument[1];MapValue of SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];value" + ModelAndViewContainer out = null; + Object in = (Object)source(); + out.addAttribute(null, in); + sink(getMapValue(getModelAndViewContainer_Model(out))); // $ hasValueFlow + } + { + // "org.springframework.web.method.support;ModelAndViewContainer;false;getDefaultModel;;;SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];ReturnValue;value" + ModelMap out = null; + ModelAndViewContainer in = (ModelAndViewContainer)newWithModelAndViewContainer_Model(source()); + out = in.getDefaultModel(); + sink(out); // $ hasValueFlow + } + { + // "org.springframework.web.method.support;ModelAndViewContainer;false;getModel;;;SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];ReturnValue;value" + ModelMap out = null; + ModelAndViewContainer in = (ModelAndViewContainer)newWithModelAndViewContainer_Model(source()); + out = in.getModel(); + sink(out); // $ hasValueFlow + } + { + // "org.springframework.web.method.support;ModelAndViewContainer;false;getView;;;SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.View] of Argument[-1];ReturnValue;value" + Object out = null; + ModelAndViewContainer in = (ModelAndViewContainer)newWithModelAndViewContainer_View(source()); + out = in.getView(); + sink(out); // $ hasValueFlow + } + { + // "org.springframework.web.method.support;ModelAndViewContainer;false;mergeAttributes;;;MapKey of Argument[0];MapKey of SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];value" + ModelAndViewContainer out = null; + Map in = Map.of(source(), null); + out.mergeAttributes(in); + sink(getMapKey(getModelAndViewContainer_Model(out))); // $ hasValueFlow + } + { + // "org.springframework.web.method.support;ModelAndViewContainer;false;mergeAttributes;;;MapValue of Argument[0];MapValue of SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];value" + ModelAndViewContainer out = null; + Map in = Map.of(null, source()); + out.mergeAttributes(in); + sink(getMapValue(getModelAndViewContainer_Model(out))); // $ hasValueFlow + } + { + // "org.springframework.web.method.support;ModelAndViewContainer;false;setRedirectModel;;;Argument[0];SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.Model] of Argument[-1];value" + ModelAndViewContainer out = null; + ModelMap in = (ModelMap)source(); + out.setRedirectModel(in); + sink(getModelAndViewContainer_Model(out)); // $ hasValueFlow + } + { + // "org.springframework.web.method.support;ModelAndViewContainer;false;setView;;;Argument[0];SyntheticField[org.springframework.web.method.support.ModelAndViewContainer.View] of Argument[-1];value" + ModelAndViewContainer out = null; + Object in = (Object)source(); + out.setView(in); + sink(getModelAndViewContainer_View(out)); // $ hasValueFlow + } + { + // "org.springframework.web.method.support;UriComponentsContributor;true;contributeMethodArgument;;;Argument[1];Argument[2];taint" + UriComponentsBuilder out = null; + Object in = (Object)source(); + UriComponentsContributor instance = null; + instance.contributeMethodArgument(null, in, out, null, null); + sink(out); // $ hasTaintFlow + } + { + // "org.springframework.web.method.support;UriComponentsContributor;true;contributeMethodArgument;;;Argument[1];Argument[3];taint" + Map out = null; + Object in = (Object)source(); + UriComponentsContributor instance = null; + instance.contributeMethodArgument(null, in, null, out, null); + sink(out); // $ hasTaintFlow + } + + } + +} diff --git a/java/ql/test/library-tests/frameworks/spring/webmultipart/Test.java b/java/ql/test/library-tests/frameworks/spring/web/MultipartTest.java similarity index 99% rename from java/ql/test/library-tests/frameworks/spring/webmultipart/Test.java rename to java/ql/test/library-tests/frameworks/spring/web/MultipartTest.java index 39c393932649..bc123b32a4f2 100644 --- a/java/ql/test/library-tests/frameworks/spring/webmultipart/Test.java +++ b/java/ql/test/library-tests/frameworks/spring/web/MultipartTest.java @@ -15,7 +15,7 @@ import org.springframework.web.multipart.MultipartResolver; // Test case generated by GenerateFlowTestCase.ql -public class Test { +public class MultipartTest { Object getElement(Iterator container) { return container.next(); } Object getElement(Collection container) { return container.iterator().next(); } diff --git a/java/ql/test/library-tests/frameworks/spring/webutil/Test.java b/java/ql/test/library-tests/frameworks/spring/web/UtilTest.java similarity index 99% rename from java/ql/test/library-tests/frameworks/spring/webutil/Test.java rename to java/ql/test/library-tests/frameworks/spring/web/UtilTest.java index 1e93454fbd74..18a9c7920d98 100644 --- a/java/ql/test/library-tests/frameworks/spring/webutil/Test.java +++ b/java/ql/test/library-tests/frameworks/spring/web/UtilTest.java @@ -38,7 +38,7 @@ import org.springframework.web.util.WebUtils; // Test case generated by GenerateFlowTestCase.ql -public class Test { +public class UtilTest { class StubUriTemplateVariables extends HashMap implements UriComponents.UriTemplateVariables { StubUriTemplateVariables(Map m) { super(m); } diff --git a/java/ql/test/library-tests/frameworks/spring/webutil/options b/java/ql/test/library-tests/frameworks/spring/web/options similarity index 100% rename from java/ql/test/library-tests/frameworks/spring/webutil/options rename to java/ql/test/library-tests/frameworks/spring/web/options diff --git a/java/ql/test/library-tests/frameworks/spring/webmultipart/test.expected b/java/ql/test/library-tests/frameworks/spring/web/test.expected similarity index 100% rename from java/ql/test/library-tests/frameworks/spring/webmultipart/test.expected rename to java/ql/test/library-tests/frameworks/spring/web/test.expected diff --git a/java/ql/test/library-tests/frameworks/spring/webutil/test.ql b/java/ql/test/library-tests/frameworks/spring/web/test.ql similarity index 96% rename from java/ql/test/library-tests/frameworks/spring/webutil/test.ql rename to java/ql/test/library-tests/frameworks/spring/web/test.ql index 6158159e1e5b..1dfa9b03ec9a 100644 --- a/java/ql/test/library-tests/frameworks/spring/webutil/test.ql +++ b/java/ql/test/library-tests/frameworks/spring/web/test.ql @@ -25,6 +25,8 @@ class TaintFlowConf extends TaintTracking::Configuration { override predicate isSink(DataFlow::Node n) { n.asExpr().(Argument).getCall().getCallee().hasName("sink") } + + override int fieldFlowBranchLimit() { result = 10 } } class HasFlowTest extends InlineExpectationsTest { diff --git a/java/ql/test/library-tests/frameworks/spring/webmultipart/options b/java/ql/test/library-tests/frameworks/spring/webmultipart/options deleted file mode 100644 index ff7fd8624384..000000000000 --- a/java/ql/test/library-tests/frameworks/spring/webmultipart/options +++ /dev/null @@ -1 +0,0 @@ -//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/springframework-5.3.8:${testdir}/../../../../stubs/javax-servlet-2.5 diff --git a/java/ql/test/library-tests/frameworks/spring/webmultipart/test.ql b/java/ql/test/library-tests/frameworks/spring/webmultipart/test.ql deleted file mode 100644 index 6158159e1e5b..000000000000 --- a/java/ql/test/library-tests/frameworks/spring/webmultipart/test.ql +++ /dev/null @@ -1,52 +0,0 @@ -import java -import semmle.code.java.dataflow.DataFlow -import semmle.code.java.dataflow.TaintTracking -import TestUtilities.InlineExpectationsTest - -class ValueFlowConf extends DataFlow::Configuration { - ValueFlowConf() { this = "qltest:valueFlowConf" } - - override predicate isSource(DataFlow::Node n) { - n.asExpr().(MethodAccess).getMethod().hasName("source") - } - - override predicate isSink(DataFlow::Node n) { - n.asExpr().(Argument).getCall().getCallee().hasName("sink") - } -} - -class TaintFlowConf extends TaintTracking::Configuration { - TaintFlowConf() { this = "qltest:taintFlowConf" } - - override predicate isSource(DataFlow::Node n) { - n.asExpr().(MethodAccess).getMethod().hasName("source") - } - - override predicate isSink(DataFlow::Node n) { - n.asExpr().(Argument).getCall().getCallee().hasName("sink") - } -} - -class HasFlowTest extends InlineExpectationsTest { - HasFlowTest() { this = "HasFlowTest" } - - override string getARelevantTag() { result = ["hasValueFlow", "hasTaintFlow"] } - - override predicate hasActualResult(Location location, string element, string tag, string value) { - tag = "hasValueFlow" and - exists(DataFlow::Node src, DataFlow::Node sink, ValueFlowConf conf | conf.hasFlow(src, sink) | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - or - tag = "hasTaintFlow" and - exists(DataFlow::Node src, DataFlow::Node sink, TaintFlowConf conf | - conf.hasFlow(src, sink) and not any(ValueFlowConf c).hasFlow(src, sink) - | - sink.getLocation() = location and - element = sink.toString() and - value = "" - ) - } -} diff --git a/java/ql/test/library-tests/frameworks/spring/webutil/test.expected b/java/ql/test/library-tests/frameworks/spring/webutil/test.expected deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/BeanMetadataAttribute.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/BeanMetadataAttribute.java new file mode 100644 index 000000000000..9371c6bc0311 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/BeanMetadataAttribute.java @@ -0,0 +1,18 @@ +// Generated automatically from org.springframework.beans.BeanMetadataAttribute for testing purposes + +package org.springframework.beans; + +import org.springframework.beans.BeanMetadataElement; + +public class BeanMetadataAttribute implements BeanMetadataElement +{ + protected BeanMetadataAttribute() {} + public BeanMetadataAttribute(String p0, Object p1){} + public Object getSource(){ return null; } + public Object getValue(){ return null; } + public String getName(){ return null; } + public String toString(){ return null; } + public boolean equals(Object p0){ return false; } + public int hashCode(){ return 0; } + public void setSource(Object p0){} +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/BeanMetadataAttributeAccessor.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/BeanMetadataAttributeAccessor.java new file mode 100644 index 000000000000..aa60764f017b --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/BeanMetadataAttributeAccessor.java @@ -0,0 +1,19 @@ +// Generated automatically from org.springframework.beans.BeanMetadataAttributeAccessor for testing purposes + +package org.springframework.beans; + +import org.springframework.beans.BeanMetadataAttribute; +import org.springframework.beans.BeanMetadataElement; +import org.springframework.core.AttributeAccessorSupport; + +public class BeanMetadataAttributeAccessor extends AttributeAccessorSupport implements BeanMetadataElement +{ + public BeanMetadataAttribute getMetadataAttribute(String p0){ return null; } + public BeanMetadataAttributeAccessor(){} + public Object getAttribute(String p0){ return null; } + public Object getSource(){ return null; } + public Object removeAttribute(String p0){ return null; } + public void addMetadataAttribute(BeanMetadataAttribute p0){} + public void setAttribute(String p0, Object p1){} + public void setSource(Object p0){} +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/BeanMetadataElement.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/BeanMetadataElement.java new file mode 100644 index 000000000000..68a3236f5fb8 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/BeanMetadataElement.java @@ -0,0 +1,9 @@ +// Generated automatically from org.springframework.beans.BeanMetadataElement for testing purposes + +package org.springframework.beans; + + +public interface BeanMetadataElement +{ + default Object getSource(){ return null; } +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/BeansException.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/BeansException.java new file mode 100644 index 000000000000..a7371f5c4323 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/BeansException.java @@ -0,0 +1,12 @@ +// Generated automatically from org.springframework.beans.BeansException for testing purposes + +package org.springframework.beans; + +import org.springframework.core.NestedRuntimeException; + +abstract public class BeansException extends NestedRuntimeException +{ + protected BeansException() {} + public BeansException(String p0){} + public BeansException(String p0, Throwable p1){} +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/ConfigurablePropertyAccessor.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/ConfigurablePropertyAccessor.java new file mode 100644 index 000000000000..b170f4f0f40a --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/ConfigurablePropertyAccessor.java @@ -0,0 +1,18 @@ +// Generated automatically from org.springframework.beans.ConfigurablePropertyAccessor for testing purposes + +package org.springframework.beans; + +import org.springframework.beans.PropertyAccessor; +import org.springframework.beans.PropertyEditorRegistry; +import org.springframework.beans.TypeConverter; +import org.springframework.core.convert.ConversionService; + +public interface ConfigurablePropertyAccessor extends PropertyAccessor, PropertyEditorRegistry, TypeConverter +{ + ConversionService getConversionService(); + boolean isAutoGrowNestedPaths(); + boolean isExtractOldValueForEditor(); + void setAutoGrowNestedPaths(boolean p0); + void setConversionService(ConversionService p0); + void setExtractOldValueForEditor(boolean p0); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/MutablePropertyValues.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/MutablePropertyValues.java index fed50425d907..3b13109d2271 100644 --- a/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/MutablePropertyValues.java +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/MutablePropertyValues.java @@ -1,16 +1,4 @@ -/* - * Copyright 2002-2020 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ +// Generated automatically from org.springframework.beans.MutablePropertyValues for testing purposes package org.springframework.beans; @@ -20,116 +8,39 @@ import java.util.Map; import java.util.Spliterator; import java.util.stream.Stream; -import org.springframework.lang.Nullable; - -public class MutablePropertyValues implements PropertyValues, Serializable { - public MutablePropertyValues() {} - - public MutablePropertyValues(@Nullable PropertyValues original) {} - - public MutablePropertyValues(@Nullable Map original) {} - - public MutablePropertyValues(@Nullable List propertyValueList) {} - - public List getPropertyValueList() { - return null; - } - - public int size() { - return 0; - } - - public MutablePropertyValues addPropertyValues(@Nullable PropertyValues other) { - return null; - } - - public MutablePropertyValues addPropertyValues(@Nullable Map other) { - return null; - } - - public MutablePropertyValues addPropertyValue(PropertyValue pv) { - return null; - } - - public void addPropertyValue(String propertyName, Object propertyValue) {} - - public MutablePropertyValues add(String propertyName, @Nullable Object propertyValue) { - return null; - } - - public void setPropertyValueAt(PropertyValue pv, int i) {} - - public void removePropertyValue(PropertyValue pv) {} - - public void removePropertyValue(String propertyName) {} - - @Override - public Iterator iterator() { - return null; - } - - @Override - public Spliterator spliterator() { - return null; - } - - @Override - public Stream stream() { - return null; - } - - @Override - public PropertyValue[] getPropertyValues() { - return null; - } - - @Override - public PropertyValue getPropertyValue(String propertyName) { - return null; - } - - public Object get(String propertyName) { - return null; - } - - @Override - public PropertyValues changesSince(PropertyValues old) { - return null; - } - - @Override - public boolean contains(String propertyName) { - return false; - } - - @Override - public boolean isEmpty() { - return false; - } - - public void registerProcessedProperty(String propertyName) {} - - public void clearProcessedProperty(String propertyName) {} - - public void setConverted() {} - - public boolean isConverted() { - return false; - } - - @Override - public boolean equals(@Nullable Object other) { - return false; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public String toString() { - return null; - } - +import org.springframework.beans.PropertyValue; +import org.springframework.beans.PropertyValues; + +public class MutablePropertyValues implements PropertyValues, Serializable +{ + public Iterator iterator(){ return null; } + public List getPropertyValueList(){ return null; } + public MutablePropertyValues add(String p0, Object p1){ return null; } + public MutablePropertyValues addPropertyValue(PropertyValue p0){ return null; } + public MutablePropertyValues addPropertyValues(Map p0){ return null; } + public MutablePropertyValues addPropertyValues(PropertyValues p0){ return null; } + public MutablePropertyValues(){} + public MutablePropertyValues(List p0){} + public MutablePropertyValues(Map p0){} + public MutablePropertyValues(PropertyValues p0){} + public Object get(String p0){ return null; } + public PropertyValue getPropertyValue(String p0){ return null; } + public PropertyValue[] getPropertyValues(){ return null; } + public PropertyValues changesSince(PropertyValues p0){ return null; } + public Spliterator spliterator(){ return null; } + public Stream stream(){ return null; } + public String toString(){ return null; } + public boolean contains(String p0){ return false; } + public boolean equals(Object p0){ return false; } + public boolean isConverted(){ return false; } + public boolean isEmpty(){ return false; } + public int hashCode(){ return 0; } + public int size(){ return 0; } + public void addPropertyValue(String p0, Object p1){} + public void clearProcessedProperty(String p0){} + public void registerProcessedProperty(String p0){} + public void removePropertyValue(PropertyValue p0){} + public void removePropertyValue(String p0){} + public void setConverted(){} + public void setPropertyValueAt(PropertyValue p0, int p1){} } diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyAccessException.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyAccessException.java new file mode 100644 index 000000000000..f77913b0b13a --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyAccessException.java @@ -0,0 +1,17 @@ +// Generated automatically from org.springframework.beans.PropertyAccessException for testing purposes + +package org.springframework.beans; + +import java.beans.PropertyChangeEvent; +import org.springframework.beans.BeansException; + +abstract public class PropertyAccessException extends BeansException +{ + protected PropertyAccessException() {} + public Object getValue(){ return null; } + public PropertyAccessException(PropertyChangeEvent p0, String p1, Throwable p2){} + public PropertyAccessException(String p0, Throwable p1){} + public PropertyChangeEvent getPropertyChangeEvent(){ return null; } + public String getPropertyName(){ return null; } + public abstract String getErrorCode(); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyAccessor.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyAccessor.java new file mode 100644 index 000000000000..a2828b36444d --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyAccessor.java @@ -0,0 +1,29 @@ +// Generated automatically from org.springframework.beans.PropertyAccessor for testing purposes + +package org.springframework.beans; + +import java.util.Map; +import org.springframework.beans.PropertyValue; +import org.springframework.beans.PropertyValues; +import org.springframework.core.convert.TypeDescriptor; + +public interface PropertyAccessor +{ + Class getPropertyType(String p0); + Object getPropertyValue(String p0); + TypeDescriptor getPropertyTypeDescriptor(String p0); + boolean isReadableProperty(String p0); + boolean isWritableProperty(String p0); + static String NESTED_PROPERTY_SEPARATOR = null; + static String PROPERTY_KEY_PREFIX = null; + static String PROPERTY_KEY_SUFFIX = null; + static char NESTED_PROPERTY_SEPARATOR_CHAR = '0'; + static char PROPERTY_KEY_PREFIX_CHAR = '0'; + static char PROPERTY_KEY_SUFFIX_CHAR = '0'; + void setPropertyValue(PropertyValue p0); + void setPropertyValue(String p0, Object p1); + void setPropertyValues(Map p0); + void setPropertyValues(PropertyValues p0); + void setPropertyValues(PropertyValues p0, boolean p1); + void setPropertyValues(PropertyValues p0, boolean p1, boolean p2); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyEditorRegistry.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyEditorRegistry.java new file mode 100644 index 000000000000..dfb3cc622c41 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyEditorRegistry.java @@ -0,0 +1,12 @@ +// Generated automatically from org.springframework.beans.PropertyEditorRegistry for testing purposes + +package org.springframework.beans; + +import java.beans.PropertyEditor; + +public interface PropertyEditorRegistry +{ + PropertyEditor findCustomEditor(Class p0, String p1); + void registerCustomEditor(Class p0, PropertyEditor p1); + void registerCustomEditor(Class p0, String p1, PropertyEditor p2); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyEditorRegistrySupport.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyEditorRegistrySupport.java new file mode 100644 index 000000000000..e2918abb1e65 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyEditorRegistrySupport.java @@ -0,0 +1,26 @@ +// Generated automatically from org.springframework.beans.PropertyEditorRegistrySupport for testing purposes + +package org.springframework.beans; + +import java.beans.PropertyEditor; +import org.springframework.beans.PropertyEditorRegistry; +import org.springframework.core.convert.ConversionService; + +public class PropertyEditorRegistrySupport implements PropertyEditorRegistry +{ + protected Class getPropertyType(String p0){ return null; } + protected Class guessPropertyTypeFromEditors(String p0){ return null; } + protected void copyCustomEditorsTo(PropertyEditorRegistry p0, String p1){} + protected void copyDefaultEditorsTo(PropertyEditorRegistrySupport p0){} + protected void registerDefaultEditors(){} + public ConversionService getConversionService(){ return null; } + public PropertyEditor findCustomEditor(Class p0, String p1){ return null; } + public PropertyEditor getDefaultEditor(Class p0){ return null; } + public PropertyEditorRegistrySupport(){} + public boolean hasCustomEditorForElement(Class p0, String p1){ return false; } + public void overrideDefaultEditor(Class p0, PropertyEditor p1){} + public void registerCustomEditor(Class p0, PropertyEditor p1){} + public void registerCustomEditor(Class p0, String p1, PropertyEditor p2){} + public void setConversionService(ConversionService p0){} + public void useConfigValueEditors(){} +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyValue.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyValue.java index 2787aa04f17e..142dee2842d4 100644 --- a/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyValue.java +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyValue.java @@ -1,70 +1,25 @@ -/* - * Copyright 2002-2019 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ +// Generated automatically from org.springframework.beans.PropertyValue for testing purposes package org.springframework.beans; import java.io.Serializable; -import org.springframework.lang.Nullable; - -public class PropertyValue implements Serializable { - public PropertyValue(String name, @Nullable Object value) {} - - public PropertyValue(PropertyValue original) {} - - public PropertyValue(PropertyValue original, @Nullable Object newValue) {} - - public String getName() { - return null; - } - - public Object getValue() { - return null; - } - - public PropertyValue getOriginalPropertyValue() { - return null; - } - - public void setOptional(boolean optional) {} - - public boolean isOptional() { - return false; - } - - public synchronized boolean isConverted() { - return false; - } - - public synchronized void setConvertedValue(@Nullable Object value) {} - - public synchronized Object getConvertedValue() { - return null; - } - - @Override - public boolean equals(@Nullable Object other) { - return false; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public String toString() { - return null; - } - +import org.springframework.beans.BeanMetadataAttributeAccessor; + +public class PropertyValue extends BeanMetadataAttributeAccessor implements Serializable +{ + protected PropertyValue() {} + public Object getConvertedValue(){ return null; } + public Object getValue(){ return null; } + public PropertyValue getOriginalPropertyValue(){ return null; } + public PropertyValue(PropertyValue p0){} + public PropertyValue(PropertyValue p0, Object p1){} + public PropertyValue(String p0, Object p1){} + public String getName(){ return null; } + public String toString(){ return null; } + public boolean equals(Object p0){ return false; } + public boolean isConverted(){ return false; } + public boolean isOptional(){ return false; } + public int hashCode(){ return 0; } + public void setConvertedValue(Object p0){} + public void setOptional(boolean p0){} } diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyValues.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyValues.java index 9d5b1f51ec3b..9cf92f510a8f 100644 --- a/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyValues.java +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/PropertyValues.java @@ -1,46 +1,20 @@ -/* - * Copyright 2002-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ +// Generated automatically from org.springframework.beans.PropertyValues for testing purposes package org.springframework.beans; import java.util.Iterator; import java.util.Spliterator; import java.util.stream.Stream; - -public interface PropertyValues extends Iterable { - @Override - default Iterator iterator() { - return null; - } - - @Override - default Spliterator spliterator() { - return null; - } - - default Stream stream() { - return null; - } - - PropertyValue[] getPropertyValues(); - - PropertyValue getPropertyValue(String propertyName); - - PropertyValues changesSince(PropertyValues old); - - boolean contains(String propertyName); - - boolean isEmpty(); - +import org.springframework.beans.PropertyValue; + +public interface PropertyValues extends Iterable +{ + PropertyValue getPropertyValue(String p0); + PropertyValue[] getPropertyValues(); + PropertyValues changesSince(PropertyValues p0); + boolean contains(String p0); + boolean isEmpty(); + default Iterator iterator(){ return null; } + default Spliterator spliterator(){ return null; } + default Stream stream(){ return null; } } diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/SimpleTypeConverter.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/SimpleTypeConverter.java new file mode 100644 index 000000000000..316f5abbd074 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/SimpleTypeConverter.java @@ -0,0 +1,10 @@ +// Generated automatically from org.springframework.beans.SimpleTypeConverter for testing purposes + +package org.springframework.beans; + +import org.springframework.beans.TypeConverterSupport; + +public class SimpleTypeConverter extends TypeConverterSupport +{ + public SimpleTypeConverter(){} +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/TypeConverter.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/TypeConverter.java new file mode 100644 index 000000000000..3c86c92281dd --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/TypeConverter.java @@ -0,0 +1,15 @@ +// Generated automatically from org.springframework.beans.TypeConverter for testing purposes + +package org.springframework.beans; + +import java.lang.reflect.Field; +import org.springframework.core.MethodParameter; +import org.springframework.core.convert.TypeDescriptor; + +public interface TypeConverter +{ + T convertIfNecessary(Object p0, Class p1); + T convertIfNecessary(Object p0, Class p1, Field p2); + T convertIfNecessary(Object p0, Class p1, MethodParameter p2); + default T convertIfNecessary(Object p0, Class p1, TypeDescriptor p2){ return null; } +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/TypeConverterSupport.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/TypeConverterSupport.java new file mode 100644 index 000000000000..c289cd3416b9 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/beans/TypeConverterSupport.java @@ -0,0 +1,18 @@ +// Generated automatically from org.springframework.beans.TypeConverterSupport for testing purposes + +package org.springframework.beans; + +import java.lang.reflect.Field; +import org.springframework.beans.PropertyEditorRegistrySupport; +import org.springframework.beans.TypeConverter; +import org.springframework.core.MethodParameter; +import org.springframework.core.convert.TypeDescriptor; + +abstract public class TypeConverterSupport extends PropertyEditorRegistrySupport implements TypeConverter +{ + public T convertIfNecessary(Object p0, Class p1){ return null; } + public T convertIfNecessary(Object p0, Class p1, Field p2){ return null; } + public T convertIfNecessary(Object p0, Class p1, MethodParameter p2){ return null; } + public T convertIfNecessary(Object p0, Class p1, TypeDescriptor p2){ return null; } + public TypeConverterSupport(){} +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/context/MessageSourceResolvable.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/context/MessageSourceResolvable.java index f64b1df5fd36..ef2702286e6f 100644 --- a/java/ql/test/stubs/springframework-5.3.8/org/springframework/context/MessageSourceResolvable.java +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/context/MessageSourceResolvable.java @@ -1,29 +1,11 @@ -/* - * Copyright 2002-2017 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Generated automatically from org.springframework.context.MessageSourceResolvable for testing purposes package org.springframework.context; -public interface MessageSourceResolvable { - String[] getCodes(); - default Object[] getArguments() { - return null; - } - - default String getDefaultMessage() { - return null; - } +public interface MessageSourceResolvable +{ + String[] getCodes(); + default Object[] getArguments(){ return null; } + default String getDefaultMessage(){ return null; } } diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/context/support/DefaultMessageSourceResolvable.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/context/support/DefaultMessageSourceResolvable.java index 702b73926b76..fc9c39af73f9 100644 --- a/java/ql/test/stubs/springframework-5.3.8/org/springframework/context/support/DefaultMessageSourceResolvable.java +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/context/support/DefaultMessageSourceResolvable.java @@ -1,78 +1,26 @@ -/* - * Copyright 2002-2019 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Generated automatically from org.springframework.context.support.DefaultMessageSourceResolvable for testing purposes package org.springframework.context.support; import java.io.Serializable; import org.springframework.context.MessageSourceResolvable; -import org.springframework.lang.Nullable; -public class DefaultMessageSourceResolvable implements MessageSourceResolvable, Serializable { - public DefaultMessageSourceResolvable(String code) {} - - public DefaultMessageSourceResolvable(String[] codes) {} - - public DefaultMessageSourceResolvable(String[] codes, String defaultMessage) {} - - public DefaultMessageSourceResolvable(String[] codes, Object[] arguments) {} - - public DefaultMessageSourceResolvable( - @Nullable String[] codes, @Nullable Object[] arguments, @Nullable String defaultMessage) {} - - public DefaultMessageSourceResolvable(MessageSourceResolvable resolvable) {} - - public String getCode() { - return null; - } - - @Override - public String[] getCodes() { - return null; - } - - @Override - public Object[] getArguments() { - return null; - } - - @Override - public String getDefaultMessage() { - return null; - } - - public boolean shouldRenderDefaultMessage() { - return false; - } - - @Override - public String toString() { - return null; - } - - @Override - public boolean equals(@Nullable Object other) { - return false; - } - - @Override - public int hashCode() { - return 0; - } - - protected final String resolvableToString() { - return null; - } +public class DefaultMessageSourceResolvable implements MessageSourceResolvable, Serializable +{ + protected DefaultMessageSourceResolvable() {} + protected final String resolvableToString(){ return null; } + public DefaultMessageSourceResolvable(MessageSourceResolvable p0){} + public DefaultMessageSourceResolvable(String p0){} + public DefaultMessageSourceResolvable(String[] p0){} + public DefaultMessageSourceResolvable(String[] p0, Object[] p1){} + public DefaultMessageSourceResolvable(String[] p0, Object[] p1, String p2){} + public DefaultMessageSourceResolvable(String[] p0, String p1){} + public Object[] getArguments(){ return null; } + public String getCode(){ return null; } + public String getDefaultMessage(){ return null; } + public String toString(){ return null; } + public String[] getCodes(){ return null; } + public boolean equals(Object p0){ return false; } + public boolean shouldRenderDefaultMessage(){ return false; } + public int hashCode(){ return 0; } } diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/AttributeAccessor.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/AttributeAccessor.java new file mode 100644 index 000000000000..3e4bf686ef67 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/AttributeAccessor.java @@ -0,0 +1,15 @@ +// Generated automatically from org.springframework.core.AttributeAccessor for testing purposes + +package org.springframework.core; + +import java.util.function.Function; + +public interface AttributeAccessor +{ + Object getAttribute(String p0); + Object removeAttribute(String p0); + String[] attributeNames(); + boolean hasAttribute(String p0); + default T computeAttribute(String p0, Function p1){ return null; } + void setAttribute(String p0, Object p1); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/AttributeAccessorSupport.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/AttributeAccessorSupport.java new file mode 100644 index 000000000000..c2fa6661eb0c --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/AttributeAccessorSupport.java @@ -0,0 +1,21 @@ +// Generated automatically from org.springframework.core.AttributeAccessorSupport for testing purposes + +package org.springframework.core; + +import java.io.Serializable; +import java.util.function.Function; +import org.springframework.core.AttributeAccessor; + +abstract public class AttributeAccessorSupport implements AttributeAccessor, Serializable +{ + protected void copyAttributesFrom(AttributeAccessor p0){} + public T computeAttribute(String p0, Function p1){ return null; } + public AttributeAccessorSupport(){} + public Object getAttribute(String p0){ return null; } + public Object removeAttribute(String p0){ return null; } + public String[] attributeNames(){ return null; } + public boolean equals(Object p0){ return false; } + public boolean hasAttribute(String p0){ return false; } + public int hashCode(){ return 0; } + public void setAttribute(String p0, Object p1){} +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/MethodParameter.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/MethodParameter.java new file mode 100644 index 000000000000..7fe40c398f84 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/MethodParameter.java @@ -0,0 +1,67 @@ +// Generated automatically from org.springframework.core.MethodParameter for testing purposes + +package org.springframework.core; + +import java.lang.annotation.Annotation; +import java.lang.reflect.AnnotatedElement; +import java.lang.reflect.Constructor; +import java.lang.reflect.Executable; +import java.lang.reflect.Member; +import java.lang.reflect.Method; +import java.lang.reflect.Parameter; +import java.lang.reflect.Type; +import org.springframework.core.ParameterNameDiscoverer; + +public class MethodParameter +{ + protected MethodParameter() {} + protected A adaptAnnotation(A p0){ return null; } + protected Annotation[] adaptAnnotationArray(Annotation[] p0){ return null; } + protected static int findParameterIndex(Parameter p0){ return 0; } + public A getMethodAnnotation(Class p0){ return null; } + public A getParameterAnnotation(Class p0){ return null; } + public boolean hasMethodAnnotation(Class p0){ return false; } + public boolean hasParameterAnnotation(Class p0){ return false; } + public AnnotatedElement getAnnotatedElement(){ return null; } + public Annotation[] getMethodAnnotations(){ return null; } + public Annotation[] getParameterAnnotations(){ return null; } + public Class getContainingClass(){ return null; } + public Class getDeclaringClass(){ return null; } + public Class getNestedParameterType(){ return null; } + public Class getParameterType(){ return null; } + public Constructor getConstructor(){ return null; } + public Executable getExecutable(){ return null; } + public Integer getTypeIndexForCurrentLevel(){ return null; } + public Integer getTypeIndexForLevel(int p0){ return null; } + public Member getMember(){ return null; } + public Method getMethod(){ return null; } + public MethodParameter clone(){ return null; } + public MethodParameter nested(){ return null; } + public MethodParameter nested(Integer p0){ return null; } + public MethodParameter nestedIfOptional(){ return null; } + public MethodParameter withContainingClass(Class p0){ return null; } + public MethodParameter withTypeIndex(int p0){ return null; } + public MethodParameter(Constructor p0, int p1){} + public MethodParameter(Constructor p0, int p1, int p2){} + public MethodParameter(Method p0, int p1){} + public MethodParameter(Method p0, int p1, int p2){} + public MethodParameter(MethodParameter p0){} + public Parameter getParameter(){ return null; } + public String getParameterName(){ return null; } + public String toString(){ return null; } + public Type getGenericParameterType(){ return null; } + public Type getNestedGenericParameterType(){ return null; } + public boolean equals(Object p0){ return false; } + public boolean hasParameterAnnotations(){ return false; } + public boolean isOptional(){ return false; } + public int getNestingLevel(){ return 0; } + public int getParameterIndex(){ return 0; } + public int hashCode(){ return 0; } + public static MethodParameter forExecutable(Executable p0, int p1){ return null; } + public static MethodParameter forMethodOrConstructor(Object p0, int p1){ return null; } + public static MethodParameter forParameter(Parameter p0){ return null; } + public void decreaseNestingLevel(){} + public void increaseNestingLevel(){} + public void initParameterNameDiscovery(ParameterNameDiscoverer p0){} + public void setTypeIndexForCurrentLevel(int p0){} +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/ParameterNameDiscoverer.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/ParameterNameDiscoverer.java new file mode 100644 index 000000000000..2a539cee35ff --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/ParameterNameDiscoverer.java @@ -0,0 +1,12 @@ +// Generated automatically from org.springframework.core.ParameterNameDiscoverer for testing purposes + +package org.springframework.core; + +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; + +public interface ParameterNameDiscoverer +{ + String[] getParameterNames(Constructor p0); + String[] getParameterNames(Method p0); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/ParameterizedTypeReference.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/ParameterizedTypeReference.java index 805e0b56dc94..106607cbb5f4 100644 --- a/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/ParameterizedTypeReference.java +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/ParameterizedTypeReference.java @@ -1,27 +1,15 @@ -package org.springframework.core; - -public abstract class ParameterizedTypeReference { - public java.lang.reflect.Type getType() { - return null; - } - - public boolean equals(java.lang.Object other) { - return false; - } +// Generated automatically from org.springframework.core.ParameterizedTypeReference for testing purposes - public int hashCode() { - return 0; - } - - public java.lang.String toString() { - return null; - } - - public static org.springframework.core.ParameterizedTypeReference forType(java.lang.reflect.Type type) { - return null; - } +package org.springframework.core; - private static java.lang.Class findParameterizedTypeReferenceSubclass(java.lang.Class child) { - return null; - } -} \ No newline at end of file +import java.lang.reflect.Type; + +abstract public class ParameterizedTypeReference +{ + protected ParameterizedTypeReference(){} + public String toString(){ return null; } + public Type getType(){ return null; } + public boolean equals(Object p0){ return false; } + public int hashCode(){ return 0; } + public static ParameterizedTypeReference forType(Type p0){ return null; } +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/ResolvableType.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/ResolvableType.java new file mode 100644 index 000000000000..47615f0bb635 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/ResolvableType.java @@ -0,0 +1,73 @@ +// Generated automatically from org.springframework.core.ResolvableType for testing purposes + +package org.springframework.core; + +import java.io.Serializable; +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.GenericDeclaration; +import java.lang.reflect.Method; +import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; +import java.util.Map; +import org.springframework.core.MethodParameter; +import org.springframework.core.ParameterizedTypeReference; + +public class ResolvableType implements Serializable +{ + protected ResolvableType() {} + public Class getRawClass(){ return null; } + public Class resolve(){ return null; } + public Class resolve(Class p0){ return null; } + public Class resolveGeneric(int... p0){ return null; } + public Class toClass(){ return null; } + public Class[] resolveGenerics(){ return null; } + public Class[] resolveGenerics(Class p0){ return null; } + public Object getSource(){ return null; } + public ResolvableType as(Class p0){ return null; } + public ResolvableType asCollection(){ return null; } + public ResolvableType asMap(){ return null; } + public ResolvableType getComponentType(){ return null; } + public ResolvableType getGeneric(int... p0){ return null; } + public ResolvableType getNested(int p0){ return null; } + public ResolvableType getNested(int p0, Map p1){ return null; } + public ResolvableType getSuperType(){ return null; } + public ResolvableType[] getGenerics(){ return null; } + public ResolvableType[] getInterfaces(){ return null; } + public String toString(){ return null; } + public Type getType(){ return null; } + public boolean equals(Object p0){ return false; } + public boolean hasGenerics(){ return false; } + public boolean hasUnresolvableGenerics(){ return false; } + public boolean isArray(){ return false; } + public boolean isAssignableFrom(Class p0){ return false; } + public boolean isAssignableFrom(ResolvableType p0){ return false; } + public boolean isInstance(Object p0){ return false; } + public int hashCode(){ return 0; } + public static ResolvableType NONE = null; + public static ResolvableType forArrayComponent(ResolvableType p0){ return null; } + public static ResolvableType forClass(Class p0){ return null; } + public static ResolvableType forClass(Class p0, Class p1){ return null; } + public static ResolvableType forClassWithGenerics(Class p0, Class... p1){ return null; } + public static ResolvableType forClassWithGenerics(Class p0, ResolvableType... p1){ return null; } + public static ResolvableType forConstructorParameter(Constructor p0, int p1){ return null; } + public static ResolvableType forConstructorParameter(Constructor p0, int p1, Class p2){ return null; } + public static ResolvableType forField(Field p0){ return null; } + public static ResolvableType forField(Field p0, Class p1){ return null; } + public static ResolvableType forField(Field p0, ResolvableType p1){ return null; } + public static ResolvableType forField(Field p0, int p1){ return null; } + public static ResolvableType forField(Field p0, int p1, Class p2){ return null; } + public static ResolvableType forInstance(Object p0){ return null; } + public static ResolvableType forMethodParameter(Method p0, int p1){ return null; } + public static ResolvableType forMethodParameter(Method p0, int p1, Class p2){ return null; } + public static ResolvableType forMethodParameter(MethodParameter p0){ return null; } + public static ResolvableType forMethodParameter(MethodParameter p0, ResolvableType p1){ return null; } + public static ResolvableType forMethodParameter(MethodParameter p0, Type p1){ return null; } + public static ResolvableType forMethodReturnType(Method p0){ return null; } + public static ResolvableType forMethodReturnType(Method p0, Class p1){ return null; } + public static ResolvableType forRawClass(Class p0){ return null; } + public static ResolvableType forType(ParameterizedTypeReference p0){ return null; } + public static ResolvableType forType(Type p0){ return null; } + public static ResolvableType forType(Type p0, ResolvableType p1){ return null; } + public static void clearCache(){} +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/convert/ConversionService.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/convert/ConversionService.java new file mode 100644 index 000000000000..d9998142b6b7 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/convert/ConversionService.java @@ -0,0 +1,13 @@ +// Generated automatically from org.springframework.core.convert.ConversionService for testing purposes + +package org.springframework.core.convert; + +import org.springframework.core.convert.TypeDescriptor; + +public interface ConversionService +{ + T convert(Object p0, Class p1); + Object convert(Object p0, TypeDescriptor p1, TypeDescriptor p2); + boolean canConvert(Class p0, Class p1); + boolean canConvert(TypeDescriptor p0, TypeDescriptor p1); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/convert/Property.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/convert/Property.java new file mode 100644 index 000000000000..10afbbd88e25 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/convert/Property.java @@ -0,0 +1,19 @@ +// Generated automatically from org.springframework.core.convert.Property for testing purposes + +package org.springframework.core.convert; + +import java.lang.reflect.Method; + +public class Property +{ + protected Property() {} + public Class getObjectType(){ return null; } + public Class getType(){ return null; } + public Method getReadMethod(){ return null; } + public Method getWriteMethod(){ return null; } + public Property(Class p0, Method p1, Method p2){} + public Property(Class p0, Method p1, Method p2, String p3){} + public String getName(){ return null; } + public boolean equals(Object p0){ return false; } + public int hashCode(){ return 0; } +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/convert/TypeDescriptor.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/convert/TypeDescriptor.java new file mode 100644 index 000000000000..9af71a6bdeac --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/core/convert/TypeDescriptor.java @@ -0,0 +1,51 @@ +// Generated automatically from org.springframework.core.convert.TypeDescriptor for testing purposes + +package org.springframework.core.convert; + +import java.io.Serializable; +import java.lang.annotation.Annotation; +import java.lang.reflect.Field; +import org.springframework.core.MethodParameter; +import org.springframework.core.ResolvableType; +import org.springframework.core.convert.Property; + +public class TypeDescriptor implements Serializable +{ + protected TypeDescriptor() {} + public T getAnnotation(Class p0){ return null; } + public Annotation[] getAnnotations(){ return null; } + public Class getObjectType(){ return null; } + public Class getType(){ return null; } + public Object getSource(){ return null; } + public ResolvableType getResolvableType(){ return null; } + public String getName(){ return null; } + public String toString(){ return null; } + public TypeDescriptor elementTypeDescriptor(Object p0){ return null; } + public TypeDescriptor getElementTypeDescriptor(){ return null; } + public TypeDescriptor getMapKeyTypeDescriptor(){ return null; } + public TypeDescriptor getMapKeyTypeDescriptor(Object p0){ return null; } + public TypeDescriptor getMapValueTypeDescriptor(){ return null; } + public TypeDescriptor getMapValueTypeDescriptor(Object p0){ return null; } + public TypeDescriptor narrow(Object p0){ return null; } + public TypeDescriptor upcast(Class p0){ return null; } + public TypeDescriptor(Field p0){} + public TypeDescriptor(MethodParameter p0){} + public TypeDescriptor(Property p0){} + public TypeDescriptor(ResolvableType p0, Class p1, Annotation[] p2){} + public boolean equals(Object p0){ return false; } + public boolean hasAnnotation(Class p0){ return false; } + public boolean isArray(){ return false; } + public boolean isAssignableTo(TypeDescriptor p0){ return false; } + public boolean isCollection(){ return false; } + public boolean isMap(){ return false; } + public boolean isPrimitive(){ return false; } + public int hashCode(){ return 0; } + public static TypeDescriptor array(TypeDescriptor p0){ return null; } + public static TypeDescriptor collection(Class p0, TypeDescriptor p1){ return null; } + public static TypeDescriptor forObject(Object p0){ return null; } + public static TypeDescriptor map(Class p0, TypeDescriptor p1, TypeDescriptor p2){ return null; } + public static TypeDescriptor nested(Field p0, int p1){ return null; } + public static TypeDescriptor nested(MethodParameter p0, int p1){ return null; } + public static TypeDescriptor nested(Property p0, int p1){ return null; } + public static TypeDescriptor valueOf(Class p0){ return null; } +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/format/Formatter.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/format/Formatter.java new file mode 100644 index 000000000000..046d8fe10143 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/format/Formatter.java @@ -0,0 +1,10 @@ +// Generated automatically from org.springframework.format.Formatter for testing purposes + +package org.springframework.format; + +import org.springframework.format.Parser; +import org.springframework.format.Printer; + +public interface Formatter extends Parser, Printer +{ +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/format/Parser.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/format/Parser.java new file mode 100644 index 000000000000..6344ee467b36 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/format/Parser.java @@ -0,0 +1,10 @@ +// Generated automatically from org.springframework.format.Parser for testing purposes + +package org.springframework.format; + +import java.util.Locale; + +public interface Parser +{ + T parse(String p0, Locale p1); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/format/Printer.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/format/Printer.java new file mode 100644 index 000000000000..cecf3e52c133 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/format/Printer.java @@ -0,0 +1,10 @@ +// Generated automatically from org.springframework.format.Printer for testing purposes + +package org.springframework.format; + +import java.util.Locale; + +public interface Printer +{ + String print(T p0, Locale p1); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/http/HttpHeaders.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/http/HttpHeaders.java index 68fe0c97d0a2..74fdcf0d1ffe 100644 --- a/java/ql/test/stubs/springframework-5.3.8/org/springframework/http/HttpHeaders.java +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/http/HttpHeaders.java @@ -23,7 +23,6 @@ public class HttpHeaders implements MultiValueMap, Serializable { - final MultiValueMap headers = null; protected List getETagValuesAsList(String p0){ return null; } protected String getFieldValues(String p0){ return null; } protected String toCommaDelimitedString(List p0){ return null; } @@ -216,5 +215,4 @@ public void setRange(List p0){} public void setUpgrade(String p0){} public void setVary(List p0){} public void setZonedDateTime(String p0, ZonedDateTime p1){} - static String formatDate(long p0){ return null; } } diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/ui/ModelMap.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/ui/ModelMap.java index 7063af170118..76517f02e5c6 100644 --- a/java/ql/test/stubs/springframework-5.3.8/org/springframework/ui/ModelMap.java +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/ui/ModelMap.java @@ -1,18 +1,4 @@ -/* - * Copyright 2002-2019 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Generated automatically from org.springframework.ui.ModelMap for testing purposes package org.springframework.ui; @@ -20,44 +6,16 @@ import java.util.LinkedHashMap; import java.util.Map; -import org.springframework.lang.Nullable; - -public class ModelMap extends LinkedHashMap { - public ModelMap() { - } - - public ModelMap(String attributeName, @Nullable Object attributeValue) { - } - - public ModelMap(Object attributeValue) { - } - - public ModelMap addAttribute(String attributeName, @Nullable Object attributeValue) { - return null; - } - - public ModelMap addAttribute(Object attributeValue) { - return null; - } - - public ModelMap addAllAttributes(@Nullable Collection attributeValues) { - return null; - } - - public ModelMap addAllAttributes(@Nullable Map attributes) { - return null; - } - - public ModelMap mergeAttributes(@Nullable Map attributes) { - return null; - } - - public boolean containsAttribute(String attributeName) { - return false; - } - - public Object getAttribute(String attributeName) { - return null; - } - +public class ModelMap extends LinkedHashMap +{ + public ModelMap addAllAttributes(Collection p0){ return null; } + public ModelMap addAllAttributes(Map p0){ return null; } + public ModelMap addAttribute(Object p0){ return null; } + public ModelMap addAttribute(String p0, Object p1){ return null; } + public ModelMap mergeAttributes(Map p0){ return null; } + public ModelMap(){} + public ModelMap(Object p0){} + public ModelMap(String p0, Object p1){} + public Object getAttribute(String p0){ return null; } + public boolean containsAttribute(String p0){ return false; } } diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/AbstractBindingResult.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/AbstractBindingResult.java new file mode 100644 index 000000000000..28e3b7031ca1 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/AbstractBindingResult.java @@ -0,0 +1,53 @@ +// Generated automatically from org.springframework.validation.AbstractBindingResult for testing purposes + +package org.springframework.validation; + +import java.beans.PropertyEditor; +import java.io.Serializable; +import java.util.List; +import java.util.Map; +import org.springframework.beans.PropertyEditorRegistry; +import org.springframework.validation.AbstractErrors; +import org.springframework.validation.BindingResult; +import org.springframework.validation.Errors; +import org.springframework.validation.FieldError; +import org.springframework.validation.MessageCodesResolver; +import org.springframework.validation.ObjectError; + +abstract public class AbstractBindingResult extends AbstractErrors implements BindingResult, Serializable +{ + protected AbstractBindingResult() {} + protected AbstractBindingResult(String p0){} + protected Object formatFieldValue(String p0, Object p1){ return null; } + protected abstract Object getActualFieldValue(String p0); + public Class getFieldType(String p0){ return null; } + public FieldError getFieldError(){ return null; } + public FieldError getFieldError(String p0){ return null; } + public List getFieldErrors(){ return null; } + public List getFieldErrors(String p0){ return null; } + public List getAllErrors(){ return null; } + public List getGlobalErrors(){ return null; } + public Map getModel(){ return null; } + public MessageCodesResolver getMessageCodesResolver(){ return null; } + public Object getFieldValue(String p0){ return null; } + public Object getRawFieldValue(String p0){ return null; } + public ObjectError getGlobalError(){ return null; } + public PropertyEditor findEditor(String p0, Class p1){ return null; } + public PropertyEditorRegistry getPropertyEditorRegistry(){ return null; } + public String getObjectName(){ return null; } + public String[] getSuppressedFields(){ return null; } + public String[] resolveMessageCodes(String p0){ return null; } + public String[] resolveMessageCodes(String p0, String p1){ return null; } + public abstract Object getTarget(); + public boolean equals(Object p0){ return false; } + public boolean hasErrors(){ return false; } + public int getErrorCount(){ return 0; } + public int hashCode(){ return 0; } + public void addAllErrors(Errors p0){} + public void addError(ObjectError p0){} + public void recordFieldValue(String p0, Class p1, Object p2){} + public void recordSuppressedField(String p0){} + public void reject(String p0, Object[] p1, String p2){} + public void rejectValue(String p0, String p1, Object[] p2, String p3){} + public void setMessageCodesResolver(MessageCodesResolver p0){} +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/AbstractErrors.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/AbstractErrors.java new file mode 100644 index 000000000000..d0d6f55e8ce5 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/AbstractErrors.java @@ -0,0 +1,41 @@ +// Generated automatically from org.springframework.validation.AbstractErrors for testing purposes + +package org.springframework.validation; + +import java.io.Serializable; +import java.util.List; +import org.springframework.validation.Errors; +import org.springframework.validation.FieldError; +import org.springframework.validation.ObjectError; + +abstract public class AbstractErrors implements Errors, Serializable +{ + protected String canonicalFieldName(String p0){ return null; } + protected String fixedField(String p0){ return null; } + protected boolean isMatchingFieldError(String p0, FieldError p1){ return false; } + protected void doSetNestedPath(String p0){} + public AbstractErrors(){} + public Class getFieldType(String p0){ return null; } + public FieldError getFieldError(){ return null; } + public FieldError getFieldError(String p0){ return null; } + public List getFieldErrors(String p0){ return null; } + public List getAllErrors(){ return null; } + public ObjectError getGlobalError(){ return null; } + public String getNestedPath(){ return null; } + public String toString(){ return null; } + public boolean hasErrors(){ return false; } + public boolean hasFieldErrors(){ return false; } + public boolean hasFieldErrors(String p0){ return false; } + public boolean hasGlobalErrors(){ return false; } + public int getErrorCount(){ return 0; } + public int getFieldErrorCount(){ return 0; } + public int getFieldErrorCount(String p0){ return 0; } + public int getGlobalErrorCount(){ return 0; } + public void popNestedPath(){} + public void pushNestedPath(String p0){} + public void reject(String p0){} + public void reject(String p0, String p1){} + public void rejectValue(String p0, String p1){} + public void rejectValue(String p0, String p1, String p2){} + public void setNestedPath(String p0){} +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/AbstractPropertyBindingResult.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/AbstractPropertyBindingResult.java new file mode 100644 index 000000000000..f360da3ec71e --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/AbstractPropertyBindingResult.java @@ -0,0 +1,24 @@ +// Generated automatically from org.springframework.validation.AbstractPropertyBindingResult for testing purposes + +package org.springframework.validation; + +import java.beans.PropertyEditor; +import org.springframework.beans.ConfigurablePropertyAccessor; +import org.springframework.beans.PropertyEditorRegistry; +import org.springframework.core.convert.ConversionService; +import org.springframework.validation.AbstractBindingResult; + +abstract public class AbstractPropertyBindingResult extends AbstractBindingResult +{ + protected AbstractPropertyBindingResult() {} + protected AbstractPropertyBindingResult(String p0){} + protected Object formatFieldValue(String p0, Object p1){ return null; } + protected Object getActualFieldValue(String p0){ return null; } + protected PropertyEditor getCustomEditor(String p0){ return null; } + protected String canonicalFieldName(String p0){ return null; } + public Class getFieldType(String p0){ return null; } + public PropertyEditor findEditor(String p0, Class p1){ return null; } + public PropertyEditorRegistry getPropertyEditorRegistry(){ return null; } + public abstract ConfigurablePropertyAccessor getPropertyAccessor(); + public void initConversion(ConversionService p0){} +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/BindingErrorProcessor.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/BindingErrorProcessor.java new file mode 100644 index 000000000000..7c05fde3fb48 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/BindingErrorProcessor.java @@ -0,0 +1,12 @@ +// Generated automatically from org.springframework.validation.BindingErrorProcessor for testing purposes + +package org.springframework.validation; + +import org.springframework.beans.PropertyAccessException; +import org.springframework.validation.BindingResult; + +public interface BindingErrorProcessor +{ + void processMissingFieldError(String p0, BindingResult p1); + void processPropertyAccessException(PropertyAccessException p0, BindingResult p1); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/BindingResult.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/BindingResult.java new file mode 100644 index 000000000000..9c0964508840 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/BindingResult.java @@ -0,0 +1,25 @@ +// Generated automatically from org.springframework.validation.BindingResult for testing purposes + +package org.springframework.validation; + +import java.beans.PropertyEditor; +import java.util.Map; +import org.springframework.beans.PropertyEditorRegistry; +import org.springframework.validation.Errors; +import org.springframework.validation.ObjectError; + +public interface BindingResult extends Errors +{ + Map getModel(); + Object getRawFieldValue(String p0); + Object getTarget(); + PropertyEditor findEditor(String p0, Class p1); + PropertyEditorRegistry getPropertyEditorRegistry(); + String[] resolveMessageCodes(String p0); + String[] resolveMessageCodes(String p0, String p1); + default String[] getSuppressedFields(){ return null; } + default void recordFieldValue(String p0, Class p1, Object p2){} + default void recordSuppressedField(String p0){} + static String MODEL_KEY_PREFIX = null; + void addError(ObjectError p0); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/DataBinder.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/DataBinder.java new file mode 100644 index 000000000000..b2c6c87a1a97 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/DataBinder.java @@ -0,0 +1,89 @@ +// Generated automatically from org.springframework.validation.DataBinder for testing purposes + +package org.springframework.validation; + +import java.beans.PropertyEditor; +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; +import org.apache.commons.logging.Log; +import org.springframework.beans.ConfigurablePropertyAccessor; +import org.springframework.beans.MutablePropertyValues; +import org.springframework.beans.PropertyEditorRegistry; +import org.springframework.beans.PropertyValues; +import org.springframework.beans.SimpleTypeConverter; +import org.springframework.beans.TypeConverter; +import org.springframework.core.MethodParameter; +import org.springframework.core.convert.ConversionService; +import org.springframework.core.convert.TypeDescriptor; +import org.springframework.format.Formatter; +import org.springframework.validation.AbstractPropertyBindingResult; +import org.springframework.validation.BindingErrorProcessor; +import org.springframework.validation.BindingResult; +import org.springframework.validation.MessageCodesResolver; +import org.springframework.validation.Validator; + +public class DataBinder implements PropertyEditorRegistry, TypeConverter +{ + protected DataBinder() {} + protected AbstractPropertyBindingResult createBeanPropertyBindingResult(){ return null; } + protected AbstractPropertyBindingResult createDirectFieldBindingResult(){ return null; } + protected AbstractPropertyBindingResult getInternalBindingResult(){ return null; } + protected ConfigurablePropertyAccessor getPropertyAccessor(){ return null; } + protected PropertyEditorRegistry getPropertyEditorRegistry(){ return null; } + protected SimpleTypeConverter getSimpleTypeConverter(){ return null; } + protected TypeConverter getTypeConverter(){ return null; } + protected boolean isAllowed(String p0){ return false; } + protected static Log logger = null; + protected void applyPropertyValues(MutablePropertyValues p0){} + protected void checkAllowedFields(MutablePropertyValues p0){} + protected void checkRequiredFields(MutablePropertyValues p0){} + protected void doBind(MutablePropertyValues p0){} + public T convertIfNecessary(Object p0, Class p1){ return null; } + public T convertIfNecessary(Object p0, Class p1, Field p2){ return null; } + public T convertIfNecessary(Object p0, Class p1, MethodParameter p2){ return null; } + public T convertIfNecessary(Object p0, Class p1, TypeDescriptor p2){ return null; } + public BindingErrorProcessor getBindingErrorProcessor(){ return null; } + public BindingResult getBindingResult(){ return null; } + public ConversionService getConversionService(){ return null; } + public DataBinder(Object p0){} + public DataBinder(Object p0, String p1){} + public List getValidators(){ return null; } + public Map close(){ return null; } + public Object getTarget(){ return null; } + public PropertyEditor findCustomEditor(Class p0, String p1){ return null; } + public String getObjectName(){ return null; } + public String[] getAllowedFields(){ return null; } + public String[] getDisallowedFields(){ return null; } + public String[] getRequiredFields(){ return null; } + public Validator getValidator(){ return null; } + public boolean isAutoGrowNestedPaths(){ return false; } + public boolean isIgnoreInvalidFields(){ return false; } + public boolean isIgnoreUnknownFields(){ return false; } + public int getAutoGrowCollectionLimit(){ return 0; } + public static String DEFAULT_OBJECT_NAME = null; + public static int DEFAULT_AUTO_GROW_COLLECTION_LIMIT = 0; + public void addCustomFormatter(Formatter p0){} + public void addCustomFormatter(Formatter p0, Class... p1){} + public void addCustomFormatter(Formatter p0, String... p1){} + public void addValidators(Validator... p0){} + public void bind(PropertyValues p0){} + public void initBeanPropertyAccess(){} + public void initDirectFieldAccess(){} + public void registerCustomEditor(Class p0, PropertyEditor p1){} + public void registerCustomEditor(Class p0, String p1, PropertyEditor p2){} + public void replaceValidators(Validator... p0){} + public void setAllowedFields(String... p0){} + public void setAutoGrowCollectionLimit(int p0){} + public void setAutoGrowNestedPaths(boolean p0){} + public void setBindingErrorProcessor(BindingErrorProcessor p0){} + public void setConversionService(ConversionService p0){} + public void setDisallowedFields(String... p0){} + public void setIgnoreInvalidFields(boolean p0){} + public void setIgnoreUnknownFields(boolean p0){} + public void setMessageCodesResolver(MessageCodesResolver p0){} + public void setRequiredFields(String... p0){} + public void setValidator(Validator p0){} + public void validate(){} + public void validate(Object... p0){} +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/Errors.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/Errors.java index 046f023f69ca..674a04516c30 100644 --- a/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/Errors.java +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/Errors.java @@ -1,84 +1,41 @@ -/* - * Copyright 2002-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Generated automatically from org.springframework.validation.Errors for testing purposes package org.springframework.validation; import java.util.List; -import org.springframework.lang.Nullable; - -public interface Errors { - String getObjectName(); - - void setNestedPath(String nestedPath); - - String getNestedPath(); - - void pushNestedPath(String subPath); - - void popNestedPath() throws IllegalStateException; - - void reject(String errorCode); - - void reject(String errorCode, String defaultMessage); - - void reject(String errorCode, @Nullable Object[] errorArgs, @Nullable String defaultMessage); - - void rejectValue(@Nullable String field, String errorCode); - - void rejectValue(@Nullable String field, String errorCode, String defaultMessage); - - void rejectValue( - @Nullable String field, - String errorCode, - @Nullable Object[] errorArgs, - @Nullable String defaultMessage); - - void addAllErrors(Errors errors); - - boolean hasErrors(); - - int getErrorCount(); - - List getAllErrors(); - - boolean hasGlobalErrors(); - - int getGlobalErrorCount(); - - List getGlobalErrors(); - - ObjectError getGlobalError(); - - boolean hasFieldErrors(); - - int getFieldErrorCount(); - - List getFieldErrors(); - - FieldError getFieldError(); - - boolean hasFieldErrors(String field); - - int getFieldErrorCount(String field); - - List getFieldErrors(String field); - - FieldError getFieldError(String field); - - Object getFieldValue(String field); - - Class getFieldType(String field); +import org.springframework.validation.FieldError; +import org.springframework.validation.ObjectError; + +public interface Errors +{ + Class getFieldType(String p0); + FieldError getFieldError(); + FieldError getFieldError(String p0); + List getFieldErrors(); + List getFieldErrors(String p0); + List getAllErrors(); + List getGlobalErrors(); + Object getFieldValue(String p0); + ObjectError getGlobalError(); + String getNestedPath(); + String getObjectName(); + boolean hasErrors(); + boolean hasFieldErrors(); + boolean hasFieldErrors(String p0); + boolean hasGlobalErrors(); + int getErrorCount(); + int getFieldErrorCount(); + int getFieldErrorCount(String p0); + int getGlobalErrorCount(); + static String NESTED_PATH_SEPARATOR = null; + void addAllErrors(Errors p0); + void popNestedPath(); + void pushNestedPath(String p0); + void reject(String p0); + void reject(String p0, Object[] p1, String p2); + void reject(String p0, String p1); + void rejectValue(String p0, String p1); + void rejectValue(String p0, String p1, Object[] p2, String p3); + void rejectValue(String p0, String p1, String p2); + void setNestedPath(String p0); } diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/FieldError.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/FieldError.java index d4a42bb9dd2c..063f177e839b 100644 --- a/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/FieldError.java +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/FieldError.java @@ -1,60 +1,18 @@ -/* - * Copyright 2002-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Generated automatically from org.springframework.validation.FieldError for testing purposes package org.springframework.validation; -import org.springframework.lang.Nullable; - -public class FieldError extends ObjectError { - public FieldError(String objectName, String field, String defaultMessage) { super("", ""); } - - public FieldError( - String objectName, - String field, - @Nullable Object rejectedValue, - boolean bindingFailure, - @Nullable String[] codes, - @Nullable Object[] arguments, - @Nullable String defaultMessage) { super("", ""); } - - public String getField() { - return null; - } - - @Nullable - public Object getRejectedValue() { - return null; - } - - public boolean isBindingFailure() { - return false; - } - - @Override - public boolean equals(@Nullable Object other) { - return false; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public String toString() { - return null; - } +import org.springframework.validation.ObjectError; + +public class FieldError extends ObjectError +{ + protected FieldError() {} + public FieldError(String p0, String p1, Object p2, boolean p3, String[] p4, Object[] p5, String p6){} + public FieldError(String p0, String p1, String p2){} + public Object getRejectedValue(){ return null; } + public String getField(){ return null; } + public String toString(){ return null; } + public boolean equals(Object p0){ return false; } + public boolean isBindingFailure(){ return false; } + public int hashCode(){ return 0; } } diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/MessageCodesResolver.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/MessageCodesResolver.java new file mode 100644 index 000000000000..50e9b0cd61d8 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/MessageCodesResolver.java @@ -0,0 +1,10 @@ +// Generated automatically from org.springframework.validation.MessageCodesResolver for testing purposes + +package org.springframework.validation; + + +public interface MessageCodesResolver +{ + String[] resolveMessageCodes(String p0, String p1); + String[] resolveMessageCodes(String p0, String p1, String p2, Class p3); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/ObjectError.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/ObjectError.java index c7c6b244136e..94e7ef46f636 100644 --- a/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/ObjectError.java +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/ObjectError.java @@ -1,60 +1,19 @@ -/* - * Copyright 2002-2019 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Generated automatically from org.springframework.validation.ObjectError for testing purposes package org.springframework.validation; import org.springframework.context.support.DefaultMessageSourceResolvable; -import org.springframework.lang.Nullable; -public class ObjectError extends DefaultMessageSourceResolvable { - - public ObjectError(String objectName, String defaultMessage) { super(""); } - - public ObjectError( - String objectName, - @Nullable String[] codes, - @Nullable Object[] arguments, - @Nullable String defaultMessage) { super(""); } - - public String getObjectName() { - return null; - } - - public void wrap(Object source) {} - - public T unwrap(Class sourceType) { - return null; - } - - public boolean contains(Class sourceType) { - return false; - } - - @Override - public boolean equals(@Nullable Object other) { - return false; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public String toString() { - return ""; - } +public class ObjectError extends DefaultMessageSourceResolvable +{ + protected ObjectError() {} + public T unwrap(Class p0){ return null; } + public ObjectError(String p0, String p1){} + public ObjectError(String p0, String[] p1, Object[] p2, String p3){} + public String getObjectName(){ return null; } + public String toString(){ return null; } + public boolean contains(Class p0){ return false; } + public boolean equals(Object p0){ return false; } + public int hashCode(){ return 0; } + public void wrap(Object p0){} } diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/Validator.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/Validator.java new file mode 100644 index 000000000000..441ff2759f92 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/validation/Validator.java @@ -0,0 +1,11 @@ +// Generated automatically from org.springframework.validation.Validator for testing purposes + +package org.springframework.validation; + +import org.springframework.validation.Errors; + +public interface Validator +{ + boolean supports(Class p0); + void validate(Object p0, Errors p1); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/bind/WebDataBinder.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/bind/WebDataBinder.java new file mode 100644 index 000000000000..17aec913f9bd --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/bind/WebDataBinder.java @@ -0,0 +1,31 @@ +// Generated automatically from org.springframework.web.bind.WebDataBinder for testing purposes + +package org.springframework.web.bind; + +import java.util.List; +import java.util.Map; +import org.springframework.beans.MutablePropertyValues; +import org.springframework.validation.DataBinder; +import org.springframework.web.multipart.MultipartFile; + +public class WebDataBinder extends DataBinder +{ + protected WebDataBinder() {} + protected Object getEmptyValue(String p0, Class p1){ return null; } + protected void adaptEmptyArrayIndices(MutablePropertyValues p0){} + protected void bindMultipart(Map> p0, MutablePropertyValues p1){} + protected void checkFieldDefaults(MutablePropertyValues p0){} + protected void checkFieldMarkers(MutablePropertyValues p0){} + protected void doBind(MutablePropertyValues p0){} + public Object getEmptyValue(Class p0){ return null; } + public String getFieldDefaultPrefix(){ return null; } + public String getFieldMarkerPrefix(){ return null; } + public WebDataBinder(Object p0){} + public WebDataBinder(Object p0, String p1){} + public boolean isBindEmptyMultipartFiles(){ return false; } + public static String DEFAULT_FIELD_DEFAULT_PREFIX = null; + public static String DEFAULT_FIELD_MARKER_PREFIX = null; + public void setBindEmptyMultipartFiles(boolean p0){} + public void setFieldDefaultPrefix(String p0){} + public void setFieldMarkerPrefix(String p0){} +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/bind/support/SessionStatus.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/bind/support/SessionStatus.java new file mode 100644 index 000000000000..58122e28c4ae --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/bind/support/SessionStatus.java @@ -0,0 +1,10 @@ +// Generated automatically from org.springframework.web.bind.support.SessionStatus for testing purposes + +package org.springframework.web.bind.support; + + +public interface SessionStatus +{ + boolean isComplete(); + void setComplete(); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/bind/support/WebDataBinderFactory.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/bind/support/WebDataBinderFactory.java new file mode 100644 index 000000000000..94f10c591287 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/bind/support/WebDataBinderFactory.java @@ -0,0 +1,11 @@ +// Generated automatically from org.springframework.web.bind.support.WebDataBinderFactory for testing purposes + +package org.springframework.web.bind.support; + +import org.springframework.web.bind.WebDataBinder; +import org.springframework.web.context.request.NativeWebRequest; + +public interface WebDataBinderFactory +{ + WebDataBinder createBinder(NativeWebRequest p0, Object p1, String p2); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/context/request/NativeWebRequest.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/context/request/NativeWebRequest.java new file mode 100644 index 000000000000..8fd06477bd8f --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/context/request/NativeWebRequest.java @@ -0,0 +1,13 @@ +// Generated automatically from org.springframework.web.context.request.NativeWebRequest for testing purposes + +package org.springframework.web.context.request; + +import org.springframework.web.context.request.WebRequest; + +public interface NativeWebRequest extends WebRequest +{ + T getNativeRequest(Class p0); + T getNativeResponse(Class p0); + Object getNativeRequest(); + Object getNativeResponse(); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/context/request/RequestAttributes.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/context/request/RequestAttributes.java new file mode 100644 index 000000000000..ee18ec350013 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/context/request/RequestAttributes.java @@ -0,0 +1,20 @@ +// Generated automatically from org.springframework.web.context.request.RequestAttributes for testing purposes + +package org.springframework.web.context.request; + + +public interface RequestAttributes +{ + Object getAttribute(String p0, int p1); + Object getSessionMutex(); + Object resolveReference(String p0); + String getSessionId(); + String[] getAttributeNames(int p0); + static String REFERENCE_REQUEST = null; + static String REFERENCE_SESSION = null; + static int SCOPE_REQUEST = 0; + static int SCOPE_SESSION = 0; + void registerDestructionCallback(String p0, Runnable p1, int p2); + void removeAttribute(String p0, int p1); + void setAttribute(String p0, Object p1, int p2); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/context/request/WebRequest.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/context/request/WebRequest.java new file mode 100644 index 000000000000..864b04b45efb --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/context/request/WebRequest.java @@ -0,0 +1,30 @@ +// Generated automatically from org.springframework.web.context.request.WebRequest for testing purposes + +package org.springframework.web.context.request; + +import java.security.Principal; +import java.util.Iterator; +import java.util.Locale; +import java.util.Map; +import org.springframework.web.context.request.RequestAttributes; + +public interface WebRequest extends RequestAttributes +{ + Iterator getHeaderNames(); + Iterator getParameterNames(); + Locale getLocale(); + Map getParameterMap(); + Principal getUserPrincipal(); + String getContextPath(); + String getDescription(boolean p0); + String getHeader(String p0); + String getParameter(String p0); + String getRemoteUser(); + String[] getHeaderValues(String p0); + String[] getParameterValues(String p0); + boolean checkNotModified(String p0); + boolean checkNotModified(String p0, long p1); + boolean checkNotModified(long p0); + boolean isSecure(); + boolean isUserInRole(String p0); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/method/support/HandlerMethodArgumentResolver.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/method/support/HandlerMethodArgumentResolver.java new file mode 100644 index 000000000000..6879dc3aceb5 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/method/support/HandlerMethodArgumentResolver.java @@ -0,0 +1,14 @@ +// Generated automatically from org.springframework.web.method.support.HandlerMethodArgumentResolver for testing purposes + +package org.springframework.web.method.support; + +import org.springframework.core.MethodParameter; +import org.springframework.web.bind.support.WebDataBinderFactory; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.method.support.ModelAndViewContainer; + +public interface HandlerMethodArgumentResolver +{ + Object resolveArgument(MethodParameter p0, ModelAndViewContainer p1, NativeWebRequest p2, WebDataBinderFactory p3); + boolean supportsParameter(MethodParameter p0); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/method/support/ModelAndViewContainer.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/method/support/ModelAndViewContainer.java new file mode 100644 index 000000000000..e23e320a5878 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/method/support/ModelAndViewContainer.java @@ -0,0 +1,38 @@ +// Generated automatically from org.springframework.web.method.support.ModelAndViewContainer for testing purposes + +package org.springframework.web.method.support; + +import java.util.Map; +import org.springframework.http.HttpStatus; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.support.SessionStatus; + +public class ModelAndViewContainer +{ + public HttpStatus getStatus(){ return null; } + public ModelAndViewContainer addAllAttributes(Map p0){ return null; } + public ModelAndViewContainer addAttribute(Object p0){ return null; } + public ModelAndViewContainer addAttribute(String p0, Object p1){ return null; } + public ModelAndViewContainer mergeAttributes(Map p0){ return null; } + public ModelAndViewContainer removeAttributes(Map p0){ return null; } + public ModelAndViewContainer(){} + public ModelMap getDefaultModel(){ return null; } + public ModelMap getModel(){ return null; } + public Object getView(){ return null; } + public SessionStatus getSessionStatus(){ return null; } + public String getViewName(){ return null; } + public String toString(){ return null; } + public boolean containsAttribute(String p0){ return false; } + public boolean isBindingDisabled(String p0){ return false; } + public boolean isRequestHandled(){ return false; } + public boolean isViewReference(){ return false; } + public void setBinding(String p0, boolean p1){} + public void setBindingDisabled(String p0){} + public void setIgnoreDefaultModelOnRedirect(boolean p0){} + public void setRedirectModel(ModelMap p0){} + public void setRedirectModelScenario(boolean p0){} + public void setRequestHandled(boolean p0){} + public void setStatus(HttpStatus p0){} + public void setView(Object p0){} + public void setViewName(String p0){} +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/method/support/UriComponentsContributor.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/method/support/UriComponentsContributor.java new file mode 100644 index 000000000000..2b48eb85b379 --- /dev/null +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/method/support/UriComponentsContributor.java @@ -0,0 +1,14 @@ +// Generated automatically from org.springframework.web.method.support.UriComponentsContributor for testing purposes + +package org.springframework.web.method.support; + +import java.util.Map; +import org.springframework.core.MethodParameter; +import org.springframework.core.convert.ConversionService; +import org.springframework.web.util.UriComponentsBuilder; + +public interface UriComponentsContributor +{ + boolean supportsParameter(MethodParameter p0); + void contributeMethodArgument(MethodParameter p0, Object p1, UriComponentsBuilder p2, Map p3, ConversionService p4); +} diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/multipart/MultipartFile.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/multipart/MultipartFile.java index 6ae6c3fa5310..9a1abe775735 100644 --- a/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/multipart/MultipartFile.java +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/multipart/MultipartFile.java @@ -1,138 +1,23 @@ -/* - * Copyright 2002-2018 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Generated automatically from org.springframework.web.multipart.MultipartFile for testing purposes package org.springframework.web.multipart; import java.io.File; -import java.io.IOException; import java.io.InputStream; -import java.nio.file.Files; import java.nio.file.Path; - import org.springframework.core.io.InputStreamSource; import org.springframework.core.io.Resource; -import org.springframework.lang.Nullable; - -/** - * A representation of an uploaded file received in a multipart request. - * - *

The file contents are either stored in memory or temporarily on disk. - * In either case, the user is responsible for copying file contents to a - * session-level or persistent store as and if desired. The temporary storage - * will be cleared at the end of request processing. - * - * @author Juergen Hoeller - * @author Trevor D. Cook - * @since 29.09.2003 - * @see org.springframework.web.multipart.MultipartHttpServletRequest - * @see org.springframework.web.multipart.MultipartResolver - */ -public interface MultipartFile extends InputStreamSource { - - /** - * Return the name of the parameter in the multipart form. - * @return the name of the parameter (never {@code null} or empty) - */ - String getName(); - - /** - * Return the original filename in the client's filesystem. - *

This may contain path information depending on the browser used, - * but it typically will not with any other than Opera. - * @return the original filename, or the empty String if no file has been chosen - * in the multipart form, or {@code null} if not defined or not available - * @see org.apache.commons.fileupload.FileItem#getName() - * @see org.springframework.web.multipart.commons.CommonsMultipartFile#setPreserveFilename - */ - @Nullable - String getOriginalFilename(); - - /** - * Return the content type of the file. - * @return the content type, or {@code null} if not defined - * (or no file has been chosen in the multipart form) - */ - @Nullable - String getContentType(); - - /** - * Return whether the uploaded file is empty, that is, either no file has - * been chosen in the multipart form or the chosen file has no content. - */ - boolean isEmpty(); - - /** - * Return the size of the file in bytes. - * @return the size of the file, or 0 if empty - */ - long getSize(); - - /** - * Return the contents of the file as an array of bytes. - * @return the contents of the file as bytes, or an empty byte array if empty - * @throws IOException in case of access errors (if the temporary store fails) - */ - byte[] getBytes() throws IOException; - - /** - * Return an InputStream to read the contents of the file from. - *

The user is responsible for closing the returned stream. - * @return the contents of the file as stream, or an empty stream if empty - * @throws IOException in case of access errors (if the temporary store fails) - */ - @Override - InputStream getInputStream(); // throws IOException; - - /** - * Return a Resource representation of this MultipartFile. This can be used - * as input to the {@code RestTemplate} or the {@code WebClient} to expose - * content length and the filename along with the InputStream. - * @return this MultipartFile adapted to the Resource contract - * @since 5.1 - */ - Resource getResource(); - - /** - * Transfer the received file to the given destination file. - *

This may either move the file in the filesystem, copy the file in the - * filesystem, or save memory-held contents to the destination file. If the - * destination file already exists, it will be deleted first. - *

If the target file has been moved in the filesystem, this operation - * cannot be invoked again afterwards. Therefore, call this method just once - * in order to work with any storage mechanism. - *

NOTE: Depending on the underlying provider, temporary storage - * may be container-dependent, including the base directory for relative - * destinations specified here (e.g. with Servlet 3.0 multipart handling). - * For absolute destinations, the target file may get renamed/moved from its - * temporary location or newly copied, even if a temporary copy already exists. - * @param dest the destination file (typically absolute) - * @throws IOException in case of reading or writing errors - * @throws IllegalStateException if the file has already been moved - * in the filesystem and is not available anymore for another transfer - * @see org.apache.commons.fileupload.FileItem#write(File) - * @see javax.servlet.http.Part#write(String) - */ - void transferTo(File dest) throws IOException, IllegalStateException; - /** - * Transfer the received file to the given destination file. - *

The default implementation simply copies the file input stream. - * @since 5.1 - * @see #getInputStream() - * @see #transferTo(File) - */ - void transferTo(Path dest) throws IOException, IllegalStateException; +public interface MultipartFile extends InputStreamSource +{ + InputStream getInputStream(); + String getContentType(); + String getName(); + String getOriginalFilename(); + boolean isEmpty(); + byte[] getBytes(); + default Resource getResource(){ return null; } + default void transferTo(Path p0){} + long getSize(); + void transferTo(File p0); } diff --git a/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/multipart/MultipartRequest.java b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/multipart/MultipartRequest.java index f5339b471667..d12b183596c4 100644 --- a/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/multipart/MultipartRequest.java +++ b/java/ql/test/stubs/springframework-5.3.8/org/springframework/web/multipart/MultipartRequest.java @@ -1,87 +1,19 @@ -/* - * Copyright 2002-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Generated automatically from org.springframework.web.multipart.MultipartRequest for testing purposes package org.springframework.web.multipart; import java.util.Iterator; import java.util.List; import java.util.Map; - -import org.springframework.lang.Nullable; import org.springframework.util.MultiValueMap; - -/** - * This interface defines the multipart request access operations that are exposed - * for actual multipart requests. It is extended by {@link MultipartHttpServletRequest}. - * - * @author Juergen Hoeller - * @author Arjen Poutsma - * @since 2.5.2 - */ -public interface MultipartRequest { - - /** - * Return an {@link java.util.Iterator} of String objects containing the - * parameter names of the multipart files contained in this request. These - * are the field names of the form (like with normal parameters), not the - * original file names. - * @return the names of the files - */ - Iterator getFileNames(); - - /** - * Return the contents plus description of an uploaded file in this request, - * or {@code null} if it does not exist. - * @param name a String specifying the parameter name of the multipart file - * @return the uploaded content in the form of a {@link MultipartFile} object - */ - @Nullable - MultipartFile getFile(String name); - - /** - * Return the contents plus description of uploaded files in this request, - * or an empty list if it does not exist. - * @param name a String specifying the parameter name of the multipart file - * @return the uploaded content in the form of a {@link MultipartFile} list - * @since 3.0 - */ - List getFiles(String name); - - /** - * Return a {@link java.util.Map} of the multipart files contained in this request. - * @return a map containing the parameter names as keys, and the - * {@link MultipartFile} objects as values - */ - Map getFileMap(); - - /** - * Return a {@link MultiValueMap} of the multipart files contained in this request. - * @return a map containing the parameter names as keys, and a list of - * {@link MultipartFile} objects as values - * @since 3.0 - */ - MultiValueMap getMultiFileMap(); - - /** - * Determine the content type of the specified request part. - * @param paramOrFileName the name of the part - * @return the associated content type, or {@code null} if not defined - * @since 3.1 - */ - @Nullable - String getMultipartContentType(String paramOrFileName); - +import org.springframework.web.multipart.MultipartFile; + +public interface MultipartRequest +{ + Iterator getFileNames(); + List getFiles(String p0); + Map getFileMap(); + MultiValueMap getMultiFileMap(); + MultipartFile getFile(String p0); + String getMultipartContentType(String p0); }