--- /dev/null
+import java.lang.*;
+import java.lang.reflect.*;
+import java.util.*;
+
+public class ClassDemo {
+
+ public static void main(String[] args) throws Exception {
+
+ // returns an array of TypeVariable object
+ TypeVariable[] tValue = List.class.getTypeParameters();
+ //System.out.println(tValue[0].getName());
+ System.out.println(tValue[0]);
+ }
+}
\ No newline at end of file
--- /dev/null
+class Example {
+ static void main(String[] args) {
+ //Example of a int datatype
+ int x = 5;
+
+ //Example of a long datatype
+ //long y = 100L;
+
+ //Example of a floating point datatype
+ //float a = 10.56f;
+
+ //Example of a double datatype
+ //double b = 10.5e40;
+
+ //Example of a BigInteger datatype
+ //BigInteger bi = 30g;
+
+ //Example of a BigDecimal datatype
+ //BigDecimal bd = 3.5g;
+
+ println(x);
+ //println(y);
+ //println(a);
+ //println(b);
+ //println(bi);
+ //println(bd);
+ }
+}
--- /dev/null
+target = Example
+cg.enumerate_random = true
+report.console.property_violation=error,trace
--- /dev/null
+print "Hello World!\n"
--- /dev/null
+public class HelloWorld {
+
+ public static void main(String[] args) {
+
+ System.out.println("Hello World!");
+ }
+}
\ No newline at end of file
--- /dev/null
+public class Racer implements Runnable {
+ int d = 42;
+
+ public void run () {
+ doSomething(1001);
+ d = 0; // (1)
+ }
+
+ public static void main (String[] args){
+ Racer racer = new Racer();
+ Thread t = new Thread(racer);
+ t.start();
+
+ doSomething(1000);
+ int c = 420 / racer.d; // (2)
+ System.out.println(c);
+ }
+
+ static void doSomething (int n) {
+ try { Thread.sleep(n); } catch (InterruptedException ix) {}
+ }
+}
--- /dev/null
+int rand = Math.random()*10
+
+if (rand < 5) {
+ //println "rand is less than 5: "
+ System.out.println(rand)
+} else {
+ //println "rand is greater than or equal to 5: "
+ System.out.println(rand)
+}
+
--- /dev/null
+import java.util.Random;
+
+public class Rand {
+ public static void main (String[] args) {
+ Random random = new Random(42); // (1)
+
+ int a = random.nextInt(2); // (2)
+ System.out.println("a=" + a);
+
+ //... lots of code here
+
+ int b = random.nextInt(3); // (3)
+ System.out.println(" b=" + b);
+
+ int c = a/(b+a -2); // (4)
+ System.out.println(" c=" + c);
+ }
+}
\ No newline at end of file
--- /dev/null
+target = Rand
+cg.enumerate_random = true
+report.console.property_violation=error,trace
--- /dev/null
+import java.lang.reflect.*;
+import java.util.Collection;
+
+public class ReflectionTest {
+
+ public Collection<String> c;
+
+ public static void main(String[] args) throws NoSuchFieldException {
+ System.out.println(Collection.class.getTypeParameters()[0]); // E
+ Field field = ReflectionTest.class.getField("c");
+ System.out.println(field.getGenericType()); // java.util.Collection<java.lang.String>
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.reflect.generics.reflectiveObjects;
+
+import java.lang.annotation.*;
+import java.lang.reflect.AnnotatedType;
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.GenericDeclaration;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Objects;
+import sun.reflect.annotation.AnnotationSupport;
+import sun.reflect.annotation.TypeAnnotationParser;
+import sun.reflect.annotation.AnnotationType;
+import sun.reflect.generics.factory.GenericsFactory;
+import sun.reflect.generics.tree.FieldTypeSignature;
+import sun.reflect.generics.visitor.Reifier;
+import sun.reflect.misc.ReflectUtil;
+
+/**
+ * Implementation of <tt>java.lang.reflect.TypeVariable interface
+ * for core reflection.
+ */
+public class TypeVariableImpl<D extends GenericDeclaration>
+ extends LazyReflectiveObjectGenerator implements TypeVariable<D> {
+ D genericDeclaration;
+ private String name;
+ // upper bounds - evaluated lazily
+ private Type[] bounds;
+
+ // The ASTs for the bounds. We are required to evaluate the bounds
+ // lazily, so we store these at least until we are first asked
+ // for the bounds. This also neatly solves the
+ // problem with F-bounds - you can't reify them before the formal
+ // is defined.
+ private FieldTypeSignature[] boundASTs;
+
+ // constructor is private to enforce access through static factory
+ private TypeVariableImpl(D decl, String n, FieldTypeSignature[] bs,
+ GenericsFactory f) {
+ super(f);
+ genericDeclaration = decl;
+ name = n;
+ boundASTs = bs;
+ }
+
+ // Accessors
+
+ // accessor for ASTs for bounds. Must not be called after
+ // bounds have been evaluated, because we might throw the ASTs
+ // away (but that is not thread-safe, is it?)
+ private FieldTypeSignature[] getBoundASTs() {
+ // check that bounds were not evaluated yet
+ assert(bounds == null);
+ return boundASTs;
+ }
+
+ /**
+ * Factory method.
+ * @param decl - the reflective object that declared the type variable
+ * that this method should create
+ * @param name - the name of the type variable to be returned
+ * @param bs - an array of ASTs representing the bounds for the type
+ * variable to be created
+ * @param f - a factory that can be used to manufacture reflective
+ * objects that represent the bounds of this type variable
+ * @return A type variable with name, bounds, declaration and factory
+ * specified
+ */
+ public static <T extends GenericDeclaration>
+ TypeVariableImpl<T> make(T decl, String name,
+ FieldTypeSignature[] bs,
+ GenericsFactory f) {
+
+ if (!((decl instanceof Class) ||
+ (decl instanceof Method) ||
+ (decl instanceof Constructor))) {
+ throw new AssertionError("Unexpected kind of GenericDeclaration" +
+ decl.getClass().toString());
+ }
+ return new TypeVariableImpl<T>(decl, name, bs, f);
+ }
+
+
+ /**
+ * Returns an array of <tt>Type objects representing the
+ * upper bound(s) of this type variable. Note that if no upper bound is
+ * explicitly declared, the upper bound is <tt>Object.
+ *
+ * <p>For each upper bound B:
+ * <ul>
+ * <li>if B is a parameterized type or a type variable, it is created,
+ * (see {@link #ParameterizedType} for the details of the creation
+ * process for parameterized types).
+ * <li>Otherwise, B is resolved.
+ * </ul>
+ *
+ * @throws <tt>TypeNotPresentException if any of the
+ * bounds refers to a non-existent type declaration
+ * @throws <tt>MalformedParameterizedTypeException if any of the
+ * bounds refer to a parameterized type that cannot be instantiated
+ * for any reason
+ * @return an array of Types representing the upper bound(s) of this
+ * type variable
+ */
+ public Type[] getBounds() {
+ // lazily initialize bounds if necessary
+ if (bounds == null) {
+ FieldTypeSignature[] fts = getBoundASTs(); // get AST
+ // allocate result array; note that
+ // keeping ts and bounds separate helps with threads
+ Type[] ts = new Type[fts.length];
+ // iterate over bound trees, reifying each in turn
+ for ( int j = 0; j < fts.length; j++) {
+ Reifier r = getReifier();
+ fts[j].accept(r);
+ ts[j] = r.getResult();
+ }
+ // cache result
+ bounds = ts;
+ // could throw away bound ASTs here; thread safety?
+ }
+ return bounds.clone(); // return cached bounds
+ }
+
+ /**
+ * Returns the <tt>GenericDeclaration object representing the
+ * generic declaration that declared this type variable.
+ *
+ * @return the generic declaration that declared this type variable.
+ *
+ * @since 1.5
+ */
+ public D getGenericDeclaration(){
+ if (genericDeclaration instanceof Class)
+ ReflectUtil.checkPackageAccess((Class)genericDeclaration);
+ else if ((genericDeclaration instanceof Method) ||
+ (genericDeclaration instanceof Constructor))
+ ReflectUtil.conservativeCheckMemberAccess((Member)genericDeclaration);
+ else
+ throw new AssertionError("Unexpected kind of GenericDeclaration");
+ return genericDeclaration;
+ }
+
+
+ /**
+ * Returns the name of this type variable, as it occurs in the source code.
+ *
+ * @return the name of this type variable, as it appears in the source code
+ */
+ public String getName() { return name; }
+
+ public String toString() {return getName();}
+
+ @Override
+ public boolean equals(Object o) {
+ if (o instanceof TypeVariable &&
+ o.getClass() == TypeVariableImpl.class) {
+ TypeVariable<?> that = (TypeVariable) o;
+
+ GenericDeclaration thatDecl = that.getGenericDeclaration();
+ String thatName = that.getName();
+
+ return Objects.equals(genericDeclaration, thatDecl) &&
+ Objects.equals(name, thatName);
+
+ } else
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return genericDeclaration.hashCode() ^ name.hashCode();
+ }
+
+ // Implementations of AnnotatedElement methods.
+ @SuppressWarnings("unchecked")
+ public <T extends Annotation> T getAnnotation(Class annotationClass) {
+ Objects.requireNonNull(annotationClass);
+ // T is an Annotation type, the return value of get will be an annotation
+ return (T)mapAnnotations(getAnnotations()).get(annotationClass);
+ }
+
+ public <T extends Annotation> T getDeclaredAnnotation(Class annotationClass) {
+ Objects.requireNonNull(annotationClass);
+ return getAnnotation(annotationClass);
+ }
+
+ @Override
+ public <T extends Annotation> T[] getAnnotationsByType(Class annotationClass) {
+ Objects.requireNonNull(annotationClass);
+ return AnnotationSupport.getDirectlyAndIndirectlyPresent(mapAnnotations(getAnnotations()), annotationClass);
+ }
+
+ @Override
+ public <T extends Annotation> T[] getDeclaredAnnotationsByType(Class annotationClass) {
+ Objects.requireNonNull(annotationClass);
+ return getAnnotationsByType(annotationClass);
+ }
+
+ public Annotation[] getAnnotations() {
+ int myIndex = typeVarIndex();
+ if (myIndex < 0)
+ throw new AssertionError("Index must be non-negative.");
+ return TypeAnnotationParser.parseTypeVariableAnnotations(getGenericDeclaration(), myIndex);
+ }
+
+ public Annotation[] getDeclaredAnnotations() {
+ return getAnnotations();
+ }
+
+ public AnnotatedType[] getAnnotatedBounds() {
+ return TypeAnnotationParser.parseAnnotatedBounds(getBounds(),
+ getGenericDeclaration(),
+ typeVarIndex());
+ }
+
+ private static final Annotation[] EMPTY_ANNOTATION_ARRAY = new Annotation[0];
+
+ // Helpers for annotation methods
+ private int typeVarIndex() {
+ TypeVariable<?>[] tVars = getGenericDeclaration().getTypeParameters();
+ int i = -1;
+ for (TypeVariable<?> v : tVars) {
+ i++;
+ if (equals(v))
+ return i;
+ }
+ return -1;
+ }
+
+ private static Map<Class mapAnnotations(Annotation[] annos) {
+ Map<Class result =
+ new LinkedHashMap<>();
+ for (Annotation a : annos) {
+ Class<? extends Annotation> klass = a.annotationType();
+ AnnotationType type = AnnotationType.getInstance(klass);
+ if (type.retention() == RetentionPolicy.RUNTIME)
+ if (result.put(klass, a) != null)
+ throw new AnnotationFormatError("Duplicate annotation for class: "+klass+": " + a);
+ }
+ return result;
+ }
+
+ public static void main(String[] args) {
+
+ TypeVariable typeVar = new TypeVariableImpl(null, null, null, null);
+
+ }
+}
--- /dev/null
+
+ 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.
+
+------------------------------------------------------------------------
+
+ANTLR 2 License
+
+Antlr2 is released in the public domain.
+See licenses/antlr2-license.txt for details.
+
+------------------------------------------------------------------------
+
+ASM 4 License
+
+ASM 4 uses a 3-clause BSD license. For details, see licenses/asm-license.txt.
--- /dev/null
+Manifest-Version: 1.0\r
+Ant-Version: Apache Ant 1.9.3\r
+Originally-Created-By: 1.8.0_111-b14 (Oracle Corporation)\r
+Export-Package: groovy.beans;version="2.4.8",groovy.grape;version="2.4\r
+ .8",groovy.inspect;version="2.4.8",groovy.io;version="2.4.8",groovy.l\r
+ ang;version="2.4.8",groovy.security;version="2.4.8",groovy.time;versi\r
+ on="2.4.8",groovy.transform;version="2.4.8",groovy.transform.builder;\r
+ version="2.4.8",groovy.transform.stc;version="2.4.8",groovy.ui;versio\r
+ n="2.4.8",groovy.util;version="2.4.8",groovy.util.logging;version="2.\r
+ 4.8",groovy.xml;version="2.4.8",groovyjarjarantlr;version="2.4.8",gro\r
+ ovyjarjarantlr.ASdebug;version="2.4.8",groovyjarjarantlr.actions.cpp;\r
+ version="2.4.8",groovyjarjarantlr.actions.csharp;version="2.4.8",groo\r
+ vyjarjarantlr.actions.java;version="2.4.8",groovyjarjarantlr.actions.\r
+ python;version="2.4.8",groovyjarjarantlr.build;version="2.4.8",groovy\r
+ jarjarantlr.collections;version="2.4.8",groovyjarjarantlr.collections\r
+ .impl;version="2.4.8",groovyjarjarantlr.debug;version="2.4.8",groovyj\r
+ arjarantlr.debug.misc;version="2.4.8",groovyjarjarantlr.preprocessor;\r
+ version="2.4.8",groovyjarjarasm.asm;version="2.4.8",groovyjarjarasm.a\r
+ sm.commons;version="2.4.8",groovyjarjarasm.asm.signature;version="2.4\r
+ .8",groovyjarjarasm.asm.tree;version="2.4.8",groovyjarjarasm.asm.util\r
+ ;version="2.4.8",groovyjarjarcommonscli;version="2.4.8",org.codehaus.\r
+ groovy;version="2.4.8",org.codehaus.groovy.antlr;version="2.4.8",org.\r
+ codehaus.groovy.antlr.java;version="2.4.8",org.codehaus.groovy.antlr.\r
+ parser;version="2.4.8",org.codehaus.groovy.antlr.treewalker;version="\r
+ 2.4.8",org.codehaus.groovy.ast;version="2.4.8",org.codehaus.groovy.as\r
+ t.builder;version="2.4.8",org.codehaus.groovy.ast.expr;version="2.4.8\r
+ ",org.codehaus.groovy.ast.stmt;version="2.4.8",org.codehaus.groovy.as\r
+ t.tools;version="2.4.8",org.codehaus.groovy.classgen;version="2.4.8",\r
+ org.codehaus.groovy.classgen.asm;version="2.4.8",org.codehaus.groovy.\r
+ classgen.asm.indy;version="2.4.8",org.codehaus.groovy.classgen.asm.sc\r
+ ;version="2.4.8",org.codehaus.groovy.control;version="2.4.8",org.code\r
+ haus.groovy.control.customizers;version="2.4.8",org.codehaus.groovy.c\r
+ ontrol.customizers.builder;version="2.4.8",org.codehaus.groovy.contro\r
+ l.io;version="2.4.8",org.codehaus.groovy.control.messages;version="2.\r
+ 4.8",org.codehaus.groovy.plugin;version="2.4.8",org.codehaus.groovy.r\r
+ eflection;version="2.4.8",org.codehaus.groovy.reflection.android;vers\r
+ ion="2.4.8",org.codehaus.groovy.reflection.stdclasses;version="2.4.8"\r
+ ,org.codehaus.groovy.reflection.v7;version="2.4.8",org.codehaus.groov\r
+ y.runtime;version="2.4.8",org.codehaus.groovy.runtime.callsite;versio\r
+ n="2.4.8",org.codehaus.groovy.runtime.dgmimpl;version="2.4.8",org.cod\r
+ ehaus.groovy.runtime.dgmimpl.arrays;version="2.4.8",org.codehaus.groo\r
+ vy.runtime.m12n;version="2.4.8",org.codehaus.groovy.runtime.memoize;v\r
+ ersion="2.4.8",org.codehaus.groovy.runtime.metaclass;version="2.4.8",\r
+ org.codehaus.groovy.runtime.powerassert;version="2.4.8",org.codehaus.\r
+ groovy.runtime.typehandling;version="2.4.8",org.codehaus.groovy.runti\r
+ me.wrappers;version="2.4.8",org.codehaus.groovy.syntax;version="2.4.8\r
+ ",org.codehaus.groovy.tools;version="2.4.8",org.codehaus.groovy.tools\r
+ .ast;version="2.4.8",org.codehaus.groovy.tools.gse;version="2.4.8",or\r
+ g.codehaus.groovy.tools.javac;version="2.4.8",org.codehaus.groovy.too\r
+ ls.shell;version="2.4.8",org.codehaus.groovy.tools.shell.util;version\r
+ ="2.4.8",org.codehaus.groovy.tools.xml;version="2.4.8",org.codehaus.g\r
+ roovy.transform;version="2.4.8",org.codehaus.groovy.transform.sc;vers\r
+ ion="2.4.8",org.codehaus.groovy.transform.sc.transformers;version="2.\r
+ 4.8",org.codehaus.groovy.transform.stc;version="2.4.8",org.codehaus.g\r
+ roovy.transform.tailrec;version="2.4.8",org.codehaus.groovy.transform\r
+ .trait;version="2.4.8",org.codehaus.groovy.util;version="2.4.8",org.c\r
+ odehaus.groovy.vmplugin;version="2.4.8",org.codehaus.groovy.vmplugin.\r
+ v5;version="2.4.8",org.codehaus.groovy.vmplugin.v6;version="2.4.8",or\r
+ g.codehaus.groovy.vmplugin.v7;version="2.4.8",overview.html;version="\r
+ 2.4.8",overviewj.html;version="2.4.8"\r
+Bundle-SymbolicName: groovy\r
+Bundle-Version: 2.4.8\r
+Bundle-Name: Groovy Runtime\r
+Bundle-ManifestVersion: 2\r
+Import-Package: com.thoughtworks.xstream;resolution:=optional;version=\r
+ "[1.4,2)",com.thoughtworks.xstream.io;resolution:=optional;version="[\r
+ 1.4,2)",com.thoughtworks.xstream.io.xml;resolution:=optional;version=\r
+ "[1.4,2)",javax.swing;resolution:=optional,javax.swing.border;resolut\r
+ ion:=optional,javax.swing.event;resolution:=optional,javax.swing.text\r
+ ;resolution:=optional,javax.swing.tree;resolution:=optional,javax.xml\r
+ .parsers;resolution:=optional,org.apache.ivy;resolution:=optional;ver\r
+ sion="[2.0,3)",org.apache.ivy.core.cache;resolution:=optional;version\r
+ ="[2.0,3)",org.apache.ivy.core.event;resolution:=optional;version="[2\r
+ .0,3)",org.apache.ivy.core.event.download;resolution:=optional;versio\r
+ n="[2.0,3)",org.apache.ivy.core.event.resolve;resolution:=optional;ve\r
+ rsion="[2.0,3)",org.apache.ivy.core.module.descriptor;resolution:=opt\r
+ ional;version="[2.0,3)",org.apache.ivy.core.module.id;resolution:=opt\r
+ ional;version="[2.0,3)",org.apache.ivy.core.report;resolution:=option\r
+ al;version="[2.0,3)",org.apache.ivy.core.resolve;resolution:=optional\r
+ ;version="[2.0,3)",org.apache.ivy.core.settings;resolution:=optional;\r
+ version="[2.0,3)",org.apache.ivy.plugins.matcher;resolution:=optional\r
+ ;version="[2.0,3)",org.apache.ivy.plugins.resolver;resolution:=option\r
+ al;version="[2.0,3)",org.apache.ivy.util;resolution:=optional;version\r
+ ="[2.0,3)",org.fusesource.jansi;resolution:=optional;version="[1.11,2\r
+ )",org.w3c.dom;resolution:=optional\r
+Created-By: 1.8.0_111 (Oracle Corporation)\r
+Tool: Bnd-2.1.0.20130426-122213\r
+Built-By: paulk\r
+Extension-Name: groovy\r
+Specification-Title: Groovy: a powerful, dynamic language for the JVM\r
+Specification-Version: 2.4.8\r
+Specification-Vendor: The Apache Software Foundation\r
+Implementation-Title: Groovy: a powerful, dynamic language for the JVM\r
+Implementation-Version: 2.4.8\r
+Implementation-Vendor: The Apache Software Foundation\r
+Bundle-Description: Groovy Runtime\r
+Bundle-Vendor: The Apache Software Foundation\r
+Bundle-ClassPath: .\r
+Eclipse-BuddyPolicy: dependent\r
+DynamicImport-Package: *\r
+Main-class: groovy.ui.GroovyMain\r
+\r
--- /dev/null
+Apache Groovy
+Copyright 2003-2017 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+This product includes/uses ANTLR (http://www.antlr2.org/)
+developed by Terence Parr 1989-2006
\ No newline at end of file
--- /dev/null
+#\r
+# Licensed to the Apache Software Foundation (ASF) under one\r
+# or more contributor license agreements. See the NOTICE file\r
+# distributed with this work for additional information\r
+# regarding copyright ownership. The ASF licenses this file\r
+# to you under the Apache License, Version 2.0 (the\r
+# "License"); you may not use this file except in compliance\r
+# with the License. You may obtain a copy of the License at\r
+#\r
+# http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing,\r
+# software distributed under the License is distributed on an\r
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r
+# KIND, either express or implied. See the License for the\r
+# specific language governing permissions and limitations\r
+# under the License.\r
+#\r
+\r
+ImplementationVersion=2.4.8\r
+BundleVersion=2.4.8\r
+BuildDate=10-Jan-2017\r
+BuildTime=06:56 PM
\ No newline at end of file
--- /dev/null
+ANTLR 2 License
+
+We reserve no legal rights to the ANTLR--it is fully in the public domain. An individual or company may do
+whatever they wish with source code distributed with ANTLR or the code generated by ANTLR, including the
+incorporation of ANTLR, or its output, into commerical software.
+
+We encourage users to develop software with ANTLR. However, we do ask that credit is given to us for
+developing ANTLR. By "credit", we mean that if you use ANTLR or incorporate any source code into one of your
+programs (commercial product, research project, or otherwise) that you acknowledge this fact somewhere in
+the documentation, research report, etc... If you like ANTLR and have developed a nice tool with the output,
+please mention that you developed it using ANTLR. In addition, we ask that the headers remain intact in our
+source code. As long as these guidelines are kept, we expect to continue enhancing this system and expect to
+make other tools available as they are completed.
+
+In countries where the Public Domain status of the work may not be valid, the author grants a copyright
+licence to the general public to deal in the work without restriction and permission to sublicence derivates
+under the terms of any (OSI approved) Open Source licence.
+
+The Python parser generator code under antlr/actions/python/ is covered by the 3-clause BSD licence (this
+part is included in the binary JAR files); the run-time part under lib/python/ is covered by the GNU GPL,
+version 3 or later (this part is not included in the binary JAR files). See [1] for the full details.
+
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750643#80%22
--- /dev/null
+ASM 4 License
+
+Copyright (c) 2000-2011 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.
--- /dev/null
+# Licensed to the Apache Software Foundation (ASF) under one or more\r
+# contributor license agreements. See the NOTICE file distributed with\r
+# this work for additional information regarding copyright ownership.\r
+# The ASF licenses this file to You under the Apache License, Version 2.0\r
+# (the "License"); you may not use this file except in compliance with\r
+# the License. You may obtain a copy of the License at\r
+#\r
+# http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing, software\r
+# distributed under the License is distributed on an "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+# See the License for the specific language governing permissions and\r
+# limitations under the License.\r
+\r
+# Format: one extension on each line without the leading "*."\r
+# Listed below are default groovy source file extensions.\r
+\r
+# NOTE: This implementation of supporting multiple file extensions is experimental and\r
+# the exact implementation details may vary when modularization gets introduced in\r
+# groovy 2.0. However, in terms of the behavior, this support will remain intact.\r
+groovy
\ No newline at end of file
--- /dev/null
+# Licensed to the Apache Software Foundation (ASF) under one or more\r
+# contributor license agreements. See the NOTICE file distributed with\r
+# this work for additional information regarding copyright ownership.\r
+# The ASF licenses this file to You under the Apache License, Version 2.0\r
+# (the "License"); you may not use this file except in compliance with\r
+# the License. You may obtain a copy of the License at\r
+#\r
+# http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing, software\r
+# distributed under the License is distributed on an "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+# See the License for the specific language governing permissions and\r
+# limitations under the License.\r
+\r
+# global transformation to handle @Grab annotation\r
+groovy.grape.GrabAnnotationTransformation\r
+\r
+#global transformation for AST Builder\r
+org.codehaus.groovy.ast.builder.AstBuilderTransformation\r
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<ivysettings>
+ <settings defaultResolver="downloadGrapes"/>
+ <resolvers>
+ <chain name="downloadGrapes" returnFirst="true">
+ <filesystem name="cachedGrapes">
+ <ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
+ <artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision](-[classifier]).[ext]"/>
+ </filesystem>
+ <ibiblio name="localm2" root="file:${user.home}/.m2/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true"/>
+ <!-- todo add 'endorsed groovy extensions' resolver here -->
+ <ibiblio name="jcenter" root="https://jcenter.bintray.com/" m2compatible="true"/>
+ <ibiblio name="ibiblio" m2compatible="true"/>
+ </chain>
+ </resolvers>
+</ivysettings>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package groovy.inspect.*</title>
+ </head>
+ <body>
+ <p>Classes for inspecting object properties through introspection.</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package groovy.io.*</title>
+ </head>
+ <body>
+ <p>Classes for Groovier Input/Output.</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package groovy.lang.*</title>
+ </head>
+ <body>
+ <p>Core Groovy language classes for implementing data structures, closures, metadata and so forth.</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package groovy.security.*</title>
+ </head>
+ <body>
+ <p>
+ Security-related classes
+ </p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package groovy.time.*</title>
+ </head>
+ <body>
+ <p>
+ Classes for easily manipulating Dates and times. While
+ <code>java.util.Date</code> has GDK methods for adding or subtracting days,
+ this is not so useful for different durations of time.
+ {@link groovy.time.TimeCategory TimeCategory} creates a simple internal DSL
+ for manipulating dates and times in a clean and precise fashion.
+ </p>
+ <h3>Examples</h3>
+ <pre>
+ use ( TimeCategory ) {
+ // application on numbers:
+ println 1.minute.from.now
+ println 10.days.ago
+
+ // application on dates
+ def someDate = new Date()
+ println someDate - 3.months
+ }</pre>
+
+ @see groovy.time.TimeCategory
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package groovy.util.*</title>
+ </head>
+ <body>
+ <p>Various Groovy utilities for working with nodes, builders, logging, JUnit test cases, text expressions, Ant tasks or JMX MBeans.</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.antlr.*</title>
+ </head>
+ <body>
+ <p>Parser related classes.</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.antlr.treewalker.*</title>
+ </head>
+ <body>
+ <p>Classes for walking the AST.</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.ast.expr.*</title>
+ </head>
+ <body>
+ <p>AST nodes for Groovy expressions</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.ast.*</title>
+ </head>
+ <body>
+ <p>Groovy AST nodes for the syntax of the language</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.ast.stmt.*</title>
+ </head>
+ <body>
+ <p>AST nodes for Groovy statements</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.classgen.asm.*</title>
+ </head>
+ <body>
+ <p>Helper classes for ASMClassGenerator. All classes in this package
+ are for internal usage only.</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.classgen.*</title>
+ </head>
+ <body>
+ <p>Generates Java classes for Groovy classes using ASM.</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.control.io.*</title>
+ </head>
+ <body>
+ <p>Internal classes for Groovier Input/Output.</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.control.messages.*</title>
+ </head>
+ <body>
+ <p>Error message classes.</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.control.*</title>
+ </head>
+ <body>
+ <p>Compiler control classes.</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.*</title>
+ </head>
+ <body>
+ <p>Groovy Language for the JVM</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.reflection.*</title>
+ </head>
+ <body>
+ <p>Internal classes for assisting with reflection.</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.runtime.metaclass.*</title>
+ </head>
+ <body>
+ <p>Internal classes related to Groovy's metaclass implementation.</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.runtime.*</title>
+ </head>
+ <body>
+ <p>Runtime classes for Groovy - whether the dynamic interpreter is being used, the compiler or the bytecode generator.</p>
+ </body>
+</html>
--- /dev/null
+<!--\r
+\r
+ Licensed to the Apache Software Foundation (ASF) under one\r
+ or more contributor license agreements. See the NOTICE file\r
+ distributed with this work for additional information\r
+ regarding copyright ownership. The ASF licenses this file\r
+ to you under the Apache License, Version 2.0 (the\r
+ "License"); you may not use this file except in compliance\r
+ with the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing,\r
+ software distributed under the License is distributed on an\r
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r
+ KIND, either express or implied. See the License for the\r
+ specific language governing permissions and limitations\r
+ under the License.\r
+\r
+-->\r
+<html>\r
+ <head>\r
+ <title>package org.codehaus.groovy.runtime.typehandling*</title>\r
+ </head>\r
+ <body>\r
+ <p>Classes used to execute special actions based on the type. \r
+ This includes mathematical operations and wrapper classes.\r
+ </p>\r
+ </body>\r
+</html>\r
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.runtime.wrappers.*</title>
+ </head>
+ <body>
+ <p>Groovy wrapper classes for primitive types.</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.syntax.*</title>
+ </head>
+ <body>
+ <p>Lexer, parser and trees.</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.tools.javac.*</title>
+ </head>
+ <body>
+ <p>Classes related to the joint compiler.</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.tools.*</title>
+ </head>
+ <body>
+ <p>
+ Compiler entry points and miscellaneous development tools.
+ </p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <head>
+ <title>package org.codehaus.groovy.tools.xml.*</title>
+ </head>
+ <body>
+ <p>XML utilities such as for converting XML into Groovy scripts.</p>
+ </body>
+</html>
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <body>
+ <p>
+ JVM version specific classes.
+ </p>
+ </body>
+</html>
+
--- /dev/null
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+
+-->
+<html>
+ <body>
+ <p>
+ Java 5 specific classes.
+ </p>
+ </body>
+</html>
+
--- /dev/null
+<!--\r
+\r
+ Licensed to the Apache Software Foundation (ASF) under one\r
+ or more contributor license agreements. See the NOTICE file\r
+ distributed with this work for additional information\r
+ regarding copyright ownership. The ASF licenses this file\r
+ to you under the Apache License, Version 2.0 (the\r
+ "License"); you may not use this file except in compliance\r
+ with the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing,\r
+ software distributed under the License is distributed on an\r
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r
+ KIND, either express or implied. See the License for the\r
+ specific language governing permissions and limitations\r
+ under the License.\r
+\r
+-->\r
+<html>\r
+ <head>\r
+ <title>Groovy - An agile dynamic language for the Java Platform</title>\r
+ </head>\r
+ <body>\r
+ <h2>Groovy - An agile dynamic language for the Java Platform<br/>(GroovyDoc for Groovy and Java classes)</h2>\r
+\r
+ Groovy...\r
+ <ul>\r
+ <li>is an agile and <b>dynamic language</b> for the <b>Java Virtual Machine</b></li>\r
+ <li>builds upon the strengths of Java but has <b>additional power features</b> inspired by languages like Python, Ruby and Smalltalk</li>\r
+ <li>makes <b>modern programming features</b> available to Java developers with <b>almost-zero learning curve</b></li>\r
+ <li>supports <b>Domain-Specific Languages</b> and other compact syntax so your code becomes <b>easy to read and maintain</b></li>\r
+ <li>makes writing shell and build scripts easy with its <b>powerful processing primitives</b>, OO abilities and an Ant DSL</li>\r
+ <li>increases developer productivity by <b>reducing scaffolding code</b> when developing web, GUI, database or console applications</li>\r
+ <li><b>simplifies testing</b> by supporting unit testing and mocking out-of-the-box</li>\r
+ <li>seamlessly <b>integrates with all existing Java objects and libraries</b></li>\r
+ <li>compiles straight to Java bytecode so you can use it anywhere you can use Java</li>\r
+ </ul>\r
+ </body>\r
+</html>\r
--- /dev/null
+<!--\r
+\r
+ Licensed to the Apache Software Foundation (ASF) under one\r
+ or more contributor license agreements. See the NOTICE file\r
+ distributed with this work for additional information\r
+ regarding copyright ownership. The ASF licenses this file\r
+ to you under the Apache License, Version 2.0 (the\r
+ "License"); you may not use this file except in compliance\r
+ with the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing,\r
+ software distributed under the License is distributed on an\r
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r
+ KIND, either express or implied. See the License for the\r
+ specific language governing permissions and limitations\r
+ under the License.\r
+\r
+-->\r
+<html>\r
+ <head>\r
+ <title>Groovy - An agile dynamic language for the Java Platform</title>\r
+ </head>\r
+ <body>\r
+ <h2>Groovy - An agile dynamic language for the Java Platform<br/>(JavaDoc for Java classes)</h2>\r
+\r
+ Groovy...\r
+ <ul>\r
+ <li>is an agile and <b>dynamic language</b> for the <b>Java Virtual Machine</b></li>\r
+ <li>builds upon the strengths of Java but has <b>additional power features</b> inspired by languages like Python, Ruby and Smalltalk</li>\r
+ <li>makes <b>modern programming features</b> available to Java developers with <b>almost-zero learning curve</b></li>\r
+ <li>supports <b>Domain-Specific Languages</b> and other compact syntax so your code becomes <b>easy to read and maintain</b></li>\r
+ <li>makes writing shell and build scripts easy with its <b>powerful processing primitives</b>, OO abilities and an Ant DSL</li>\r
+ <li>increases developer productivity by <b>reducing scaffolding code</b> when developing web, GUI, database or console applications</li>\r
+ <li><b>simplifies testing</b> by supporting unit testing and mocking out-of-the-box</li>\r
+ <li>seamlessly <b>integrates with all existing Java objects and libraries</b></li>\r
+ <li>compiles straight to Java bytecode so you can use it anywhere you can use Java</li>\r
+ </ul>\r
+ </body>\r
+</html>\r
--- /dev/null
+// This function runs when the SmartApp is installed
+def installed() {
+ // This is a standard debug statement in Groovy
+ log.debug "Installed with settings: ${settings}"
+ initialize()
+}
+
+// This function runs when the SmartApp has been updated
+def updated() {
+ log.debug "Updated with settings: ${settings}"
+ // Notice that all event subscriptions are removed when a SmartApp is updated
+ unsubscribe()
+ initialize()
+}
+
+// This function is where you initialize callbacks for event listeners
+def initialize() {
+ // The subscribe function takes a input, a state, and a callback method
+ subscribe(contact, "contact.open", openHandler)
+ subscribe(contact, "contact.closed", closedHandler)
+}
+
+// These are our callback methods
+def openHandler(evt) {
+ log.debug "$evt.name: $evt.value"
+ // Turn the light on
+ light.on()
+}
+
+def closedHandler(evt) {
+ log.debug "$evt.name: $evt.value"
+ // Turn the light off and lock the lock
+ light.off()
+}
--- /dev/null
+target = test
+cg.enumerate_random = true
+report.console.property_violation=error,trace
--- /dev/null
+import groovy.transform.CompileStatic
+
+// This function runs when the SmartApp is installed
+@CompileStatic
+def installed() {
+ // This is a standard debug statement in Groovy
+ //log.debug "Installed with settings: ${settings}"
+ initialize()
+}
+
+// This function runs when the SmartApp has been updated
+@CompileStatic
+def updated() {
+ //log.debug "Updated with settings: ${settings}"
+ // Notice that all event subscriptions are removed when a SmartApp is updated
+ //unsubscribe()
+ initialize()
+}
+
+// This function is where you initialize callbacks for event listeners
+@CompileStatic
+def initialize() {
+ // The subscribe function takes a input, a state, and a callback method
+ //subscribe(contact, "contact.open", openHandler)
+ //subscribe(contact, "contact.closed", closedHandler)
+}
+
+// These are our callback methods
+@CompileStatic
+def openHandler(evt) {
+ //log.debug "$evt.name: $evt.value"
+ // Turn the light on
+ //light.on()
+}
+
+@CompileStatic
+def closedHandler(evt) {
+ //log.debug "$evt.name: $evt.value"
+ // Turn the light off and lock the lock
+ //light.off()
+}
import java.io.InputStream;
import java.io.Serializable;
import java.lang.annotation.Annotation;
-import java.lang.reflect.AnnotatedElement;
-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.lang.reflect.*;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import sun.reflect.ConstantPool;
import sun.reflect.annotation.AnnotationType;
+// TODO: DIRTY HACKS!
+import sun.reflect.generics.factory.CoreReflectionFactory;
+import sun.reflect.generics.factory.GenericsFactory;
+import sun.reflect.generics.repository.ClassRepository;
+import sun.reflect.generics.scope.ClassScope;
/**
* MJI model class for java.lang.Class library abstraction
native AnnotationType getAnnotationType();
+ // TODO: DIRTY HACKS!
+ //public native TypeVariable<Class<T>>[] getTypeParameters();
+ /*
@Override
public TypeVariable<Class<T>>[] getTypeParameters() {
throw new UnsupportedOperationException();
}
+ // Generic info repository; lazily initialized
+ private volatile transient ClassRepository genericInfo;
+
+ // Generic signature handling
+ //private native String getGenericSignature0();
+
+ // accessor for factory
+ private GenericsFactory getFactory() {
+ // create scope and factory
+ return CoreReflectionFactory.make(this, ClassScope.make(this));
+ }
+
+ // accessor for generic info repository;
+ // generic info is lazily initialized
+ private ClassRepository getGenericInfo() {
+ ClassRepository genericInfo = this.genericInfo;
+ if (genericInfo == null) {
+ //String signature = getGenericSignature0();
+ //String signature = "Ljava/lang/Object;";
+ String signature = null;
+ if (signature == null) {
+ genericInfo = ClassRepository.NONE;
+ } else {
+ genericInfo = ClassRepository.make(signature, getFactory());
+ }
+ this.genericInfo = genericInfo;
+ }
+ return (genericInfo != ClassRepository.NONE) ? genericInfo : null;
+ }
+
+ @Override
+ public TypeVariable<Class<T>>[] getTypeParameters() {
+ //throw new UnsupportedOperationException();
+ ClassRepository info = getGenericInfo();
+ if (info != null)
+ return (TypeVariable<Class<T>>[])info.getTypeParameters();
+ else
+ return (TypeVariable<Class<T>>[])new TypeVariable<?>[0];
+ }*/
+ @Override
+ public TypeVariable<Class<T>>[] getTypeParameters() {
+ //throw new UnsupportedOperationException();
+ System.out.println("Calling getTypeParameters for: " + this.name);
+ TypeVariable[] typeVariables = (TypeVariable<Class<T>>[])new TypeVariable<?>[1];
+ //Object obj = new Object();
+ //typeVariables[0] = (TypeVariable<Class<T>>) obj;
+ return typeVariables;
+ }
+ // TODO: DIRTY HACKS!
+
public Type getGenericSuperclass() {
throw new UnsupportedOperationException();
}
public native Class<?>[] getParameterTypes();
public native Type[] getGenericParameterTypes();
public native Class<?>[] getExceptionTypes();
+ // TODO: DIRTY HACKS
+ public native Type getGenericReturnType();
@Override
public native Class<?> getDeclaringClass();
@Override
protected ClassInfo loadSystemClass (String typeName){
+ System.out.println("Loading class: " + typeName);
return new ClassInfo( typeName, this);
}
import gov.nasa.jpf.Config;
import gov.nasa.jpf.annotation.MJI;
+// TODO: DIRTY HACKS!
+import java.lang.reflect.TypeVariable;
+import sun.reflect.generics.factory.CoreReflectionFactory;
+import sun.reflect.generics.factory.GenericsFactory;
+import sun.reflect.generics.repository.ClassRepository;
+import sun.reflect.generics.scope.ClassScope;
/**
* MJI NativePeer class for java.lang.Class library abstraction
static final String FIELD_CLASSNAME = "java.lang.reflect.Field";
static final String METHOD_CLASSNAME = "java.lang.reflect.Method";
static final String CONSTRUCTOR_CLASSNAME = "java.lang.reflect.Constructor";
+ // TODO: DIRTY HACKS!
+ static final String TYPEVARIABLE_CLASSNAME = "java.lang.reflect.TypeVariable";
public static boolean init (Config conf){
// we create Method and Constructor objects, so we better make sure these
return ci.getClassObjectRef();
}
+ // TODO: DIRTY HACKS!
+ /*int createTypeVariableObject (MJIEnv env, ClassInfo objectCi, MethodInfo mi) {
+ // NOTE - we rely on Constructor and Method peers being initialized
+ if (mi.isCtor()){
+ return JPF_java_lang_reflect_Constructor.createConstructorObject(env, objectCi, mi);
+ } else {
+ return JPF_java_lang_reflect_Method.createMethodObject(env, objectCi, mi);
+ }
+ }
+
+ // accessor for factory
+ private GenericsFactory getFactory() {
+ // create scope and factory
+ return CoreReflectionFactory.make(this, ClassScope.make(this));
+ }
+
+ @MJI
+ public int getTypeParameters_____3Ljava_lang_reflect_TypeVariable_2 (MJIEnv env, int objRef){
+ ClassInfo tci = getInitializedClassInfo(env, TYPEVARIABLE_CLASSNAME);
+ if (tci == null) {
+ env.repeatInvocation();
+ return MJIEnv.NULL;
+ }
+ // Get the object and the type parameters
+ ClassInfo ci = env.getReferredClassInfo(objRef);
+ String signature = ci.getType();
+ ClassRepository genericInfo = ClassRepository.make(signature, getFactory());
+ TypeVariable[] typeVariables = (TypeVariable[]) genericInfo.getTypeParameters();
+
+ int aref = env.newObjectArray("Ljava/lang/reflect/TypeVariable;", typeVariables.length);
+
+ for(int i=0, j=0; i<typeVariables.length; i++){
+ if (typeVariables[i] != null) {
+ int mref = env.newObject(ci);
+ env.setReferenceArrayElement(aref,j++,mref);
+ }
+ }
+
+ return aref;
+ }*/
+ // TODO: DIRTY HACKS!
+
@MJI
public boolean desiredAssertionStatus____Z (MJIEnv env, int robj) {
ClassInfo ci = env.getReferredClassInfo(robj);
MethodInfo mi = getMethodInfo(env, objRef);
return mi.getModifiers();
}
-
+
static int getParameterTypes( MJIEnv env, MethodInfo mi) {
ThreadInfo ti = env.getThreadInfo();
String[] argTypeNames = mi.getArgumentTypeNames();
return aRef;
}
-
+
@MJI
public int getParameterTypes_____3Ljava_lang_Class_2 (MJIEnv env, int objRef){
return getParameterTypes(env, getMethodInfo(env, objRef));
}
+
+ // TODO: DIRTY HACKS
+ @MJI
+ public int getGenericParameterTypes_____3Ljava_lang_reflect_Type_2 (MJIEnv env, int objRef){
+ //return getGenericParameterTypes(env, getMethodInfo(env, objRef));
+ return getParameterTypes_____3Ljava_lang_Class_2 (env, objRef);
+ }
+
+ @MJI
+ public int getGenericReturnType____Ljava_lang_reflect_Type_2 (MJIEnv env, int objRef){
+ return getReturnType____Ljava_lang_Class_2(env, objRef);
+ }
+ // TODO: DIRTY HACKS
int getExceptionTypes(MJIEnv env, MethodInfo mi) {
ThreadInfo ti = env.getThreadInfo();