renamed all modules
This commit is contained in:
17
testdata-groovy/.classpath
Normal file
17
testdata-groovy/.classpath
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="con" path="org.springsource.ide.eclipse.gradle.classpathcontainer" exported="true"/>
|
||||
<classpathentry kind="con" path="GROOVY_DSL_SUPPORT" exported="true"/>
|
||||
<classpathentry kind="con" path="GROOVY_SUPPORT" exported="true"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
|
||||
<classpathentry sourcepath="/Users/aclement/.gradle/caches/artifacts-26/filestore/org.codehaus.groovy/groovy/1.8.2/source/671b51fe81fbc6b75de225cf914fd4b6020cb78e/groovy-1.8.2-sources.jar" kind="lib" path="/Users/aclement/.gradle/caches/artifacts-26/filestore/org.codehaus.groovy/groovy/1.8.2/jar/b8867fd0e6d72fba6188efc9e6cf461894fd7d6b/groovy-1.8.2.jar" exported="true"/>
|
||||
<classpathentry kind="lib" path="/Users/aclement/.gradle/caches/artifacts-26/filestore/antlr/antlr/2.7.7/jar/83cd2cd674a217ade95a4bb83a8a14f351f48bd0/antlr-2.7.7.jar" exported="true"/>
|
||||
<classpathentry kind="lib" path="/Users/aclement/.gradle/caches/artifacts-26/filestore/asm/asm/3.2/jar/9bc1511dec6adf302991ced13303e4140fdf9ab7/asm-3.2.jar" exported="true"/>
|
||||
<classpathentry kind="lib" path="/Users/aclement/.gradle/caches/artifacts-26/filestore/asm/asm-tree/3.2/jar/cd792e29c79d170c5d0bdd05adf5807cf6875c90/asm-tree-3.2.jar" exported="true"/>
|
||||
<classpathentry kind="lib" path="/Users/aclement/.gradle/caches/artifacts-26/filestore/asm/asm-commons/3.2/jar/e7a19b8c60589499e35f5d2068d09013030b8891/asm-commons-3.2.jar" exported="true"/>
|
||||
<classpathentry kind="lib" path="/Users/aclement/.gradle/caches/artifacts-26/filestore/asm/asm-util/3.2/jar/37ebfdad34d5f1f45109981465f311bbfbe82dcf/asm-util-3.2.jar" exported="true"/>
|
||||
<classpathentry kind="lib" path="/Users/aclement/.gradle/caches/artifacts-26/filestore/asm/asm-analysis/3.2/jar/c624956db93975b7197699dcd7de6145ca7cf2c8/asm-analysis-3.2.jar" exported="true"/>
|
||||
</classpath>
|
||||
18
testdata-groovy/.project
Normal file
18
testdata-groovy/.project
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>testdata-groovy</name>
|
||||
<comment/>
|
||||
<projects/>
|
||||
<natures>
|
||||
<nature>org.springsource.ide.eclipse.gradle.core.nature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
|
||||
</natures>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments/>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<linkedResources/>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,4 @@
|
||||
#org.springsource.ide.eclipse.gradle.core.preferences.GradleProjectPreferences
|
||||
#Thu Sep 05 20:20:55 CEST 2013
|
||||
org.springsource.ide.eclipse.gradle.linkedresources=
|
||||
org.springsource.ide.eclipse.gradle.rootprojectloc=..
|
||||
13
testdata-groovy/.settings/org.eclipse.jdt.core.prefs
Normal file
13
testdata-groovy/.settings/org.eclipse.jdt.core.prefs
Normal file
@@ -0,0 +1,13 @@
|
||||
#
|
||||
#Tue Jan 14 11:38:13 PST 2014
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
groovy.compiler.level=20
|
||||
55
testdata-groovy/.settings/org.eclipse.jdt.ui.prefs
Normal file
55
testdata-groovy/.settings/org.eclipse.jdt.ui.prefs
Normal file
@@ -0,0 +1,55 @@
|
||||
#Tue Dec 07 13:19:07 PST 2010
|
||||
eclipse.preferences.version=1
|
||||
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=false
|
||||
sp_cleanup.add_default_serial_version_id=true
|
||||
sp_cleanup.add_generated_serial_version_id=false
|
||||
sp_cleanup.add_missing_annotations=false
|
||||
sp_cleanup.add_missing_deprecated_annotations=true
|
||||
sp_cleanup.add_missing_methods=false
|
||||
sp_cleanup.add_missing_nls_tags=false
|
||||
sp_cleanup.add_missing_override_annotations=true
|
||||
sp_cleanup.add_missing_override_annotations_interface_methods=true
|
||||
sp_cleanup.add_serial_version_id=false
|
||||
sp_cleanup.always_use_blocks=true
|
||||
sp_cleanup.always_use_parentheses_in_expressions=false
|
||||
sp_cleanup.always_use_this_for_non_static_field_access=false
|
||||
sp_cleanup.always_use_this_for_non_static_method_access=false
|
||||
sp_cleanup.convert_to_enhanced_for_loop=true
|
||||
sp_cleanup.correct_indentation=true
|
||||
sp_cleanup.format_source_code=true
|
||||
sp_cleanup.format_source_code_changes_only=false
|
||||
sp_cleanup.make_local_variable_final=false
|
||||
sp_cleanup.make_parameters_final=false
|
||||
sp_cleanup.make_private_fields_final=true
|
||||
sp_cleanup.make_type_abstract_if_missing_method=false
|
||||
sp_cleanup.make_variable_declarations_final=false
|
||||
sp_cleanup.never_use_blocks=false
|
||||
sp_cleanup.never_use_parentheses_in_expressions=true
|
||||
sp_cleanup.on_save_use_additional_actions=true
|
||||
sp_cleanup.organize_imports=true
|
||||
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
|
||||
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
|
||||
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
|
||||
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
|
||||
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
|
||||
sp_cleanup.remove_private_constructors=true
|
||||
sp_cleanup.remove_trailing_whitespaces=true
|
||||
sp_cleanup.remove_trailing_whitespaces_all=true
|
||||
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
|
||||
sp_cleanup.remove_unnecessary_casts=true
|
||||
sp_cleanup.remove_unnecessary_nls_tags=false
|
||||
sp_cleanup.remove_unused_imports=true
|
||||
sp_cleanup.remove_unused_local_variables=false
|
||||
sp_cleanup.remove_unused_private_fields=true
|
||||
sp_cleanup.remove_unused_private_members=false
|
||||
sp_cleanup.remove_unused_private_methods=true
|
||||
sp_cleanup.remove_unused_private_types=true
|
||||
sp_cleanup.sort_members=false
|
||||
sp_cleanup.sort_members_all=false
|
||||
sp_cleanup.use_blocks=true
|
||||
sp_cleanup.use_blocks_only_for_return_and_throw=false
|
||||
sp_cleanup.use_parentheses_in_expressions=false
|
||||
sp_cleanup.use_this_for_non_static_field_access=false
|
||||
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
|
||||
sp_cleanup.use_this_for_non_static_method_access=false
|
||||
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
|
||||
351
testdata-groovy/LICENSES/LICENSE
Normal file
351
testdata-groovy/LICENSES/LICENSE
Normal file
@@ -0,0 +1,351 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
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
|
||||
|
||||
http://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.
|
||||
|
||||
=======================================================================
|
||||
|
||||
Spring Loaded 1.1.0:
|
||||
|
||||
Spring Loaded 1.1.0 includes a number of subcomponents with
|
||||
separate copyright notices and license terms. The product that
|
||||
includes this file does not necessarily use all the open source
|
||||
subcomponents referred to below. Your use of the source
|
||||
code for the these subcomponents is subject to the terms and
|
||||
conditions of the following licenses.
|
||||
|
||||
SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
|
||||
|
||||
>>> asm - 3.2
|
||||
>>> asm-commons - 3.2
|
||||
>>> asm-tree - 3.2
|
||||
>>> asm-util - 3.2
|
||||
|
||||
-------------SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES------------------------------
|
||||
|
||||
BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s)
|
||||
|
||||
|
||||
>>> asm - 3.2
|
||||
|
||||
ASM: a very small and fast Java bytecode manipulation framework
|
||||
Copyright (c) 2000-2007 INRIA, France Telecom
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
>>> asm-commons - 3.2
|
||||
|
||||
|
||||
ASM: a very small and fast Java bytecode manipulation framework
|
||||
Copyright (c) 2000-2005 INRIA, France Telecom
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
>>> asm-tree - 3.2
|
||||
|
||||
|
||||
ASM: a very small and fast Java bytecode manipulation framework
|
||||
Copyright (c) 2000-2005 INRIA, France Telecom
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
>>> asm-util - 3.2
|
||||
|
||||
ASM: a very small and fast Java bytecode manipulation framework
|
||||
Copyright (c) 2000-2005 INRIA, France Telecom
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
[SPRINGLOADED110KL072612]
|
||||
|
||||
13
testdata-groovy/build.gradle
Normal file
13
testdata-groovy/build.gradle
Normal file
@@ -0,0 +1,13 @@
|
||||
apply plugin: "groovy"
|
||||
|
||||
dependencies {
|
||||
compile 'org.codehaus.groovy:groovy:1.8.2'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
groovy {
|
||||
srcDir 'src'
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
testdata-groovy/groovy-1.8.2.jar
Normal file
BIN
testdata-groovy/groovy-1.8.2.jar
Normal file
Binary file not shown.
27
testdata-groovy/src/clinitg/Four.groovy
Normal file
27
testdata-groovy/src/clinitg/Four.groovy
Normal file
@@ -0,0 +1,27 @@
|
||||
package clinitg;
|
||||
|
||||
public class Four {
|
||||
|
||||
static {
|
||||
System.out.println("original clinit");
|
||||
bar()
|
||||
}
|
||||
|
||||
public static String run() {
|
||||
bar()
|
||||
boo()
|
||||
baz()
|
||||
}
|
||||
|
||||
public static void bar() {
|
||||
print '1'
|
||||
}
|
||||
|
||||
public static void boo() {
|
||||
print '2'
|
||||
}
|
||||
|
||||
public static void baz() {
|
||||
print '3'
|
||||
}
|
||||
}
|
||||
37
testdata-groovy/src/clinitg/Four2.groovy
Normal file
37
testdata-groovy/src/clinitg/Four2.groovy
Normal file
@@ -0,0 +1,37 @@
|
||||
package clinitg;
|
||||
|
||||
public class Four2 {
|
||||
|
||||
public static void biz() {
|
||||
print '1'
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static {
|
||||
bar()
|
||||
FourHelper.doo()
|
||||
}
|
||||
|
||||
public static String run() {
|
||||
bar()
|
||||
baz()
|
||||
biz()
|
||||
boo()
|
||||
}
|
||||
|
||||
public static void bar() {
|
||||
print '1'
|
||||
}
|
||||
|
||||
|
||||
public static void baz() {
|
||||
print '3'
|
||||
}
|
||||
|
||||
public static void boo() {
|
||||
print '2'
|
||||
}
|
||||
}
|
||||
10
testdata-groovy/src/clinitg/FourHelper.groovy
Normal file
10
testdata-groovy/src/clinitg/FourHelper.groovy
Normal file
@@ -0,0 +1,10 @@
|
||||
package clinitg;
|
||||
|
||||
public class FourHelper {
|
||||
|
||||
public static void doo() {
|
||||
print 'a'
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
10
testdata-groovy/src/clinitg/One.groovy
Normal file
10
testdata-groovy/src/clinitg/One.groovy
Normal file
@@ -0,0 +1,10 @@
|
||||
package clinitg;
|
||||
|
||||
public class One {
|
||||
|
||||
public static int i = 5;
|
||||
|
||||
public static String run() {
|
||||
return Integer.toString(i);
|
||||
}
|
||||
}
|
||||
10
testdata-groovy/src/clinitg/One2.groovy
Normal file
10
testdata-groovy/src/clinitg/One2.groovy
Normal file
@@ -0,0 +1,10 @@
|
||||
package clinitg;
|
||||
|
||||
public class One2 {
|
||||
|
||||
public static int i = 7;
|
||||
|
||||
public static String run() {
|
||||
return Integer.toString(i);
|
||||
}
|
||||
}
|
||||
10
testdata-groovy/src/clinitg/Three.groovy
Normal file
10
testdata-groovy/src/clinitg/Three.groovy
Normal file
@@ -0,0 +1,10 @@
|
||||
package clinitg;
|
||||
|
||||
public class Three {
|
||||
|
||||
// i have no clinit
|
||||
|
||||
public static String run() {
|
||||
return "1";
|
||||
}
|
||||
}
|
||||
10
testdata-groovy/src/clinitg/Three2.groovy
Normal file
10
testdata-groovy/src/clinitg/Three2.groovy
Normal file
@@ -0,0 +1,10 @@
|
||||
package clinitg;
|
||||
|
||||
public class Three2 {
|
||||
|
||||
// still no clinit
|
||||
|
||||
public static String run() {
|
||||
return "1";
|
||||
}
|
||||
}
|
||||
13
testdata-groovy/src/clinitg/Three3.groovy
Normal file
13
testdata-groovy/src/clinitg/Three3.groovy
Normal file
@@ -0,0 +1,13 @@
|
||||
package clinitg;
|
||||
|
||||
public class Three3 {
|
||||
|
||||
static int i;
|
||||
{
|
||||
i = 4;
|
||||
}
|
||||
|
||||
public static String run() {
|
||||
return Integer.toString(i);
|
||||
}
|
||||
}
|
||||
10
testdata-groovy/src/clinitg/Two.groovy
Normal file
10
testdata-groovy/src/clinitg/Two.groovy
Normal file
@@ -0,0 +1,10 @@
|
||||
package clinitg;
|
||||
|
||||
public class Two {
|
||||
|
||||
public final static int i = 55;
|
||||
|
||||
public static String run() {
|
||||
return Integer.toString(i);
|
||||
}
|
||||
}
|
||||
10
testdata-groovy/src/clinitg/Two2.groovy
Normal file
10
testdata-groovy/src/clinitg/Two2.groovy
Normal file
@@ -0,0 +1,10 @@
|
||||
package clinitg;
|
||||
|
||||
public class Two2 {
|
||||
|
||||
public final static int i = 99;
|
||||
|
||||
public static String run() {
|
||||
return Integer.toString(i);
|
||||
}
|
||||
}
|
||||
117
testdata-groovy/src/controller/Controller.groovy
Normal file
117
testdata-groovy/src/controller/Controller.groovy
Normal file
@@ -0,0 +1,117 @@
|
||||
package controller
|
||||
|
||||
class Controller {
|
||||
|
||||
def index = {
|
||||
run(action: "list", params: "2")
|
||||
}
|
||||
|
||||
public void printSomethingRandom() {
|
||||
System.out.println("abcde")
|
||||
}
|
||||
|
||||
public void run(Map m) {
|
||||
System.out.println(m);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new Controller().index() // prints [action:list, params:2]
|
||||
}
|
||||
|
||||
public void execute() {
|
||||
new Controller().index() // prints [action:list, params:2]
|
||||
}
|
||||
|
||||
|
||||
// def list = {
|
||||
// params.max = Math.min(params.max ? params.int('max') : 10, 100)
|
||||
// [testInstanceList: Test.list(params), testInstanceTotal: Test.count()]
|
||||
// }
|
||||
//
|
||||
// def create = {
|
||||
// def testInstance = new Test()
|
||||
// testInstance.properties = params
|
||||
// return [testInstance: testInstance]
|
||||
// }
|
||||
//
|
||||
// def save = {
|
||||
// def testInstance = new Test(params)
|
||||
// if (testInstance.save(flush: true)) {
|
||||
// flash.message = "${message(code: 'default.created.message', args: [message(code: 'test.label', default: 'Test'), testInstance.id])}"
|
||||
// redirect(action: "show", id: testInstance.id)
|
||||
// }
|
||||
// else {
|
||||
// render(view: "create", model: [testInstance: testInstance])
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// def show = {
|
||||
// def testInstance = Test.get(params.id)
|
||||
// if (!testInstance) {
|
||||
// flash.message = "${message(code: 'default.not.found.message', args: [message(code: 'test.label', default: 'Test'), params.id])}"
|
||||
// redirect(action: "list")
|
||||
// }
|
||||
// else {
|
||||
// [testInstance: testInstance]
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// def edit = {
|
||||
// def testInstance = Test.get(params.id)
|
||||
// if (!testInstance) {
|
||||
// flash.message = "${message(code: 'default.not.found.message', args: [message(code: 'test.label', default: 'Test'), params.id])}"
|
||||
// redirect(action: "list")
|
||||
// }
|
||||
// else {
|
||||
// return [testInstance: testInstance]
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// def update = {
|
||||
// def testInstance = Test.get(params.id)
|
||||
// if (testInstance) {
|
||||
// if (params.version) {
|
||||
// def version = params.version.toLong()
|
||||
// if (testInstance.version > version) {
|
||||
//
|
||||
// testInstance.errors.rejectValue("version", "default.optimistic.locking.failure", [message(code: 'test.label', default: 'Test')] as Object[], "Another user has updated this Test while you were editing")
|
||||
// render(view: "edit", model: [testInstance: testInstance])
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
// testInstance.properties = params
|
||||
// if (!testInstance.hasErrors() && testInstance.save(flush: true)) {
|
||||
// flash.message = "${message(code: 'default.updated.message', args: [message(code: 'test.label', default: 'Test'), testInstance.id])}"
|
||||
// redirect(action: "show", id: testInstance.id)
|
||||
// }
|
||||
// else {
|
||||
// render(view: "edit", model: [testInstance: testInstance])
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// flash.message = "${message(code: 'default.not.found.message', args: [message(code: 'test.label', default: 'Test'), params.id])}"
|
||||
// redirect(action: "list")
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// def delete = {
|
||||
// def testInstance = Test.get(params.id)
|
||||
// if (testInstance) {
|
||||
// try {
|
||||
// testInstance.delete(flush: true)
|
||||
// flash.message = "${message(code: 'default.deleted.message', args: [message(code: 'test.label', default: 'Test'), params.id])}"
|
||||
// redirect(action: "list")
|
||||
// }
|
||||
// catch (org.springframework.dao.DataIntegrityViolationException e) {
|
||||
// flash.message = "${message(code: 'default.not.deleted.message', args: [message(code: 'test.label', default: 'Test'), params.id])}"
|
||||
// redirect(action: "show", id: params.id)
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// flash.message = "${message(code: 'default.not.found.message', args: [message(code: 'test.label', default: 'Test'), params.id])}"
|
||||
// redirect(action: "list")
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
117
testdata-groovy/src/controller/Controller2.groovy
Normal file
117
testdata-groovy/src/controller/Controller2.groovy
Normal file
@@ -0,0 +1,117 @@
|
||||
package controller
|
||||
|
||||
class Controller2 {
|
||||
|
||||
def index = {
|
||||
run(action: "custard", params: "345")
|
||||
}
|
||||
|
||||
public void printSomethingRandom() {
|
||||
System.out.println("abcde")
|
||||
}
|
||||
|
||||
public void run(Map m) {
|
||||
System.out.println(m);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new Controller2().index() // prints [action:list, params:2]
|
||||
}
|
||||
|
||||
public void execute() {
|
||||
new Controller2().index() // prints [action:list, params:2]
|
||||
}
|
||||
|
||||
|
||||
// def list = {
|
||||
// params.max = Math.min(params.max ? params.int('max') : 10, 100)
|
||||
// [testInstanceList: Test.list(params), testInstanceTotal: Test.count()]
|
||||
// }
|
||||
//
|
||||
// def create = {
|
||||
// def testInstance = new Test()
|
||||
// testInstance.properties = params
|
||||
// return [testInstance: testInstance]
|
||||
// }
|
||||
//
|
||||
// def save = {
|
||||
// def testInstance = new Test(params)
|
||||
// if (testInstance.save(flush: true)) {
|
||||
// flash.message = "${message(code: 'default.created.message', args: [message(code: 'test.label', default: 'Test'), testInstance.id])}"
|
||||
// redirect(action: "show", id: testInstance.id)
|
||||
// }
|
||||
// else {
|
||||
// render(view: "create", model: [testInstance: testInstance])
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// def show = {
|
||||
// def testInstance = Test.get(params.id)
|
||||
// if (!testInstance) {
|
||||
// flash.message = "${message(code: 'default.not.found.message', args: [message(code: 'test.label', default: 'Test'), params.id])}"
|
||||
// redirect(action: "list")
|
||||
// }
|
||||
// else {
|
||||
// [testInstance: testInstance]
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// def edit = {
|
||||
// def testInstance = Test.get(params.id)
|
||||
// if (!testInstance) {
|
||||
// flash.message = "${message(code: 'default.not.found.message', args: [message(code: 'test.label', default: 'Test'), params.id])}"
|
||||
// redirect(action: "list")
|
||||
// }
|
||||
// else {
|
||||
// return [testInstance: testInstance]
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// def update = {
|
||||
// def testInstance = Test.get(params.id)
|
||||
// if (testInstance) {
|
||||
// if (params.version) {
|
||||
// def version = params.version.toLong()
|
||||
// if (testInstance.version > version) {
|
||||
//
|
||||
// testInstance.errors.rejectValue("version", "default.optimistic.locking.failure", [message(code: 'test.label', default: 'Test')] as Object[], "Another user has updated this Test while you were editing")
|
||||
// render(view: "edit", model: [testInstance: testInstance])
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
// testInstance.properties = params
|
||||
// if (!testInstance.hasErrors() && testInstance.save(flush: true)) {
|
||||
// flash.message = "${message(code: 'default.updated.message', args: [message(code: 'test.label', default: 'Test'), testInstance.id])}"
|
||||
// redirect(action: "show", id: testInstance.id)
|
||||
// }
|
||||
// else {
|
||||
// render(view: "edit", model: [testInstance: testInstance])
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// flash.message = "${message(code: 'default.not.found.message', args: [message(code: 'test.label', default: 'Test'), params.id])}"
|
||||
// redirect(action: "list")
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// def delete = {
|
||||
// def testInstance = Test.get(params.id)
|
||||
// if (testInstance) {
|
||||
// try {
|
||||
// testInstance.delete(flush: true)
|
||||
// flash.message = "${message(code: 'default.deleted.message', args: [message(code: 'test.label', default: 'Test'), params.id])}"
|
||||
// redirect(action: "list")
|
||||
// }
|
||||
// catch (org.springframework.dao.DataIntegrityViolationException e) {
|
||||
// flash.message = "${message(code: 'default.not.deleted.message', args: [message(code: 'test.label', default: 'Test'), params.id])}"
|
||||
// redirect(action: "show", id: params.id)
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// flash.message = "${message(code: 'default.not.found.message', args: [message(code: 'test.label', default: 'Test'), params.id])}"
|
||||
// redirect(action: "list")
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
122
testdata-groovy/src/controller/Controller3.groovy
Normal file
122
testdata-groovy/src/controller/Controller3.groovy
Normal file
@@ -0,0 +1,122 @@
|
||||
package controller
|
||||
|
||||
class Controller3 {
|
||||
|
||||
def preIndex = {
|
||||
printSomethingRandom()
|
||||
}
|
||||
|
||||
def index = {
|
||||
run(action: "custard", params: "345")
|
||||
}
|
||||
|
||||
public void printSomethingRandom() {
|
||||
System.out.println("abcde")
|
||||
}
|
||||
|
||||
public void run(Map m) {
|
||||
System.out.println(m)
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new Controller3().index() // prints [action:list, params:2]
|
||||
}
|
||||
|
||||
public void execute() {
|
||||
new Controller3().index() // prints [action:list, params:2]
|
||||
}
|
||||
|
||||
|
||||
|
||||
// def list = {
|
||||
// params.max = Math.min(params.max ? params.int('max') : 10, 100)
|
||||
// [testInstanceList: Test.list(params), testInstanceTotal: Test.count()]
|
||||
// }
|
||||
//
|
||||
// def create = {
|
||||
// def testInstance = new Test()
|
||||
// testInstance.properties = params
|
||||
// return [testInstance: testInstance]
|
||||
// }
|
||||
//
|
||||
// def save = {
|
||||
// def testInstance = new Test(params)
|
||||
// if (testInstance.save(flush: true)) {
|
||||
// flash.message = "${message(code: 'default.created.message', args: [message(code: 'test.label', default: 'Test'), testInstance.id])}"
|
||||
// redirect(action: "show", id: testInstance.id)
|
||||
// }
|
||||
// else {
|
||||
// render(view: "create", model: [testInstance: testInstance])
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// def show = {
|
||||
// def testInstance = Test.get(params.id)
|
||||
// if (!testInstance) {
|
||||
// flash.message = "${message(code: 'default.not.found.message', args: [message(code: 'test.label', default: 'Test'), params.id])}"
|
||||
// redirect(action: "list")
|
||||
// }
|
||||
// else {
|
||||
// [testInstance: testInstance]
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// def edit = {
|
||||
// def testInstance = Test.get(params.id)
|
||||
// if (!testInstance) {
|
||||
// flash.message = "${message(code: 'default.not.found.message', args: [message(code: 'test.label', default: 'Test'), params.id])}"
|
||||
// redirect(action: "list")
|
||||
// }
|
||||
// else {
|
||||
// return [testInstance: testInstance]
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// def update = {
|
||||
// def testInstance = Test.get(params.id)
|
||||
// if (testInstance) {
|
||||
// if (params.version) {
|
||||
// def version = params.version.toLong()
|
||||
// if (testInstance.version > version) {
|
||||
//
|
||||
// testInstance.errors.rejectValue("version", "default.optimistic.locking.failure", [message(code: 'test.label', default: 'Test')] as Object[], "Another user has updated this Test while you were editing")
|
||||
// render(view: "edit", model: [testInstance: testInstance])
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
// testInstance.properties = params
|
||||
// if (!testInstance.hasErrors() && testInstance.save(flush: true)) {
|
||||
// flash.message = "${message(code: 'default.updated.message', args: [message(code: 'test.label', default: 'Test'), testInstance.id])}"
|
||||
// redirect(action: "show", id: testInstance.id)
|
||||
// }
|
||||
// else {
|
||||
// render(view: "edit", model: [testInstance: testInstance])
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// flash.message = "${message(code: 'default.not.found.message', args: [message(code: 'test.label', default: 'Test'), params.id])}"
|
||||
// redirect(action: "list")
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// def delete = {
|
||||
// def testInstance = Test.get(params.id)
|
||||
// if (testInstance) {
|
||||
// try {
|
||||
// testInstance.delete(flush: true)
|
||||
// flash.message = "${message(code: 'default.deleted.message', args: [message(code: 'test.label', default: 'Test'), params.id])}"
|
||||
// redirect(action: "list")
|
||||
// }
|
||||
// catch (org.springframework.dao.DataIntegrityViolationException e) {
|
||||
// flash.message = "${message(code: 'default.not.deleted.message', args: [message(code: 'test.label', default: 'Test'), params.id])}"
|
||||
// redirect(action: "show", id: params.id)
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// flash.message = "${message(code: 'default.not.found.message', args: [message(code: 'test.label', default: 'Test'), params.id])}"
|
||||
// redirect(action: "list")
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
7
testdata-groovy/src/enums/ExtensibleEnum.groovy
Normal file
7
testdata-groovy/src/enums/ExtensibleEnum.groovy
Normal file
@@ -0,0 +1,7 @@
|
||||
package enums
|
||||
|
||||
interface ExtensibleEnum {
|
||||
|
||||
int getIntValue()
|
||||
|
||||
}
|
||||
7
testdata-groovy/src/enums/ExtensibleEnum3.groovy
Normal file
7
testdata-groovy/src/enums/ExtensibleEnum3.groovy
Normal file
@@ -0,0 +1,7 @@
|
||||
package enums
|
||||
|
||||
interface ExtensibleEnum3 {
|
||||
|
||||
int getValue()
|
||||
|
||||
}
|
||||
7
testdata-groovy/src/enums/ExtensibleEnumB.groovy
Normal file
7
testdata-groovy/src/enums/ExtensibleEnumB.groovy
Normal file
@@ -0,0 +1,7 @@
|
||||
package enums
|
||||
|
||||
interface ExtensibleEnumB {
|
||||
|
||||
int getIntValue()
|
||||
|
||||
}
|
||||
24
testdata-groovy/src/enums/RunnerA.java
Normal file
24
testdata-groovy/src/enums/RunnerA.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package enums;
|
||||
|
||||
public class RunnerA {
|
||||
|
||||
public static void main(String[] args) {
|
||||
run();
|
||||
}
|
||||
|
||||
public static void run() {
|
||||
System.out.println(WhatAnEnum.RED);
|
||||
System.out.println(WhatAnEnum.GREEN);
|
||||
System.out.println(WhatAnEnum.BLUE);
|
||||
WhatAnEnum[] vals = WhatAnEnum.values();
|
||||
System.out.print("[");
|
||||
for (int i = 0; i < vals.length; i++) {
|
||||
if (i > 0) {
|
||||
System.out.print(" ");
|
||||
}
|
||||
System.out.print(vals[i]==null?"NULL":vals[i].toString());//+" "+vals[i].getIntValue());
|
||||
}
|
||||
System.out.println("]");
|
||||
System.out.println("value count = " + vals.length);
|
||||
}
|
||||
}
|
||||
24
testdata-groovy/src/enums/RunnerB.java
Normal file
24
testdata-groovy/src/enums/RunnerB.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package enums;
|
||||
|
||||
public class RunnerB {
|
||||
|
||||
public static void main(String[] args) {
|
||||
run();
|
||||
}
|
||||
|
||||
public static void run() {
|
||||
System.out.println(WhatAnEnumB.HAVING_A_NICE_TIME);
|
||||
System.out.println(WhatAnEnumB.JUMPING_INTO_A_HOOP);
|
||||
System.out.println(WhatAnEnumB.LIVING_ON_A_LOG);
|
||||
WhatAnEnumB[] vals = WhatAnEnumB.values();
|
||||
System.out.print("[");
|
||||
for (int i = 0; i < vals.length; i++) {
|
||||
if (i > 0) {
|
||||
System.out.print(" ");
|
||||
}
|
||||
System.out.print(vals[i]+" "+vals[i].getIntValue());
|
||||
}
|
||||
System.out.println("]");
|
||||
System.out.println("value count = " + vals.length);
|
||||
}
|
||||
}
|
||||
29
testdata-groovy/src/enums/WhatAnEnum.groovy
Normal file
29
testdata-groovy/src/enums/WhatAnEnum.groovy
Normal file
@@ -0,0 +1,29 @@
|
||||
package enums
|
||||
|
||||
enum WhatAnEnum {//implements ExtensibleEnum {
|
||||
|
||||
RED,//(1),
|
||||
GREEN,//(2),
|
||||
BLUE//(3),
|
||||
|
||||
// private WhatAnEnum(String s, int i) {
|
||||
// super(s,i);
|
||||
// print ">>"+s+" "+i
|
||||
// }
|
||||
|
||||
// LIVING_ON_A_LOG,//(4),
|
||||
// WHAT_DID_YOU_DO,//(5),
|
||||
// UNKNOWN//(0)
|
||||
|
||||
// final int intValue
|
||||
// private WhatAnEnum(int intValue) {
|
||||
// this.intValue = intValue
|
||||
// }
|
||||
//
|
||||
// private static final Map<Integer, WhatAnEnum> MAP = [:] as Map<Integer, WhatAnEnum>
|
||||
// static {
|
||||
// WhatAnEnum.values().each { WhatAnEnum response ->
|
||||
// MAP.put(response.intValue, response)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
33
testdata-groovy/src/enums/WhatAnEnum2.groovy
Normal file
33
testdata-groovy/src/enums/WhatAnEnum2.groovy
Normal file
@@ -0,0 +1,33 @@
|
||||
package enums
|
||||
|
||||
enum WhatAnEnum2 { // implements ExtensibleEnum {
|
||||
|
||||
RED,GREEN,BLUE,YELLOW;
|
||||
|
||||
// private WhatAnEnum2(String s, int i) {
|
||||
// super(s,i);
|
||||
// print ">>"+s+" "+i
|
||||
// }
|
||||
|
||||
// PETS_AT_THE_DISCO,//(1),
|
||||
// JUMPING_INTO_A_HOOP,//(2),
|
||||
// HAVING_A_NICE_TIME,//(3),
|
||||
// LIVING_ON_A_LOG,//(4),
|
||||
// WHAT_DID_YOU_DO,//(5),
|
||||
// WOBBLE,//(6),
|
||||
// UNKNOWN//(0)
|
||||
|
||||
// final int intValue
|
||||
//
|
||||
// private WhatAnEnum2(int intValue) {
|
||||
// this.intValue = intValue
|
||||
// }
|
||||
//
|
||||
// private static final Map<Integer, WhatAnEnum2> MAP = [:] as Map<Integer, WhatAnEnum2>
|
||||
//
|
||||
// static {
|
||||
// WhatAnEnum2.values().each { WhatAnEnum2 response ->
|
||||
// MAP.put(response.intValue, response)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
26
testdata-groovy/src/enums/WhatAnEnum3.groovy
Normal file
26
testdata-groovy/src/enums/WhatAnEnum3.groovy
Normal file
@@ -0,0 +1,26 @@
|
||||
package enums
|
||||
|
||||
enum WhatAnEnum3 implements ExtensibleEnum3 {
|
||||
|
||||
PETS_AT_THE_DISCO(1),
|
||||
JUMPING_INTO_A_HOOP(2),
|
||||
HAVING_A_NICE_TIME(3),
|
||||
LIVING_ON_A_LOG(4),
|
||||
WHAT_DID_YOU_DO(5),
|
||||
WOBBLE(6),
|
||||
UNKNOWN(0)
|
||||
|
||||
final int value
|
||||
|
||||
private WhatAnEnum3(int intValue) {
|
||||
this.value = intValue
|
||||
}
|
||||
|
||||
private static final Map<Integer, WhatAnEnum3> MAP = [:] as Map<Integer, WhatAnEnum3>
|
||||
|
||||
static {
|
||||
WhatAnEnum3.values().each { WhatAnEnum3 response ->
|
||||
MAP.put(response.value, response)
|
||||
}
|
||||
}
|
||||
}
|
||||
23
testdata-groovy/src/enums/WhatAnEnumB.groovy
Normal file
23
testdata-groovy/src/enums/WhatAnEnumB.groovy
Normal file
@@ -0,0 +1,23 @@
|
||||
package enums
|
||||
|
||||
enum WhatAnEnumB implements ExtensibleEnumB {
|
||||
|
||||
PETS_AT_THE_DISCO(1),
|
||||
JUMPING_INTO_A_HOOP(2),
|
||||
HAVING_A_NICE_TIME(3),
|
||||
LIVING_ON_A_LOG(4),
|
||||
WHAT_DID_YOU_DO(5),
|
||||
UNKNOWN(0)
|
||||
|
||||
final int intValue
|
||||
private WhatAnEnumB(int intValue) {
|
||||
this.intValue = intValue
|
||||
}
|
||||
|
||||
private static final Map<Integer, WhatAnEnumB> MAP = [:] as Map<Integer, WhatAnEnumB>
|
||||
static {
|
||||
WhatAnEnumB.values().each { WhatAnEnumB response ->
|
||||
MAP.put(response.intValue, response)
|
||||
}
|
||||
}
|
||||
}
|
||||
26
testdata-groovy/src/enums/WhatAnEnumB2.groovy
Normal file
26
testdata-groovy/src/enums/WhatAnEnumB2.groovy
Normal file
@@ -0,0 +1,26 @@
|
||||
package enums
|
||||
|
||||
enum WhatAnEnumB2 implements ExtensibleEnumB {
|
||||
|
||||
PETS_AT_THE_DISCO(1),
|
||||
JUMPING_INTO_A_HOOP(2),
|
||||
HAVING_A_NICE_TIME(3),
|
||||
LIVING_ON_A_LOG(4),
|
||||
WHAT_DID_YOU_DO(5),
|
||||
WOBBLE(6),
|
||||
UNKNOWN(0)
|
||||
|
||||
final int intValue
|
||||
|
||||
private WhatAnEnumB2(int intValue) {
|
||||
this.intValue = intValue
|
||||
}
|
||||
|
||||
private static final Map<Integer, WhatAnEnumB2> MAP = [:] as Map<Integer, WhatAnEnumB2>
|
||||
|
||||
static {
|
||||
WhatAnEnumB2.values().each { WhatAnEnumB2 response ->
|
||||
MAP.put(response.intValue, response)
|
||||
}
|
||||
}
|
||||
}
|
||||
6
testdata-groovy/src/simple/Back.groovy
Normal file
6
testdata-groovy/src/simple/Back.groovy
Normal file
@@ -0,0 +1,6 @@
|
||||
package simple
|
||||
|
||||
class Back {
|
||||
|
||||
int var = 35
|
||||
}
|
||||
9
testdata-groovy/src/simple/Back2.groovy
Normal file
9
testdata-groovy/src/simple/Back2.groovy
Normal file
@@ -0,0 +1,9 @@
|
||||
package simple
|
||||
|
||||
class Back2 {
|
||||
|
||||
int var = 35
|
||||
|
||||
int var2= 3355
|
||||
|
||||
}
|
||||
7
testdata-groovy/src/simple/Basic.groovy
Normal file
7
testdata-groovy/src/simple/Basic.groovy
Normal file
@@ -0,0 +1,7 @@
|
||||
package simple
|
||||
|
||||
class Basic {
|
||||
public String run() {
|
||||
return 'hello'
|
||||
}
|
||||
}
|
||||
8
testdata-groovy/src/simple/Basic2.groovy
Normal file
8
testdata-groovy/src/simple/Basic2.groovy
Normal file
@@ -0,0 +1,8 @@
|
||||
package simple
|
||||
|
||||
class Basic2 {
|
||||
public String run() {
|
||||
return 'goodbye'
|
||||
|
||||
}
|
||||
}
|
||||
11
testdata-groovy/src/simple/Basic3.groovy
Normal file
11
testdata-groovy/src/simple/Basic3.groovy
Normal file
@@ -0,0 +1,11 @@
|
||||
package simple
|
||||
|
||||
class Basic3 {
|
||||
public String run() {
|
||||
return getString();
|
||||
}
|
||||
|
||||
public String getString() {
|
||||
return 'abc'
|
||||
}
|
||||
}
|
||||
7
testdata-groovy/src/simple/Basic4.groovy
Normal file
7
testdata-groovy/src/simple/Basic4.groovy
Normal file
@@ -0,0 +1,7 @@
|
||||
package simple
|
||||
|
||||
class Basic4 implements Serializable {
|
||||
public String run() {
|
||||
return 'hello'
|
||||
}
|
||||
}
|
||||
11
testdata-groovy/src/simple/BasicB.groovy
Normal file
11
testdata-groovy/src/simple/BasicB.groovy
Normal file
@@ -0,0 +1,11 @@
|
||||
package simple
|
||||
|
||||
class BasicB {
|
||||
public static String run() {
|
||||
return getString();
|
||||
}
|
||||
|
||||
public static String getString() {
|
||||
return "hello"
|
||||
}
|
||||
}
|
||||
15
testdata-groovy/src/simple/BasicB2.groovy
Normal file
15
testdata-groovy/src/simple/BasicB2.groovy
Normal file
@@ -0,0 +1,15 @@
|
||||
package simple
|
||||
|
||||
class BasicB2 {
|
||||
public static String run() {
|
||||
return getOtherString();
|
||||
}
|
||||
|
||||
public static String getString() {
|
||||
return "hello"
|
||||
}
|
||||
|
||||
public static String getOtherString() {
|
||||
return "goodbye"
|
||||
}
|
||||
}
|
||||
11
testdata-groovy/src/simple/BasicC.groovy
Normal file
11
testdata-groovy/src/simple/BasicC.groovy
Normal file
@@ -0,0 +1,11 @@
|
||||
package simple
|
||||
|
||||
class BasicC {
|
||||
public String run() {
|
||||
return getString();
|
||||
}
|
||||
|
||||
public String getString() {
|
||||
return "hello"
|
||||
}
|
||||
}
|
||||
15
testdata-groovy/src/simple/BasicC2.groovy
Normal file
15
testdata-groovy/src/simple/BasicC2.groovy
Normal file
@@ -0,0 +1,15 @@
|
||||
package simple
|
||||
|
||||
class BasicC2 {
|
||||
public String run() {
|
||||
return getOtherString();
|
||||
}
|
||||
|
||||
public String getString() {
|
||||
return "hello"
|
||||
}
|
||||
|
||||
public String getOtherString() {
|
||||
return "goodbye"
|
||||
}
|
||||
}
|
||||
9
testdata-groovy/src/simple/BasicD.groovy
Normal file
9
testdata-groovy/src/simple/BasicD.groovy
Normal file
@@ -0,0 +1,9 @@
|
||||
package simple
|
||||
|
||||
class BasicD {
|
||||
|
||||
public String run() {
|
||||
return 'hello'
|
||||
}
|
||||
|
||||
}
|
||||
9
testdata-groovy/src/simple/BasicD2.groovy
Normal file
9
testdata-groovy/src/simple/BasicD2.groovy
Normal file
@@ -0,0 +1,9 @@
|
||||
package simple
|
||||
|
||||
class BasicD2 {
|
||||
|
||||
public String run() {
|
||||
return BasicDTarget2.getString()
|
||||
}
|
||||
|
||||
}
|
||||
7
testdata-groovy/src/simple/BasicDTarget.groovy
Normal file
7
testdata-groovy/src/simple/BasicDTarget.groovy
Normal file
@@ -0,0 +1,7 @@
|
||||
package simple
|
||||
|
||||
class BasicDTarget {
|
||||
|
||||
|
||||
|
||||
}
|
||||
7
testdata-groovy/src/simple/BasicDTarget2.groovy
Normal file
7
testdata-groovy/src/simple/BasicDTarget2.groovy
Normal file
@@ -0,0 +1,7 @@
|
||||
package simple
|
||||
|
||||
class BasicDTarget2 {
|
||||
|
||||
static String getString() { return 'abc' }
|
||||
|
||||
}
|
||||
12
testdata-groovy/src/simple/BasicE.groovy
Normal file
12
testdata-groovy/src/simple/BasicE.groovy
Normal file
@@ -0,0 +1,12 @@
|
||||
package simple
|
||||
|
||||
class BasicE {
|
||||
|
||||
public String run() {
|
||||
// BasicETarget t = new BasicETarget()
|
||||
|
||||
// return t.getString()
|
||||
return 'hello'
|
||||
}
|
||||
|
||||
}
|
||||
10
testdata-groovy/src/simple/BasicE2.groovy
Normal file
10
testdata-groovy/src/simple/BasicE2.groovy
Normal file
@@ -0,0 +1,10 @@
|
||||
package simple
|
||||
|
||||
class BasicE2 {
|
||||
|
||||
public String run() {
|
||||
BasicETarget t = new BasicETarget()
|
||||
return t.getString()
|
||||
}
|
||||
|
||||
}
|
||||
5
testdata-groovy/src/simple/BasicETarget.groovy
Normal file
5
testdata-groovy/src/simple/BasicETarget.groovy
Normal file
@@ -0,0 +1,5 @@
|
||||
package simple
|
||||
|
||||
class BasicETarget {
|
||||
|
||||
}
|
||||
7
testdata-groovy/src/simple/BasicETarget2.groovy
Normal file
7
testdata-groovy/src/simple/BasicETarget2.groovy
Normal file
@@ -0,0 +1,7 @@
|
||||
package simple
|
||||
|
||||
class BasicETarget2 {
|
||||
|
||||
String getString() { return 'foobar' }
|
||||
|
||||
}
|
||||
10
testdata-groovy/src/simple/BasicF.groovy
Normal file
10
testdata-groovy/src/simple/BasicF.groovy
Normal file
@@ -0,0 +1,10 @@
|
||||
package simple
|
||||
|
||||
class BasicF {
|
||||
|
||||
public String run() {
|
||||
BasicFTarget t = new BasicFTarget()
|
||||
return t.getString()
|
||||
}
|
||||
|
||||
}
|
||||
8
testdata-groovy/src/simple/BasicFTarget.groovy
Normal file
8
testdata-groovy/src/simple/BasicFTarget.groovy
Normal file
@@ -0,0 +1,8 @@
|
||||
package simple
|
||||
|
||||
class BasicFTarget {
|
||||
int d= 4456;
|
||||
public String getString() {
|
||||
return '123'
|
||||
}
|
||||
}
|
||||
5
testdata-groovy/src/simple/BasicFTarget2.groovy
Normal file
5
testdata-groovy/src/simple/BasicFTarget2.groovy
Normal file
@@ -0,0 +1,5 @@
|
||||
package simple
|
||||
|
||||
class BasicFTarget2 {
|
||||
|
||||
}
|
||||
9
testdata-groovy/src/simple/BasicFTarget4.groovy
Normal file
9
testdata-groovy/src/simple/BasicFTarget4.groovy
Normal file
@@ -0,0 +1,9 @@
|
||||
package simple
|
||||
|
||||
class BasicFTarget4 {
|
||||
int d = 4456;
|
||||
|
||||
int getString() {
|
||||
return d
|
||||
}
|
||||
}
|
||||
9
testdata-groovy/src/simple/BasicG.groovy
Normal file
9
testdata-groovy/src/simple/BasicG.groovy
Normal file
@@ -0,0 +1,9 @@
|
||||
package simple
|
||||
|
||||
class BasicG {
|
||||
|
||||
public String run() {
|
||||
return BasicGTarget.foo()
|
||||
}
|
||||
|
||||
}
|
||||
5
testdata-groovy/src/simple/BasicGTarget.groovy
Normal file
5
testdata-groovy/src/simple/BasicGTarget.groovy
Normal file
@@ -0,0 +1,5 @@
|
||||
package simple
|
||||
|
||||
class BasicGTarget {
|
||||
|
||||
}
|
||||
7
testdata-groovy/src/simple/BasicGTarget2.groovy
Normal file
7
testdata-groovy/src/simple/BasicGTarget2.groovy
Normal file
@@ -0,0 +1,7 @@
|
||||
package simple
|
||||
|
||||
class BasicGTarget2 {
|
||||
|
||||
static String foo() { return 'hw' }
|
||||
|
||||
}
|
||||
25
testdata-groovy/src/simple/BasicH.groovy
Normal file
25
testdata-groovy/src/simple/BasicH.groovy
Normal file
@@ -0,0 +1,25 @@
|
||||
package simple
|
||||
|
||||
class BasicH {
|
||||
|
||||
public String run() {
|
||||
// warmup
|
||||
for (int i=0;i<100000;i++) {
|
||||
m();
|
||||
}
|
||||
// measure
|
||||
long l = System.currentTimeMillis()
|
||||
for (int i=0;i<1000000;i++) {
|
||||
m();
|
||||
}
|
||||
return Long.toString(System.currentTimeMillis()-l);
|
||||
}
|
||||
|
||||
public void m() {
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
println new BasicH().run();
|
||||
}
|
||||
}
|
||||
17
testdata-groovy/src/simple/BasicWithClosure.groovy
Normal file
17
testdata-groovy/src/simple/BasicWithClosure.groovy
Normal file
@@ -0,0 +1,17 @@
|
||||
package simple
|
||||
|
||||
class BasicWithClosure {
|
||||
|
||||
def clos =null;
|
||||
|
||||
public String run() {
|
||||
clos = { println "hello!" }
|
||||
print "Executing:"
|
||||
clos()
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new BasicWithClosure().run();
|
||||
}
|
||||
|
||||
}
|
||||
17
testdata-groovy/src/simple/BasicWithClosure2.groovy
Normal file
17
testdata-groovy/src/simple/BasicWithClosure2.groovy
Normal file
@@ -0,0 +1,17 @@
|
||||
package simple
|
||||
|
||||
class BasicWithClosure2 {
|
||||
|
||||
def clos = null;
|
||||
|
||||
public String run() {
|
||||
clos = { println "hello!" }
|
||||
print "Executing:"
|
||||
clos()
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new BasicWithClosure2().run();
|
||||
}
|
||||
|
||||
}
|
||||
17
testdata-groovy/src/simple/BasicWithClosure3.groovy
Normal file
17
testdata-groovy/src/simple/BasicWithClosure3.groovy
Normal file
@@ -0,0 +1,17 @@
|
||||
package simple
|
||||
|
||||
class BasicWithClosure3 {
|
||||
|
||||
def clos = null;
|
||||
|
||||
public String run() {
|
||||
clos = { println "goodbye!" }
|
||||
print "Executing:"
|
||||
clos()
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new BasicWithClosure3().run();
|
||||
}
|
||||
|
||||
}
|
||||
16
testdata-groovy/src/simple/BasicWithClosureB.groovy
Normal file
16
testdata-groovy/src/simple/BasicWithClosureB.groovy
Normal file
@@ -0,0 +1,16 @@
|
||||
package simple
|
||||
|
||||
class BasicWithClosureB {
|
||||
|
||||
def clos = { println "hello!" }
|
||||
|
||||
public String run() {
|
||||
print "Executing:"
|
||||
clos()
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new BasicWithClosureB().run();
|
||||
}
|
||||
|
||||
}
|
||||
16
testdata-groovy/src/simple/BasicWithClosureB2.groovy
Normal file
16
testdata-groovy/src/simple/BasicWithClosureB2.groovy
Normal file
@@ -0,0 +1,16 @@
|
||||
package simple
|
||||
|
||||
class BasicWithClosureB2 {
|
||||
|
||||
def clos = { println "hello!" }
|
||||
|
||||
public String run() {
|
||||
print "Executing:"
|
||||
clos()
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new BasicWithClosureB2().run();
|
||||
}
|
||||
|
||||
}
|
||||
16
testdata-groovy/src/simple/BasicWithClosureB3.groovy
Normal file
16
testdata-groovy/src/simple/BasicWithClosureB3.groovy
Normal file
@@ -0,0 +1,16 @@
|
||||
package simple
|
||||
|
||||
class BasicWithClosureB3 {
|
||||
|
||||
def clos = { println "goodbye!" }
|
||||
|
||||
public String run() {
|
||||
print "Executing:"
|
||||
clos()
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new BasicWithClosureB3().run();
|
||||
}
|
||||
|
||||
}
|
||||
31
testdata-groovy/src/simple/BasicWithClosureC.groovy
Normal file
31
testdata-groovy/src/simple/BasicWithClosureC.groovy
Normal file
@@ -0,0 +1,31 @@
|
||||
package simple
|
||||
|
||||
class BasicWithClosureC {
|
||||
|
||||
public static void main(String[] args) {
|
||||
new BasicWithClosureC().run();
|
||||
}
|
||||
|
||||
public String run() {
|
||||
foo()
|
||||
doit {
|
||||
doitInner {
|
||||
println 'in closure'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void doit(Closure c) {
|
||||
c.call()
|
||||
}
|
||||
|
||||
public void doitInner(Closure c) {
|
||||
c.call()
|
||||
}
|
||||
|
||||
|
||||
public void foo() {
|
||||
println 'foo() running'
|
||||
}
|
||||
|
||||
}
|
||||
31
testdata-groovy/src/simple/BasicWithClosureC2.groovy
Normal file
31
testdata-groovy/src/simple/BasicWithClosureC2.groovy
Normal file
@@ -0,0 +1,31 @@
|
||||
package simple
|
||||
|
||||
class BasicWithClosureC2 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
new BasicWithClosureC2().run();
|
||||
}
|
||||
|
||||
public String run() {
|
||||
doit {
|
||||
doitInner {
|
||||
println 'in closure'
|
||||
foo() // moved from top of run() method to here
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void doit(Closure c) {
|
||||
c.call()
|
||||
}
|
||||
|
||||
public void doitInner(Closure c) {
|
||||
c.call()
|
||||
}
|
||||
|
||||
|
||||
public void foo() {
|
||||
println 'foo() running'
|
||||
}
|
||||
|
||||
}
|
||||
38
testdata-groovy/src/simple/BasicWithClosureD.groovy
Normal file
38
testdata-groovy/src/simple/BasicWithClosureD.groovy
Normal file
@@ -0,0 +1,38 @@
|
||||
package simple
|
||||
|
||||
class BasicWithClosureD {
|
||||
|
||||
public static void main(String[] args) {
|
||||
new BasicWithClosureD().run();
|
||||
}
|
||||
|
||||
public void xxx() {
|
||||
|
||||
}
|
||||
|
||||
public String run() {
|
||||
foo()
|
||||
String sone = "abc"
|
||||
String stwo = "def"
|
||||
// doit {
|
||||
doitInner {
|
||||
println 'string is '+sone
|
||||
print "owner is "+(getOwner()==null?"null":"not null")
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
public void doit(Closure c) {
|
||||
c.call()
|
||||
}
|
||||
|
||||
public void doitInner(Closure c) {
|
||||
c.call()
|
||||
}
|
||||
|
||||
|
||||
public void foo() {
|
||||
println 'foo() running'
|
||||
}
|
||||
|
||||
}
|
||||
34
testdata-groovy/src/simple/BasicWithClosureD2.groovy
Normal file
34
testdata-groovy/src/simple/BasicWithClosureD2.groovy
Normal file
@@ -0,0 +1,34 @@
|
||||
package simple
|
||||
|
||||
class BasicWithClosureD2 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
new BasicWithClosureD2().run();
|
||||
}
|
||||
|
||||
public String run() {
|
||||
foo()
|
||||
String sone = "abc"
|
||||
String stwo = "def"
|
||||
// doit {
|
||||
doitInner {
|
||||
println 'string is '+stwo
|
||||
print "owner is "+(getOwner()==null?"null":"not null")
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
public void doit(Closure c) {
|
||||
c.call()
|
||||
}
|
||||
|
||||
public void doitInner(Closure c) {
|
||||
c.call()
|
||||
}
|
||||
|
||||
|
||||
public void foo() {
|
||||
println 'foo() running'
|
||||
}
|
||||
|
||||
}
|
||||
38
testdata-groovy/src/simple/BasicWithClosureE.groovy
Normal file
38
testdata-groovy/src/simple/BasicWithClosureE.groovy
Normal file
@@ -0,0 +1,38 @@
|
||||
package simple
|
||||
|
||||
class BasicWithClosureE {
|
||||
|
||||
public static void main(String[] args) {
|
||||
new BasicWithClosureE().run();
|
||||
}
|
||||
|
||||
public void xxx() {
|
||||
|
||||
}
|
||||
|
||||
public String run() {
|
||||
foo()
|
||||
String sone = "abc"
|
||||
String stwo = "def"
|
||||
// doit {
|
||||
doitInner {
|
||||
println 'string is '+sone
|
||||
print "owner is "+(getOwner()==null?"null":"not null")
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
public void doit(Closure c) {
|
||||
c.call()
|
||||
}
|
||||
|
||||
public void doitInner(Closure c) {
|
||||
c.call()
|
||||
}
|
||||
|
||||
|
||||
public void foo() {
|
||||
println 'foo() running'
|
||||
}
|
||||
|
||||
}
|
||||
38
testdata-groovy/src/simple/BasicWithClosureE2.groovy
Normal file
38
testdata-groovy/src/simple/BasicWithClosureE2.groovy
Normal file
@@ -0,0 +1,38 @@
|
||||
package simple
|
||||
|
||||
class BasicWithClosureE2 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
new BasicWithClosureE2().run();
|
||||
}
|
||||
|
||||
public void xxx() {
|
||||
|
||||
}
|
||||
|
||||
public String run() {
|
||||
foo()
|
||||
String sone = "abc"
|
||||
String stwo = "def"
|
||||
// doit {
|
||||
doitInner {
|
||||
println 'string is '+sone+" "+stwo
|
||||
print "owner is "+(getOwner()==null?"null":"not null")
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
public void doit(Closure c) {
|
||||
c.call()
|
||||
}
|
||||
|
||||
public void doitInner(Closure c) {
|
||||
c.call()
|
||||
}
|
||||
|
||||
|
||||
public void foo() {
|
||||
println 'foo() running'
|
||||
}
|
||||
|
||||
}
|
||||
38
testdata-groovy/src/simple/BasicWithClosureE3.groovy
Normal file
38
testdata-groovy/src/simple/BasicWithClosureE3.groovy
Normal file
@@ -0,0 +1,38 @@
|
||||
package simple
|
||||
|
||||
class BasicWithClosureE3 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
new BasicWithClosureE3().run();
|
||||
}
|
||||
|
||||
public void xxx() {
|
||||
|
||||
}
|
||||
|
||||
public String run() {
|
||||
foo()
|
||||
String sone = "xyz"
|
||||
String stwo = "def"
|
||||
// doit {
|
||||
doitInner {
|
||||
println 'string is '+sone
|
||||
print "owner is "+(getOwner()==null?"null":"not null")
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
public void doit(Closure c) {
|
||||
c.call()
|
||||
}
|
||||
|
||||
public void doitInner(Closure c) {
|
||||
c.call()
|
||||
}
|
||||
|
||||
|
||||
public void foo() {
|
||||
println 'foo() running'
|
||||
}
|
||||
|
||||
}
|
||||
7
testdata-groovy/src/simple/CopyOfBasicD.groovy
Normal file
7
testdata-groovy/src/simple/CopyOfBasicD.groovy
Normal file
@@ -0,0 +1,7 @@
|
||||
package simple
|
||||
|
||||
class CopyOfBasicD {
|
||||
public String run() {
|
||||
}
|
||||
|
||||
}
|
||||
13
testdata-groovy/src/simple/Front.groovy
Normal file
13
testdata-groovy/src/simple/Front.groovy
Normal file
@@ -0,0 +1,13 @@
|
||||
package simple
|
||||
|
||||
class Front {
|
||||
Back b = new Back()
|
||||
|
||||
public Object run() {
|
||||
return b.var
|
||||
}
|
||||
|
||||
public Object run2() {
|
||||
return b.var2
|
||||
}
|
||||
}
|
||||
14
testdata-groovy/src/simple/LFront.groovy
Normal file
14
testdata-groovy/src/simple/LFront.groovy
Normal file
@@ -0,0 +1,14 @@
|
||||
package simple
|
||||
|
||||
class LFront {
|
||||
|
||||
public Object run() {
|
||||
String x = "abc";
|
||||
return x;
|
||||
}
|
||||
|
||||
public Object run2() {
|
||||
int i = 99;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
14
testdata-groovy/src/simple/LFront2.groovy
Normal file
14
testdata-groovy/src/simple/LFront2.groovy
Normal file
@@ -0,0 +1,14 @@
|
||||
package simple
|
||||
|
||||
class LFront2 {
|
||||
|
||||
public Object run() {
|
||||
String x = "xxx";
|
||||
return x;
|
||||
}
|
||||
|
||||
public Object run2() {
|
||||
int i = 88;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
30
testdata-groovy/src/simple/SelfReflector.groovy
Normal file
30
testdata-groovy/src/simple/SelfReflector.groovy
Normal file
@@ -0,0 +1,30 @@
|
||||
package simple
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
class SelfReflector {
|
||||
|
||||
public static void main(String[] args) {
|
||||
println run();
|
||||
}
|
||||
public int i
|
||||
|
||||
public static String run() {
|
||||
StringBuilder s = new StringBuilder()
|
||||
Field[] fs = getFields()
|
||||
List<String> names = new ArrayList<String>()
|
||||
for (Field f: fs) {
|
||||
names.add(f.getName());
|
||||
}
|
||||
Collections.sort(names);
|
||||
s.append(names.size()).append(" ");
|
||||
for (String n: names) {
|
||||
s.append(n).append(" ");
|
||||
}
|
||||
return s.toString().trim();
|
||||
}
|
||||
|
||||
public static Field[] getFields() {
|
||||
return SelfReflector.class.getDeclaredFields();
|
||||
}
|
||||
}
|
||||
9
testdata-groovy/src/simple/Values.groovy
Normal file
9
testdata-groovy/src/simple/Values.groovy
Normal file
@@ -0,0 +1,9 @@
|
||||
package simple
|
||||
|
||||
class Values {
|
||||
|
||||
public Integer run() {
|
||||
return 123
|
||||
}
|
||||
|
||||
}
|
||||
9
testdata-groovy/src/simple/Values2.groovy
Normal file
9
testdata-groovy/src/simple/Values2.groovy
Normal file
@@ -0,0 +1,9 @@
|
||||
package simple
|
||||
|
||||
class Values2 {
|
||||
|
||||
public Integer run() {
|
||||
return 456
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user