Java Examples for java.lang.annotation.Target

The following java examples will help you to understand the usage of java.lang.annotation.Target. These source code samples are taken from different open source projects.

Example 1
Project: intellij-plugins-master  File: CucumberJavaBaseInspectionTest.java View source code
public void setUp() throws Exception {
    super.setUp();
    myFixture.addClass("package cucumber.api.java.en;\n" + "\n" + "import java.lang.annotation.ElementType;\n" + "import java.lang.annotation.Retention;\n" + "import java.lang.annotation.RetentionPolicy;\n" + "import java.lang.annotation.Target;\n" + "\n" + "@Retention(RetentionPolicy.RUNTIME)\n" + "@Target(ElementType.METHOD)\n" + "public @interface Given {\n" + "    String value();\n" + "\n" + "    int timeout() default 0;\n" + "}\n" + "\n");
    myFixture.addClass("package cucumber.annotation;\n" + "\n" + "import java.lang.annotation.ElementType;\n" + "import java.lang.annotation.Retention;\n" + "import java.lang.annotation.RetentionPolicy;\n" + "import java.lang.annotation.Target;\n" + "\n" + "@Retention(RetentionPolicy.RUNTIME)\n" + "@Target(ElementType.METHOD)\n" + "public @interface Before {\n" + "    /**\n" + "     * @return a tag expression\n" + "     */\n" + "    String[] value() default {};\n" + "\n" + "    /**\n" + "     * @return max amount of time this is allowed to run for. 0 (default) means no restriction.\n" + "     */\n" + "    int timeout() default 0;\n" + "}\n");
}
Example 2
Project: PermissionsDispatcher-master  File: CallOnRequestPermissionsResultDetectorTest.java View source code
private String getRuntimePermission() {
    @Language("JAVA") String runPermissions = "" + "package permissions.dispatcher;\n" + "import java.lang.annotation.ElementType;\n" + "import java.lang.annotation.Retention;\n" + "import java.lang.annotation.RetentionPolicy;\n" + "import java.lang.annotation.Target;\n" + "@Target(ElementType.TYPE)\n" + "@Retention(RetentionPolicy.CLASS)\n" + "public @interface RuntimePermissions {\n" + "}";
    return runPermissions;
}
Example 3
Project: errai-master  File: InjectionContext.java View source code
public void registerDecorator(final IOCDecoratorExtension<?> iocExtension) {
    final Class<? extends Annotation> annotation = iocExtension.decoratesWith();
    final Target target = annotation.getAnnotation(Target.class);
    if (target != null) {
        final boolean oneTarget = target.value().length == 1;
        for (final ElementType type : target.value()) {
            if (type == ElementType.ANNOTATION_TYPE) {
                for (final MetaClass annotationClazz : ClassScanner.getTypesAnnotatedWith(annotation, processingContext.getGeneratorContext())) {
                    if (Annotation.class.isAssignableFrom(annotationClazz.asClass())) {
                        final Class<? extends Annotation> javaAnnoCls = annotationClazz.asClass().asSubclass(Annotation.class);
                        decorators.get(javaAnnoCls).add(iocExtension);
                        if (oneTarget) {
                            metaAnnotationAliases.put(javaAnnoCls, annotation);
                        }
                    }
                }
                if (oneTarget) {
                    return;
                }
            }
        }
    }
    decorators.get(annotation).add(iocExtension);
}
Example 4
Project: intellij-community-master  File: PsiNameHelperTest.java View source code
@Test
public void shortClassName() {
    doTest("I<Integer>", "I");
    doTest("I<Long>", "I");
    doTest("java.lang.Object", "Object");
    doTest("java.lang.String", "String");
    doTest("java.lang.Throwable", "Throwable");
    doTest("java.io.PrintStream", "PrintStream");
    doTest("java.io.PrintWriter", "PrintWriter");
    doTest("java.lang.StackTraceElement", "StackTraceElement");
    doTest("java.lang.Throwable.PrintStreamOrWriter", "PrintStreamOrWriter");
    doTest("java.io.ObjectInputStream", "ObjectInputStream");
    doTest("java.io.ObjectOutputStream", "ObjectOutputStream");
    doTest("java.lang.Integer", "Integer");
    doTest("java.lang.Long", "Long");
    doTest("java.lang.Error", "Error");
    doTest("java.lang.RuntimeException", "RuntimeException");
    doTest("@Override", "Override");
    doTest("java.lang.annotation.Target", "Target");
    doTest("java.net.MalformedURLException", "MalformedURLException");
    doTest("java.io.IOException", "IOException");
    doTest("java.net.URLConnection", "URLConnection");
    doTest("java.io.InputStream", "InputStream");
    doTest("java.lang.AutoCloseable", "AutoCloseable");
    doTest("@", "");
    doTest("@Deprecated", "Deprecated");
    doTest("java.lang.annotation.Documented", "Documented");
    doTest("java.lang.annotation.Retention", "Retention");
    doTest("CSuperFoo<X>", "CSuperFoo");
    doTest("SuperFoo<X>", "SuperFoo");
    doTest("java.lang.StringBuffer", "StringBuffer");
    doTest("java.lang.StringBuilder", "StringBuilder");
    doTest("Member<>", "Member");
    doTest("Nested<>", "Nested");
    doTest("Neg09.Nested<>", "Nested");
    doTest("UndeclaredName<>", "UndeclaredName");
    doTest("L<String>", "L");
    doTest("P1<P<K>>", "P1");
    doTest("P<P1T>", "P");
    doTest("F<X>", "F");
    doTest("Base<String>", "Base");
    doTest("Base<Integer>", "Base");
    doTest("A<V>", "A");
    doTest("ArrayList<T>", "ArrayList");
    doTest("I<>", "I");
    doTest("java.util.Collection<? extends E>", "Collection");
    doTest("java.util.Map<? extends K,? extends V>", "Map");
    doTest("java.util.HashMap.Entry", "Entry");
    doTest("java.util.Iterator<E>", "Iterator");
    doTest("java.util.ListIterator<E>", "ListIterator");
    doTest("java.util.List<E>", "List");
    doTest("@SuppressWarnings", "SuppressWarnings");
    doTest("java.lang.annotation.Annotation", "Annotation");
    doTest("@MyAnno", "MyAnno");
    doTest("java.lang.Exception", "Exception");
    doTest("@SafeVarargs", "SafeVarargs");
    doTest("List<T>", "List");
    doTest("List<String>", "List");
    doTest("List<?>", "List");
    doTest("SemKey<String>", "SemKey");
    doTest("Condition<String>", "Condition");
    doTest("SemKey<T>", "SemKey");
    doTest("java.lang.Class<?>", "Class");
    doTest("A<T>", "A");
    doTest("java.lang.invoke.MethodType", "MethodType");
    doTest("java.lang.CharSequence", "CharSequence");
    doTest("java.lang.IllegalAccessException", "IllegalAccessException");
    doTest("java.util.Locale", "Locale");
    doTest("java.util.List<java.lang.Class<?>>", "List");
    doTest("java.lang.Void", "Void");
    doTest("java.lang.invoke.MethodHandles.Lookup", "Lookup");
    doTest("java.lang.invoke.MethodHandle", "MethodHandle");
    doTest("java.lang.invoke.MethodHandle.PolymorphicSignature", "PolymorphicSignature");
    doTest("Map<String, String>", "Map");
    doTest("List<N>", "List");
    doTest("Wrapper<E, T>", "Wrapper");
    doTest("X<T>", "X");
    doTest("Node<String>.Details", "Details");
    doTest("Map<K, V>", "Map");
    doTest("Map.Entry<K, V>", "Entry");
    doTest("Matcher<Collection<? extends E>>", "Matcher");
    doTest("A<String>", "A");
    doTest("NonDefaultConstructorContainer.Inner", "Inner");
    doTest("OtherClass.InnerClass", "InnerClass");
    doTest("Foo<Number>", "Foo");
    doTest("Foo<Integer>", "Foo");
    doTest("Test<String>", "Test");
    doTest("DiamondTest<String>", "DiamondTest");
    doTest("ParallelPipeline<T, V>", "ParallelPipeline");
    doTest("ArrayList<E>", "ArrayList");
    doTest("Generic<String>", "Generic");
    doTest("Generic<Object>", "Generic");
    doTest("java.io.Serializable", "Serializable");
    doTest("java.lang.Comparable<java.lang.String>", "Comparable");
    doTest("@Target", "Target");
    doTest("@TA", "TA");
    doTest("java.lang.Enum", "Enum");
    doTest("java.io.OutputStream", "OutputStream");
    doTest("java.io.OutputStreamWriter", "OutputStreamWriter");
    doTest("java.io.File", "File");
    doTest("Foo.IBar", "IBar");
    doTest("Iterable<Path>", "Iterable");
    doTest("B<Integer>", "B");
    doTest("B<Long>", "B");
    doTest("java.lang.AbstractStringBuilder", "AbstractStringBuilder");
    doTest("@NotNull", "NotNull");
    doTest("@Nullable", "Nullable");
    doTest("java.lang.Runnable", "Runnable");
    doTest("java.io.FileDescriptor", "FileDescriptor");
    doTest("java.io.FileNotFoundException", "FileNotFoundException");
    doTest("java.sql.SQLException", "SQLException");
    doTest("java.awt.Point", "Point");
    doTest("List<A.B>", "List");
    doTest("test.A", "A");
    doTest("test.Client", "Client");
    doTest("Pair<String, Pair<Integer, Boolean>>", "Pair");
    doTest("util.Pair", "Pair");
    doTest("java.util.Calendar", "Calendar");
    doTest("java.util.ArrayList", "ArrayList");
    doTest("java.util.Arrays", "Arrays");
    doTest("java.util.List", "List");
    doTest("java.lang.Boolean", "Boolean");
    doTest("java.lang.ClassLoader", "ClassLoader");
    doTest("Demo.Pojo2", "Pojo2");
    doTest("A<E>", "A");
    doTest("java.lang.reflect.Type", "Type");
    doTest("java.security.ProtectionDomain", "ProtectionDomain");
    doTest("java.lang.reflect.Field", "Field");
    doTest("java.lang.reflect.Method", "Method");
    doTest("java.lang.reflect.Constructor", "Constructor");
    doTest("sun.reflect.annotation.AnnotationType", "AnnotationType");
    doTest("java.lang.reflect.TypeVariable<java.lang.Class<T>>", "TypeVariable");
    doTest("java.lang.reflect.TypeVariable<?>", "TypeVariable");
    doTest("java.lang.Class<T>", "Class");
    doTest("Parent<Integer>", "Parent");
    doTest("@org.jetbrains.annotations.NotNull", "NotNull");
    doTest("@org.jetbrains.annotations.Nullable", "Nullable");
    doTest("org.jetbrains.annotations.NotNull", "NotNull");
    doTest("org.jetbrains.annotations.Nullable", "Nullable");
    doTest("IX<Throwable>", "IX");
    doTest("@org.testng.annotations.BeforeMethod", "BeforeMethod");
    doTest("Function<String, ?>", "Function");
    doTest("Function<String>", "Function");
    doTest("A<Throwable>", "A");
    doTest("Generic<?>", "Generic");
    doTest("A1<T>", "A1");
    doTest("B<T>", "B");
    doTest("pack.AAClass", "AAClass");
    doTest("pack.WithInnerAClass", "WithInnerAClass");
    doTest("java.lang.CloneNotSupportedException", "CloneNotSupportedException");
    doTest("Foo<ZZZ", "Foo");
    doTest("@MyObj", "MyObj");
    doTest("@MyObjectType", "MyObjectType");
    doTest("@Retention", "Retention");
    doTest("java.io.FileInputStream", "FileInputStream");
    doTest("java.lang.Class<? extends java.lang.Object>", "Class");
    doTest("java.io.ObjectStreamField", "ObjectStreamField");
    doTest("java.util.Comparator<java.lang.String>", "Comparator");
    doTest("java.io.FilenameFilter", "FilenameFilter");
    doTest("java.lang.Class", "Class");
    doTest("foo.Foo", "Foo");
    doTest("java.util.List<? super T>", "List");
    doTest("java.awt.Component", "Component");
    doTest("java.util.Collection<?>", "Collection");
    doTest("java.awt.Rectangle", "Rectangle");
    doTest("javax.swing.JTable", "JTable");
    doTest("javax.swing.JScrollPane", "JScrollPane");
    doTest("java.awt.Container", "Container");
    doTest("java.net.FileNameMap", "FileNameMap");
    doTest("java.awt.Frame", "Frame");
    doTest("java.util.List<?>", "List");
    doTest("java.awt.event.MouseEvent", "MouseEvent");
    doTest("javax.swing.Action", "Action");
    doTest("javax.swing.KeyStroke", "KeyStroke");
    doTest("java.awt.event.KeyEvent", "KeyEvent");
    doTest("java.io.DataInput", "DataInput");
    doTest("java.net.ContentHandlerFactory", "ContentHandlerFactory");
    doTest("java.net.DatagramSocketImplFactory", "DatagramSocketImplFactory");
    doTest("java.net.SocketImplFactory", "SocketImplFactory");
    doTest("java.net.URLStreamHandlerFactory", "URLStreamHandlerFactory");
    doTest("java.util.Collection<? extends T>", "Collection");
    doTest("java.util.Collection<T>", "Collection");
    doTest("java.util.List<? extends T>", "List");
    doTest("java.util.List<T>", "List");
    doTest("java.util.Map<K,V>", "Map");
    doTest("java.util.Set<? extends T>", "Set");
    doTest("java.util.Set<T>", "Set");
    doTest("java.util.SortedMap<K,? extends V>", "SortedMap");
    doTest("java.util.SortedMap<K,V>", "SortedMap");
    doTest("java.util.SortedSet<T>", "SortedSet");
    doTest("java.lang.Float", "Float");
    doTest("java.lang.Double", "Double");
    doTest("java.lang.Short", "Short");
    doTest("java.lang.annotation.ElementType", "ElementType");
    doTest("java.lang.Byte", "Byte");
    doTest("java.util.concurrent.TimeUnit", "TimeUnit");
    doTest("java.lang.annotation.RetentionPolicy", "RetentionPolicy");
    doTest("java.lang.Character", "Character");
    doTest("java.sql.Time", "Time");
    doTest("java.sql.Date", "Date");
    doTest("java.sql.Timestamp", "Timestamp");
    doTest("java.awt.Window", "Window");
    doTest("Some<caret>", "Some");
    doTest("foo.bar.AxBxCxDxEx", "AxBxCxDxEx");
    doTest("net.n3.nanoxml.IXMLReader", "IXMLReader");
    doTest("net.n3.nanoxml.IXMLBuilder", "IXMLBuilder");
    doTest("net.n3.nanoxml.IXMLValidator", "IXMLValidator");
    doTest("net.n3.nanoxml.IXMLEntityResolver", "IXMLEntityResolver");
    doTest("java.util.Vector", "Vector");
    doTest("foo.MyClass", "MyClass");
    doTest("foo.ServiceManager", "ServiceManager");
    doTest("Bar<String>", "Bar");
    doTest("pkg.Bar", "Bar");
    doTest("java.util.Random", "Random");
    doTest("java.util.Set", "Set");
    doTest("java.util.Map", "Map");
    doTest("java.util.Comparator", "Comparator");
    doTest("java.util.Collection<E>", "Collection");
    doTest("java.util.Set<E>", "Set");
    doTest("java.util.SortedSet<E>", "SortedSet");
    doTest("java.util.Comparator<T>", "Comparator");
    doTest("java.util.Enumeration<T>", "Enumeration");
    doTest("pkg.Foo", "Foo");
    doTest("foo.Bar", "Bar");
    doTest("sun.nio.ch.Interruptible", "Interruptible");
    doTest("java.lang.ThreadGroup", "ThreadGroup");
    doTest("java.lang.Thread", "Thread");
    doTest("java.lang.Iterable", "Iterable");
    doTest("java.lang.Package", "Package");
    doTest("java.lang.reflect.Constructor<?>", "Constructor");
    doTest("java.lang.reflect.Constructor<T>", "Constructor");
    doTest("java.lang.Class<U>", "Class");
    doTest("java.lang.Class<A>", "Class");
    doTest("java.lang.Class<? extends java.lang.annotation.Annotation>", "Class");
    doTest("foo.Util", "Util");
    doTest("java.lang.SecurityManager", "SecurityManager");
    doTest("java.util.Properties", "Properties");
    doTest("java.util.Map<java.lang.String,java.lang.String>", "Map");
    doTest("java.lang.Class<W>", "Class");
    doTest("java.lang.Class<V>", "Class");
    doTest("@Foo", "Foo");
    doTest("@Anno", "Anno");
    doTest("java.awt.Font", "Font");
    doTest("java.awt.Graphics", "Graphics");
    doTest("java.awt.Color", "Color");
    doTest("java.awt.Dimension", "Dimension");
    doTest("java.awt.Event", "Event");
    doTest("java.awt.PopupMenu", "PopupMenu");
    doTest("java.awt.MenuComponent", "MenuComponent");
    doTest("java.beans.PropertyChangeListener", "PropertyChangeListener");
    doTest("java.awt.ComponentOrientation", "ComponentOrientation");
    doTest("java.awt.LayoutManager", "LayoutManager");
    doTest("javax.swing.JPopupMenu", "JPopupMenu");
    doTest("javax.swing.border.Border", "Border");
    doTest("java.awt.Insets", "Insets");
    doTest("javax.swing.InputVerifier", "InputVerifier");
    doTest("java.awt.event.ActionListener", "ActionListener");
    doTest("javax.swing.ComponentInputMap", "ComponentInputMap");
    doTest("javax.swing.ActionMap", "ActionMap");
    doTest("javax.swing.TransferHandler", "TransferHandler");
    doTest("javax.swing.event.AncestorListener", "AncestorListener");
    doTest("javax.swing.JComponent", "JComponent");
    doTest("java.awt.event.ContainerListener", "ContainerListener");
    doTest("java.awt.AWTEvent", "AWTEvent");
    doTest("java.awt.event.ContainerEvent", "ContainerEvent");
    doTest("java.awt.FocusTraversalPolicy", "FocusTraversalPolicy");
    doTest("java.awt.dnd.DropTarget", "DropTarget");
    doTest("java.awt.PointerInfo", "PointerInfo");
    doTest("java.awt.Cursor", "Cursor");
    doTest("java.awt.Image", "Image");
    doTest("java.awt.image.ImageProducer", "ImageProducer");
    doTest("java.awt.event.MouseWheelEvent", "MouseWheelEvent");
    doTest("java.awt.event.ComponentListener", "ComponentListener");
    doTest("java.awt.event.FocusListener", "FocusListener");
    doTest("java.awt.event.HierarchyListener", "HierarchyListener");
    doTest("java.awt.event.HierarchyBoundsListener", "HierarchyBoundsListener");
    doTest("java.awt.event.KeyListener", "KeyListener");
    doTest("java.awt.event.MouseListener", "MouseListener");
    doTest("java.awt.event.MouseMotionListener", "MouseMotionListener");
    doTest("java.awt.event.MouseWheelListener", "MouseWheelListener");
    doTest("java.awt.event.InputMethodListener", "InputMethodListener");
    doTest("java.awt.event.ComponentEvent", "ComponentEvent");
    doTest("java.awt.event.FocusEvent", "FocusEvent");
    doTest("java.awt.event.InputMethodEvent", "InputMethodEvent");
    doTest("java.awt.event.HierarchyEvent", "HierarchyEvent");
    doTest("java.util.EventListener", "EventListener");
    doTest("javax.accessibility.AccessibleContext", "AccessibleContext");
    doTest("java.awt.peer.ContainerPeer", "ContainerPeer");
    doTest("javax.swing.InputMap", "InputMap");
    doTest("javax.swing.JToolTip", "JToolTip");
    doTest("javax.swing.JRootPane", "JRootPane");
    doTest("java.awt.peer.ComponentPeer", "ComponentPeer");
    doTest("java.awt.GraphicsConfiguration", "GraphicsConfiguration");
    doTest("java.awt.Toolkit", "Toolkit");
    doTest("java.awt.image.ColorModel", "ColorModel");
    doTest("java.awt.FontMetrics", "FontMetrics");
    doTest("java.awt.image.VolatileImage", "VolatileImage");
    doTest("java.awt.ImageCapabilities", "ImageCapabilities");
    doTest("java.awt.image.ImageObserver", "ImageObserver");
    doTest("java.awt.im.InputMethodRequests", "InputMethodRequests");
    doTest("java.awt.im.InputContext", "InputContext");
    doTest("javax.swing.JPanel", "JPanel");
    doTest("@T", "T");
    doTest("java.util.Set<K>", "Set");
    doTest("java.util.Collection<V>", "Collection");
    doTest("java.util.Set<java.util.Map.Entry<K,V>>", "Set");
    doTest("java.util.Map.Entry<K,V>", "Entry");
    doTest("java.util.TimeZone", "TimeZone");
    doTest("java.util.Date", "Date");
    doTest("AbstractSet<T>", "AbstractSet");
    doTest("@TestFor", "TestFor");
    doTest("@MyAnnotation", "MyAnnotation");
    doTest("@My", "My");
    doTest("@Test", "Test");
    doTest("List<V>", "List");
    doTest("Function<Object, ArrayIndexOutOfBoundsException>", "Function");
    doTest("@in", "in");
    doTest("YourMapInterface<K, V>", "YourMapInterface");
    doTest("@ab", "ab");
    doTest("List<A>", "List");
    doTest("@MyAn", "MyAn");
    doTest("@java.la", "la");
    doTest("java.lang.Class<E>", "Class");
    doTest("javax.accessibility.AccessibleStateSet", "AccessibleStateSet");
    doTest("Bar.", "");
    doTest("@TestAnnotation", "TestAnnotation");
    doTest("Key<T>", "Key");
    doTest("foo.Super", "Super");
    doTest("@NN", "NN");
    doTest("java.io.InputStreamReader", "InputStreamReader");
    doTest("foo.StringValue", "StringValue");
    doTest("@B", "B");
    doTest("@Example", "Example");
    doTest("java.util.HashMap", "HashMap");
    doTest("@MagicConstant", "MagicConstant");
    doTest("List<Inner>", "List");
    doTest("List<bar.Foo.Inner>", "List");
    doTest("bar.Foo", "Foo");
    doTest("bar.Assert", "Assert");
    doTest("java.util.Collections", "Collections");
    doTest("Foo<String>", "Foo");
    doTest("Bar<Goo>", "Bar");
    doTest("java.util.Collection", "Collection");
    doTest("Collection<Foo>", "Collection");
    doTest("java.net.URL", "URL");
    doTest("java.util.Enumeration", "Enumeration");
    doTest("java.lang.ref.SoftReference", "SoftReference");
    doTest("sun.reflect.generics.repository.ClassRepository", "ClassRepository");
    doTest("sun.reflect.ReflectionFactory", "ReflectionFactory");
    doTest("java.lang.Class.EnclosingMethodInfo", "EnclosingMethodInfo");
    doTest("sun.reflect.generics.factory.GenericsFactory", "GenericsFactory");
    doTest("sun.reflect.ConstantPool", "ConstantPool");
    doTest("javax.swing.event.EventListenerList", "EventListenerList");
    doTest("javax.swing.ArrayTable", "ArrayTable");
    doTest("javax.swing.AncestorNotifier", "AncestorNotifier");
    doTest("java.awt.LightweightDispatcher", "LightweightDispatcher");
    doTest("sun.awt.DebugHelper", "DebugHelper");
    doTest("javax.accessibility.Accessible", "Accessible");
    doTest("java.util.logging.Logger", "Logger");
    doTest("sun.awt.AppContext", "AppContext");
    doTest("java.awt.image.BufferStrategy", "BufferStrategy");
    doTest("java.beans.PropertyChangeSupport", "PropertyChangeSupport");
    doTest("java.awt.Component.NativeInLightFixer", "NativeInLightFixer");
    doTest("java.util.concurrent.ConcurrentHashMap<java.lang.String,java.util.Locale>", "ConcurrentHashMap");
    doTest("sun.util.resources.OpenListResourceBundle", "OpenListResourceBundle");
    doTest("java.text.MessageFormat", "MessageFormat");
    doTest("java.security.Provider", "Provider");
    doTest("Super<String>", "Super");
    doTest("Super<Integer>", "Super");
    doTest("Super<T>", "Super");
    doTest("SubGeneric<T>", "SubGeneric");
    doTest("MyDD<String>", "MyDD");
    doTest("java.lang.Class<java.lang.Boolean>", "Class");
    doTest("MyProcessor<T>", "MyProcessor");
    doTest("Pair<A,B>", "Pair");
    doTest("foo.Foo<T>", "Foo");
    doTest("java.net.URI", "URI");
    doTest("FList<T>", "FList");
    doTest("java.util.ArrayList<T>", "ArrayList");
    doTest("XXX<X>", "XXX");
    doTest("XXX<Z>", "XXX");
    doTest("XXX<Z, Z1>", "XXX");
    doTest("XXX<ZZZ<Z>>", "XXX");
    doTest("Set<T>", "Set");
    doTest("Outer.Boo", "Boo");
    doTest("Params<", "Params");
    doTest("Key<Impl>", "Key");
    doTest("ExtensionPointName<T>", "ExtensionPointName");
    doTest("X<String>", "X");
    doTest("A<StringBuffer>", "A");
    doTest("Function<String, String>", "Function");
    doTest("java.io.FileFilter", "FileFilter");
    doTest("@Join", "Join");
    doTest("@Table", "Table");
    doTest("Computable<Boolean>", "Computable");
    doTest("Comparable<Foo>", "Comparable");
    doTest("Goo<String>", "Goo");
    doTest("Comparator<String>", "Comparator");
    doTest("@A", "A");
    doTest("java.awt.geom.Point2D.Double", "Double");
    doTest("java.awt.geom.Point2D", "Point2D");
    doTest("bar.Bar", "Bar");
    doTest("A<T[]>", "A");
    doTest("IA<String>", "IA");
    doTest("B<K>", "B");
    doTest("ArgumentA<Object>", "ArgumentA");
    doTest("ClassB<E>", "ClassB");
    doTest("ClassA<E>", "ClassA");
    doTest("BaseMatcher<String>", "BaseMatcher");
    doTest("x.A", "A");
    doTest("x.sub.B", "B");
    doTest("effectiveAccess.pp<", "pp");
    doTest("effectiveAccess.pp", "pp");
    doTest("BaseImpl.Inner", "Inner");
    doTest("x.Base", "Base");
    doTest("@java.lang.Deprecated", "Deprecated");
    doTest("I<II>", "I");
    doTest("C<Q>", "C");
    doTest("AC<CC>", "AC");
    doTest("@Deprecated Object", "Object");
    doTest("@Ann", "Ann");
    doTest("@In", "In");
    doTest("@Inner2", "Inner2");
    doTest("@java.lang", "lang");
    doTest("@Expose", "Expose");
    doTest("@Expose1", "Expose1");
    doTest("DummyList<? extends String>", "DummyList");
    doTest("C<C<U>>", "C");
    doTest("C1<C1<U>>", "C1");
    doTest("CC<T>", "CC");
    doTest("Gen<GT>", "Gen");
    doTest("A1<String>", "A1");
    doTest("I1<Integer>", "I1");
    doTest("II1<Integer>", "II1");
    doTest("II2<Integer>", "II2");
    doTest("II2<String>", "II2");
    doTest("II1<Number>", "II1");
    doTest("II2<Number>", "II2");
    doTest("AAA<T>", "AAA");
    doTest("III<T>", "III");
    doTest("Cmp<Singleton<T1>>", "Cmp");
    doTest("e<String>", "e");
    doTest("ValueChangeListener<Number>", "ValueChangeListener");
    doTest("First<S>", "First");
    doTest("Second<Integer>", "Second");
    doTest("SuperA<T, E>", "SuperA");
    doTest("SuperB<T, E>", "SuperB");
    doTest("Super<Collection>", "Super");
    doTest("TypeDispatcher<T,V>", "TypeDispatcher");
    doTest("DefaultDispatcher<Node, String>", "DefaultDispatcher");
    doTest("SmartList<Bug2>", "SmartList");
    doTest("java.util.List<Bug2>", "List");
    doTest("java.util.AbstractList<E>", "AbstractList");
    doTest("TableContextAction<Object>", "TableContextAction");
    doTest("ActionContext<TableContextAction<TCP>>", "ActionContext");
    doTest("ContextAction<TableContext<RO>>", "ContextAction");
    doTest("Listener<String>", "Listener");
    doTest("I<I>", "I");
    doTest("I<T>", "I");
    doTest("I<D>", "I");
    doTest("DT<T>", "DT");
    doTest("b<d, c>", "b");
    doTest("c<d, c<c,c>>", "c");
    doTest("d<b<c<c,c>,d>>", "d");
    doTest("c<K, c<V,V>>", "c");
    doTest("d<b<V,K>>", "d");
    doTest("Z<Integer>", "Z");
    doTest("BaseC<String>", "BaseC");
    doTest("Int<T>", "Int");
    doTest("A<A>", "A");
    doTest("Outer<String>", "Outer");
    doTest("Outer<String>.Inner", "Inner");
    doTest("AbstractClass<AI>", "AbstractClass");
    doTest("AbstractClass<BI>", "AbstractClass");
    doTest("PrivilegedExceptionAction<FileNotFoundException>", "PrivilegedExceptionAction");
    doTest("Printer<T>", "Printer");
    doTest("I1<C1,C2>", "I1");
    doTest("I2<C1,C2>", "I2");
    doTest("List<Decl>", "List");
    doTest("Reference<T>", "Reference");
    doTest("Comparable<? super ccc>", "Comparable");
    doTest("ArrayList<G1>", "ArrayList");
    doTest("WeakReference<T>", "WeakReference");
    doTest("Y<Y>", "Y");
    doTest("ArrayList<String>", "ArrayList");
    doTest("Comparable<C>", "Comparable");
    doTest("Comparable<String>", "Comparable");
    doTest("ZZZ<K>", "ZZZ");
    doTest("Callable<T>", "Callable");
    doTest("GenericTest99<E,Double>", "GenericTest99");
    doTest("Use99<GenericTest99D<?>,Double>", "Use99");
    doTest("A67675<T[]>", "A67675");
    doTest("java.util.Comparator<? super T>", "Comparator");
    doTest("I2<", "I2");
    doTest("java.util.Map<K, V>", "Map");
    doTest("AA<BB>", "AA");
    doTest("GrandParent<T>", "GrandParent");
    doTest("Base<T[]>", "Base");
    doTest("Base<T>", "Base");
    doTest("AbstractParent<E>", "AbstractParent");
    doTest("Interface<E>", "Interface");
    doTest("SuperAbstract<Owner, String>", "SuperAbstract");
    doTest("HalfGenericSuper<Owner>", "HalfGenericSuper");
    doTest("List<E>", "List");
    doTest("Comparable<A<T>>", "Comparable");
    doTest("A<", "A");
    doTest("Runnable<", "Runnable");
    doTest("HashMap<K, V>", "HashMap");
    doTest("Comparable<Object>", "Comparable");
    doTest("A<K>", "A");
    doTest("Base <String>", "Base");
    doTest("Outer<Other>", "Outer");
    doTest("Lst<?, ?>", "Lst");
    doTest("Collection<A>", "Collection");
    doTest("Matcher<? super T>", "Matcher");
    doTest("ThingUser<?>", "ThingUser");
    doTest("YO<String>", "YO");
    doTest("YO<Integer>", "YO");
    doTest("ArrayList<Integer>", "ArrayList");
    doTest("Comparable<Date>", "Comparable");
    doTest("List<Class<? extends Serializable>>", "List");
    doTest("java.lang.Cloneable", "Cloneable");
    doTest("Test1<ArrayList>", "Test1");
    doTest("Comparator<Object>", "Comparator");
    doTest("TestIF3<T>", "TestIF3");
    doTest("TestBase<Enum1>", "TestBase");
    doTest("Comparable<SortTest<R>>", "Comparable");
    doTest("TypeSafeMap<CoreMap>", "TypeSafeMap");
    doTest("TypeSafeMap.Key<CoreMap, V>", "Key");
    doTest("Map<K,V>", "Map");
    doTest("Version<V, R>", "Version");
    doTest("Ref<V, R>", "Ref");
    doTest("VersionEntity<G, GR>", "VersionEntity");
    doTest("RefEntity<G, GR>", "RefEntity");
    doTest("Node<?, ?>", "Node");
    doTest("IQ<", "IQ");
    doTest("P<TB>", "P");
    doTest("DomInvocationHandler<FixedChildDescriptionImpl>", "DomInvocationHandler");
    doTest("RunConfigurationExtension<Bo>", "RunConfigurationExtension");
    doTest("Comparator<I>", "Comparator");
    doTest("JSResolveUtil.Resolver<M>", "Resolver");
    doTest("JSResolveUtil.F", "F");
    doTest("Model<Inner>", "Model");
    doTest("Comparator<A.B>", "Comparator");
    doTest("IConverter<N>", "IConverter");
    doTest("AbstractNumberConverter<Double>", "AbstractNumberConverter");
    doTest("IConverter<C>", "IConverter");
    doTest("Class<? extends Iterator>", "Class");
    doTest("List<? extends AbstractTreeNode>", "List");
    doTest("Iterator<T>", "Iterator");
    doTest("Class<E>", "Class");
    doTest("Comparator<byte[]>", "Comparator");
    doTest("C<T,T>", "C");
    doTest("A2<T>", "A2");
    doTest("A3<T>", "A3");
    doTest("IB<", "IB");
    doTest("A<S>", "A");
    doTest("B<String>", "B");
    doTest("List<List<T>>", "List");
    doTest("I<A[]>", "I");
    doTest("I<B[]>", "I");
    doTest("A<S,T>", "A");
    doTest("F<A, P1<B>>", "F");
    doTest("Iterable<T>", "Iterable");
    doTest("A<Integer>", "A");
    doTest("Pair<A, B>", "Pair");
    doTest("Field<Object>", "Field");
    doTest("MyInterface<Object>", "MyInterface");
    doTest("Class<I>", "Class");
    doTest("Outer.Inner", "Inner");
    doTest("Comparator<K>", "Comparator");
    doTest("Comparable<SelfComparable>", "Comparable");
    doTest("Collection<T>", "Collection");
    doTest("Collection<E>", "Collection");
    doTest("Iterator<E>", "Iterator");
    doTest("UnmodifiableCollection<E>", "UnmodifiableCollection");
    doTest("Set<E>", "Set");
    doTest("SortedSet<T>", "SortedSet");
    doTest("UnmodifiableSet<E>", "UnmodifiableSet");
    doTest("SortedSet<E>", "SortedSet");
    doTest("ListIterator<E>", "ListIterator");
    doTest("UnmodifiableList<E>", "UnmodifiableList");
    doTest("UnmodifiableSet<Map.Entry<K,V>>", "UnmodifiableSet");
    doTest("Iterator<Map.Entry<K,V>>", "Iterator");
    doTest("Map.Entry<K,V>", "Entry");
    doTest("SortedMap<K,V>", "SortedMap");
    doTest("UnmodifiableMap<K,V>", "UnmodifiableMap");
    doTest("SynchronizedCollection<E>", "SynchronizedCollection");
    doTest("SynchronizedSet<E>", "SynchronizedSet");
    doTest("SynchronizedList<E>", "SynchronizedList");
    doTest("SynchronizedMap<K,V>", "SynchronizedMap");
    doTest("CheckedCollection<E>", "CheckedCollection");
    doTest("CheckedSet<E>", "CheckedSet");
    doTest("CheckedList<E>", "CheckedList");
    doTest("Set<Map.Entry<K,V>>", "Set");
    doTest("CheckedMap<K,V>", "CheckedMap");
    doTest("AbstractSet<Object>", "AbstractSet");
    doTest("Iterator<Object>", "Iterator");
    doTest("AbstractList<Object>", "AbstractList");
    doTest("AbstractMap<Object,Object>", "AbstractMap");
    doTest("AbstractSet<E>", "AbstractSet");
    doTest("AbstractList<E>", "AbstractList");
    doTest("AbstractMap<K,V>", "AbstractMap");
    doTest("Comparator<T>", "Comparator");
    doTest("Comparator<Comparable<Object>>", "Comparator");
    doTest("Enumeration<T>", "Enumeration");
    doTest("java.util.SortedMap", "SortedMap");
    doTest("java.util.AbstractList", "AbstractList");
    doTest("java.util.TreeMap", "TreeMap");
    doTest("java.util.concurrent.atomic.AtomicBoolean", "AtomicBoolean");
    doTest("x.n.X1", "X1");
    doTest("x.n.X2", "X2");
    doTest("x.n.X3", "X3");
    doTest("java.util.X", "X");
    doTest("java.io.Reader", "Reader");
    doTest("java.security.cert.Certificate", "Certificate");
    doTest("i<", "i");
    doTest("ii<", "ii");
    doTest("i2<", "i2");
    doTest("A57.X", "X");
    doTest("A.B", "B");
    doTest("A42.B", "B");
    doTest("B57.X", "X");
    doTest("c4<", "c4");
    doTest("i7<", "i7");
    doTest("c8<", "c8");
    doTest("i5<", "i5");
    doTest("ConflictWithObject<", "ConflictWithObject");
    doTest("MethodsFromObject<", "MethodsFromObject");
    doTest("java.awt.event.ActionEvent", "ActionEvent");
    doTest("a<", "a");
    doTest("A1<", "A1");
    doTest("Foo<", "Foo");
    doTest("c2<", "c2");
    doTest("c1<", "c1");
    doTest("java.awt.BufferCapabilities", "BufferCapabilities");
    doTest("java.io.ObjectOutput", "ObjectOutput");
    doTest("java.io.ObjectInput", "ObjectInput");
    doTest("java.lang.ClassNotFoundException", "ClassNotFoundException");
    doTest("IFoo.UNKNOWN", "UNKNOWN");
    doTest("Integer.MAX_VALUE", "MAX_VALUE");
    doTest("Inner1<", "Inner1");
    doTest("D.B", "B");
    doTest("D.", "");
    doTest("D.B1", "B1");
    doTest("A.B1", "B1");
    doTest("C1.B1", "B1");
    doTest("@java.lang.SuppressWarnings", "SuppressWarnings");
    doTest("BaseStream<T>", "BaseStream");
    doTest("StreamOp<E_IN, Node<E_OUT>>", "StreamOp");
    doTest("IntermediateOp<E_IN, E_OUT>", "IntermediateOp");
    doTest("StreamOp<E_IN, R>", "StreamOp");
    doTest("StatefulOp<T, T>", "StatefulOp");
    doTest("Foo1<Integer, Integer>", "Foo1");
    doTest("List<B>", "List");
    doTest("Optional<U>", "Optional");
    doTest("BiFunction<T, T, T>", "BiFunction");
    doTest("Collector<T, M1>", "Collector");
    doTest("BinaryOperator<M2>", "BinaryOperator");
    doTest("Collector<T, R>", "Collector");
    doTest("C<T, M1>", "C");
    doTest("BiOp<M2>", "BiOp");
    doTest("C<T, R>", "C");
    doTest("BiFun<T, T, T>", "BiFun");
    doTest("Map<A, B>", "Map");
    doTest("Map<K1, M1>", "Map");
    doTest("FindOp<MT, Optional<MT>>", "FindOp");
    doTest("TerminalSink<FindSinkT, FindSinkO>", "TerminalSink");
    doTest("FindSink<OfRefT, Optional<OfRefT>>", "FindSink");
    doTest("FindOp1<MT, Optional<MT>>", "FindOp1");
    doTest("FindOp2<MT, Optional<MT>>", "FindOp2");
    doTest("Optional<T>", "Optional");
    doTest("Consumer<T>", "Consumer");
    doTest("@FunctionalInterface", "FunctionalInterface");
    doTest("Sink<Integer>", "Sink");
    doTest("Sink<T>", "Sink");
    doTest("FirstParent<", "FirstParent");
    doTest("Block<T>", "Block");
    doTest("TerminalSink<T, Void>", "TerminalSink");
    doTest("VoidTerminalSink<Integer>", "VoidTerminalSink");
    doTest("Sink.OfInt", "OfInt");
    doTest("VoidTerminalSink.OfInt<", "OfInt");
    doTest("ForEachOp<T>", "ForEachOp");
    doTest("VoidTerminalSink.OfInt", "OfInt");
    doTest("Iso<R, T>", "Iso");
    doTest("I<X>", "I");
    doTest("I1<T>", "I1");
    doTest("I2<T>", "I2");
    doTest("Y<Object>", "Y");
    doTest("BinaryOperator<Integer>", "BinaryOperator");
    doTest("Combiner<T,T,T>", "Combiner");
    doTest("IntermediateOp<L, M>", "IntermediateOp");
    doTest("IntermediateOp1<T, U>", "IntermediateOp1");
    doTest("I<A,B>", "I");
    doTest("A<L>", "A");
    doTest("SameArgsI<T>", "SameArgsI");
    doTest("LambdaTest<U>", "LambdaTest");
    doTest("Option<T>", "Option");
    doTest("Function<T, Integer>", "Function");
    doTest("BaseStream<Integer>", "BaseStream");
    doTest("Comparator<Map.Entry<K, V>>", "Comparator");
    doTest("Function<T, T>", "Function");
    doTest("A<M>", "A");
    doTest("Foo<X>", "Foo");
    doTest("Iterable<U>", "Iterable");
    doTest("ASink<R, Moo>", "ASink");
    doTest("ASink<AAMoo, AAMoo>", "ASink");
    doTest("ASink<R, AAAMoo>", "ASink");
    doTest("Collector<T, C>", "Collector");
    doTest("Collector<T, List<T>>", "Collector");
    doTest("Stream<C>", "Stream");
    doTest("BiFunction<T,T,T>", "BiFunction");
    doTest("Collector<Integer, R>", "Collector");
    doTest("C.E2", "E2");
    doTest("C.E1", "E1");
    doTest("java.nio.charset.Charset", "Charset");
    doTest("java.nio.charset.CharsetDecoder", "CharsetDecoder");
    doTest("I<String>", "I");
    doTest("InOut<B>", "InOut");
    doTest("DeeBee<B>", "DeeBee");
    doTest("b<C.D>", "b");
    doTest("b<String>", "b");
    doTest("Foo.Bar", "Bar");
    doTest("@Attr", "Attr");
    doTest("javax.swing.table.TableModel", "TableModel");
    doTest("javax.swing.event.TableModelListener", "TableModelListener");
    doTest("@BeanAware", "BeanAware");
    doTest("java.awt.MenuContainer", "MenuContainer");
    doTest("java.lang.Number", "Number");
    doTest("Foo<Bug>", "Foo");
    doTest("Seq<T>", "Seq");
    doTest("Seq<V>", "Seq");
    doTest("Comparable<R>", "Comparable");
    doTest("@org.jetbrains.annotations.NonNls", "NonNls");
    doTest("org.jetbrains.annotations.NonNls", "NonNls");
    doTest("@NonNls", "NonNls");
    doTest("MatchOp<T>", "MatchOp");
    doTest("BooleanTerminalSink<T>", "BooleanTerminalSink");
    doTest("Callable<String>", "Callable");
    doTest("Callable<Integer>", "Callable");
    doTest("AsyncTask<String, Integer, Long>", "AsyncTask");
    doTest("AsyncTask<String,Integer,Integer>", "AsyncTask");
    doTest("List<AppInfo>", "List");
    doTest("ArrayList<ResolveInfo>", "ArrayList");
    doTest("CallableEx<String>", "CallableEx");
    doTest("Callable<TE>", "Callable");
    doTest("CallableEx<Integer>", "CallableEx");
    doTest("TestCase<caret>", "TestCase");
    doTest("@org.ju", "ju");
    doTest("l.InLib", "InLib");
    doTest("junit.framework.Assert", "Assert");
    doTest("junit.framework.TestCase", "TestCase");
    doTest("junit.framework.Test", "Test");
    doTest("junit.framework.TestSuite", "TestSuite");
    doTest("junit.framework.TestResult", "TestResult");
    doTest("junit.framework.TestListener", "TestListener");
    doTest("junit.framework.TestFailure", "TestFailure");
    doTest("junit.framework.ComparisonFailure", "ComparisonFailure");
    doTest("junit.framework.AssertionFailedError", "AssertionFailedError");
    doTest("x.InA", "InA");
    doTest("y.AddDependency", "AddDependency");
    doTest("y.AddLibrary", "AddLibrary");
    doTest("x.DoTest", "DoTest");
    doTest("@org.junit.Test", "Test");
    doTest("org.junit.Test", "Test");
    doTest("x.DoTest4", "DoTest4");
    doTest("Some<K, T>", "Some");
    doTest("java.util.Collection<? super T>", "Collection");
    doTest("I.FOO", "FOO");
    doTest("I.FOO1", "FOO1");
    doTest("I.FOO2", "FOO2");
    doTest("I.FOO3", "FOO3");
    doTest("I.FOO4", "FOO4");
    doTest("I.FOO5", "FOO5");
    doTest("@java.lang.SafeVarargs", "SafeVarargs");
    doTest("M<T>", "M");
    doTest("M<String>", "M");
    doTest("@javax.annotation.Generated", "Generated");
    doTest("II<String>", "II");
    doTest("AroundTemplateMethod<T>", "AroundTemplateMethod");
    doTest("SetupTimer<Integer>", "SetupTimer");
    doTest("bar.Log", "Log");
    doTest("@Bar.Foo", "Foo");
    doTest("I<Object>", "I");
    doTest("Superclass<E, Q>", "Superclass");
    doTest("@org.testng.annotations.Test", "Test");
    doTest("@org.junit.Before", "Before");
    doTest("Ref<T>", "Ref");
    doTest("M<MX, MY>", "M");
    doTest("Proc<String>", "Proc");
    doTest("Proc<Integer>", "Proc");
    doTest("java.util.Iterator", "Iterator");
    doTest("p1.Base", "Base");
    doTest("javax.swing.Icon", "Icon");
    doTest("java.awt.Dialog", "Dialog");
    doTest("javax.swing.JLabel", "JLabel");
    doTest("test.Matcher", "Matcher");
    doTest("java.util.Collections.CopiesList", "CopiesList");
    doTest("java.util.Collections.EmptyList", "EmptyList");
    doTest("java.util.Collections.EmptyMap", "EmptyMap");
    doTest("java.util.Collections.EmptySet", "EmptySet");
    doTest("java.util.Collections.ReverseComparator", "ReverseComparator");
    doTest("java.util.Collections.ReverseComparator2", "ReverseComparator2");
    doTest("java.util.Collections.SelfComparable", "SelfComparable");
    doTest("java.util.Collections.SingletonList", "SingletonList");
    doTest("java.util.Collections.SingletonMap", "SingletonMap");
    doTest("java.util.Collections.SingletonMap.ImmutableEntry", "ImmutableEntry");
    doTest("java.util.Collections.SingletonSet", "SingletonSet");
    doTest("java.util.Collections.SynchronizedCollection", "SynchronizedCollection");
    doTest("java.util.Collections.SynchronizedList", "SynchronizedList");
    doTest("java.util.Collections.SynchronizedMap", "SynchronizedMap");
    doTest("java.util.Collections.SynchronizedRandomAccessList", "SynchronizedRandomAccessList");
    doTest("java.util.Collections.SynchronizedSet", "SynchronizedSet");
    doTest("java.util.Collections.SynchronizedSortedMap", "SynchronizedSortedMap");
    doTest("java.util.Collections.SynchronizedSortedSet", "SynchronizedSortedSet");
    doTest("java.util.Collections.UnmodifiableCollection", "UnmodifiableCollection");
    doTest("java.util.Collections.UnmodifiableList", "UnmodifiableList");
    doTest("java.util.Collections.UnmodifiableMap", "UnmodifiableMap");
    doTest("java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet", "UnmodifiableEntrySet");
    doTest("java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableEntry", "UnmodifiableEntry");
    doTest("java.util.Collections.UnmodifiableRandomAccessList", "UnmodifiableRandomAccessList");
    doTest("java.util.Collections.UnmodifiableSet", "UnmodifiableSet");
    doTest("java.util.Collections.UnmodifiableSortedMap", "UnmodifiableSortedMap");
    doTest("java.util.Collections.UnmodifiableSortedSet", "UnmodifiableSortedSet");
    doTest("java.util.Map.Entry", "Entry");
    doTest("AnnotatedNonStaticInnerClassConstructor.Inner", "Inner");
    doTest("pack.Modifiers", "Modifiers");
    doTest("pkg.Deprecated", "Deprecated");
    doTest("pkg.package-info", "package-info");
    doTest("pkg.Nested", "Nested");
    doTest("pkg.Nested.Inner1", "Inner1");
    doTest("pkg.Nested.Inner1.Inner2", "Inner2");
    doTest("pkg.SimpleEnum", "SimpleEnum");
    doTest("pkg.EnumWithFields", "EnumWithFields");
    doTest("pkg.NormalClass", "NormalClass");
    doTest("pkg.NormalClass.Inner", "Inner");
    doTest("pkg.Annotations", "Annotations");
    doTest("pkg.Annotations.IndeterminateAnno", "IndeterminateAnno");
    doTest("pkg.Annotations.A4", "A4");
    doTest("pkg.Annotations.A3", "A3");
    doTest("pkg.Annotations.A2", "A2");
    doTest("pkg.Annotations.A1", "A1");
    doTest("pkg.ParameterNames", "ParameterNames");
    doTest("pkg.EmptyEnum", "EmptyEnum");
    doTest("pkg.$BuckClass", "$BuckClass");
    doTest("pkg.BuckClass$", "BuckClass$");
    doTest("pkg.ExtMethods", "ExtMethods");
    doTest("pkg.MethodReceiver", "MethodReceiver");
    doTest("pkg.MethodReceiver.A", "A");
    doTest("com.google.android.maps.OverlayItem", "OverlayItem");
    doTest("com.google.android.maps.GeoPoint", "GeoPoint");
    doTest("android.graphics.drawable.Drawable", "Drawable");
    doTest("com.TestClass", "TestClass");
    doTest("ppp.BadClass", "BadClass");
    doTest("@AnnotationType", "AnnotationType");
    doTest("@annotations.AnnotationType", "AnnotationType");
    doTest("List<Integer>", "List");
    doTest("List<List<Integer>>", "List");
    doTest("pack.MyClass", "MyClass");
    doTest("p2.A", "A");
    doTest("p1.A", "A");
    doTest("Parent.Child", "Child");
    doTest("net.n3.nanoxml.XMLUtil", "XMLUtil");
    doTest("net.n3.nanoxml.PIReader", "PIReader");
    doTest("net.n3.nanoxml.XMLWriter", "XMLWriter");
    doTest("net.n3.nanoxml.IXMLParser", "IXMLParser");
    doTest("net.n3.nanoxml.XMLElement", "XMLElement");
    doTest("net.n3.nanoxml.CDATAReader", "CDATAReader");
    doTest("net.n3.nanoxml.IXMLElement", "IXMLElement");
    doTest("net.n3.nanoxml.NonValidator", "NonValidator");
    doTest("net.n3.nanoxml.StdXMLParser", "StdXMLParser");
    doTest("net.n3.nanoxml.StdXMLReader", "StdXMLReader");
    doTest("net.n3.nanoxml.XMLAttribute", "XMLAttribute");
    doTest("net.n3.nanoxml.StdXMLReader.StackedReader", "StackedReader");
    doTest("net.n3.nanoxml.XMLException", "XMLException");
    doTest("net.n3.nanoxml.ContentReader", "ContentReader");
    doTest("net.n3.nanoxml.StdXMLBuilder", "StdXMLBuilder");
    doTest("net.n3.nanoxml.ValidatorPlugin", "ValidatorPlugin");
    doTest("net.n3.nanoxml.XMLParserFactory", "XMLParserFactory");
    doTest("net.n3.nanoxml.XMLEntityResolver", "XMLEntityResolver");
    doTest("net.n3.nanoxml.XMLParseException", "XMLParseException");
    doTest("net.n3.nanoxml.XMLValidationException", "XMLValidationException");
    doTest("com.google.protobuf.Message", "Message");
    doTest("com.google.protobuf.RpcUtil", "RpcUtil");
    doTest("com.google.protobuf.Service", "Service");
    doTest("com.google.protobuf.Message.Builder", "Builder");
    doTest("com.google.protobuf.FieldSet", "FieldSet");
    doTest("com.google.protobuf.FieldSet.FieldDescriptorLite", "FieldDescriptorLite");
    doTest("com.google.protobuf.Internal", "Internal");
    doTest("com.google.protobuf.RpcUtil.AlreadyCalledException", "AlreadyCalledException");
    doTest("com.google.protobuf.Internal.EnumLiteMap", "EnumLiteMap");
    doTest("com.google.protobuf.RpcCallback<Type>", "RpcCallback");
    doTest("com.google.protobuf.Internal.EnumLite", "EnumLite");
    doTest("com.google.protobuf.MessageLite", "MessageLite");
    doTest("com.google.protobuf.MessageOrBuilder", "MessageOrBuilder");
    doTest("com.google.protobuf.MessageLite.Builder", "Builder");
    doTest("com.google.protobuf.RpcCallback<com.google.protobuf.Message>", "RpcCallback");
    doTest("com.google.protobuf.ByteString", "ByteString");
    doTest("com.google.protobuf.RpcCallback<ParameterType>", "RpcCallback");
    doTest("com.google.protobuf.RpcChannel", "RpcChannel");
    doTest("com.google.protobuf.ByteString.CodedBuilder", "CodedBuilder");
    doTest("com.google.protobuf.TextFormat", "TextFormat");
    doTest("com.google.protobuf.WireFormat", "WireFormat");
    doTest("com.google.protobuf.TextFormat.InvalidEscapeSequenceException", "InvalidEscapeSequenceException");
    doTest("com.google.protobuf.WireFormat.FieldType", "FieldType");
    doTest("com.google.protobuf.ByteString.Output", "Output");
    doTest("com.google.protobuf.TextFormat.ParseException", "ParseException");
    doTest("com.google.protobuf.TextFormat.Tokenizer", "Tokenizer");
    doTest("com.google.protobuf.WireFormat.JavaType", "JavaType");
    doTest("java.io.FilterOutputStream", "FilterOutputStream");
    doTest("java.lang.Comparable<T>", "Comparable");
    doTest("com.google.protobuf.FieldSet<T>", "FieldSet");
    doTest("com.google.protobuf.Descriptors", "Descriptors");
    doTest("com.google.protobuf.RpcCallback", "RpcCallback");
    doTest("com.google.protobuf.Descriptors.DescriptorPool", "DescriptorPool");
    doTest("com.google.protobuf.RpcController", "RpcController");
    doTest("com.google.protobuf.DynamicMessage", "DynamicMessage");
    doTest("com.google.protobuf.Descriptors.DescriptorPool.DescriptorIntPair", "DescriptorIntPair");
    doTest("com.google.protobuf.DynamicMessage.Builder", "Builder");
    doTest("com.google.protobuf.TextFormat.TextGenerator", "TextGenerator");
    doTest("com.google.protobuf.Descriptors.DescriptorPool.PackageDescriptor", "PackageDescriptor");
    doTest("com.google.protobuf.MessageLiteOrBuilder", "MessageLiteOrBuilder");
    doTest("com.google.protobuf.TextFormat.Printer", "Printer");
    doTest("com.google.protobuf.LazyStringList", "LazyStringList");
    doTest("java.util.List<java.lang.String>", "List");
    doTest("com.google.protobuf.SmallSortedMap", "SmallSortedMap");
    doTest("com.google.protobuf.SmallSortedMap.EmptySet", "EmptySet");
    doTest("com.google.protobuf.SmallSortedMap.EntryIterator", "EntryIterator");
    doTest("com.google.protobuf.SmallSortedMap.EntrySet", "EntrySet");
    doTest("com.google.protobuf.SmallSortedMap.Entry", "Entry");
    doTest("java.util.AbstractMap<K,V>", "AbstractMap");
    doTest("java.lang.Iterable<T>", "Iterable");
    doTest("java.util.Iterator<java.util.Map.Entry<K,V>>", "Iterator");
    doTest("java.util.AbstractSet<java.util.Map.Entry<K,V>>", "AbstractSet");
    doTest("java.lang.Comparable<com.google.protobuf.SmallSortedMap<K,V>.Entry>", "Comparable");
    doTest("com.google.protobuf.SmallSortedMap<FieldDescriptorType,java.lang.Object>", "SmallSortedMap");
    doTest("com.google.protobuf.SmallSortedMap<K,V>", "SmallSortedMap");
    doTest("com.google.protobuf.AbstractMessage", "AbstractMessage");
    doTest("com.google.protobuf.AbstractMessage.Builder<com.google.protobuf.DynamicMessage.Builder>", "Builder");
    doTest("com.google.protobuf.Descriptors.DescriptorValidationException", "DescriptorValidationException");
    doTest("com.google.protobuf.BlockingService", "BlockingService");
    doTest("com.google.protobuf.AbstractMessage.Builder", "Builder");
    doTest("com.google.protobuf.Descriptors.GenericDescriptor", "GenericDescriptor");
    doTest("com.google.protobuf.UnknownFieldSet", "UnknownFieldSet");
    doTest("com.google.protobuf.UnknownFieldSet.Field", "Field");
    doTest("com.google.protobuf.Descriptors.MethodDescriptor", "MethodDescriptor");
    doTest("com.google.protobuf.UnknownFieldSet.Field.Builder", "Builder");
    doTest("com.google.protobuf.CodedInputStream", "CodedInputStream");
    doTest("com.google.protobuf.UnknownFieldSet.Builder", "Builder");
    doTest("com.google.protobuf.Descriptors.ServiceDescriptor", "ServiceDescriptor");
    doTest("com.google.protobuf.AbstractMessageLite", "AbstractMessageLite");
    doTest("com.google.protobuf.AbstractMessageLite.Builder<BuilderType>", "Builder");
    doTest("com.google.protobuf.UninitializedMessageException", "UninitializedMessageException");
    doTest("com.google.protobuf.GeneratedMessage", "GeneratedMessage");
    doTest("com.google.protobuf.GeneratedMessage.FieldAccessorTable", "FieldAccessorTable");
    doTest("com.google.protobuf.GeneratedMessage.FieldAccessorTable.RepeatedMessageFieldAccessor", "RepeatedMessageFieldAccessor");
    doTest("com.google.protobuf.Descriptors.EnumValueDescriptor", "EnumValueDescriptor");
    doTest("com.google.protobuf.ServiceException", "ServiceException");
    doTest("com.google.protobuf.Descriptors.EnumDescriptor", "EnumDescriptor");
    doTest("com.google.protobuf.GeneratedMessage.FieldAccessorTable.SingularMessageFieldAccessor", "SingularMessageFieldAccessor");
    doTest("com.google.protobuf.CodedOutputStream", "CodedOutputStream");
    doTest("com.google.protobuf.CodedOutputStream.OutOfSpaceException", "OutOfSpaceException");
    doTest("com.google.protobuf.Descriptors.FieldDescriptor", "FieldDescriptor");
    doTest("com.google.protobuf.GeneratedMessage.FieldAccessorTable.RepeatedEnumFieldAccessor", "RepeatedEnumFieldAccessor");
    doTest("com.google.protobuf.Descriptors.FieldDescriptor.JavaType", "JavaType");
    doTest("com.google.protobuf.ExtensionRegistry", "ExtensionRegistry");
    doTest("com.google.protobuf.ExtensionRegistry.DescriptorIntPair", "DescriptorIntPair");
    doTest("com.google.protobuf.ExtensionRegistry.ExtensionInfo", "ExtensionInfo");
    doTest("com.google.protobuf.Descriptors.FieldDescriptor.Type", "Type");
    doTest("com.google.protobuf.GeneratedMessage.FieldAccessorTable.SingularEnumFieldAccessor", "SingularEnumFieldAccessor");
    doTest("com.google.protobuf.ExtensionRegistryLite", "ExtensionRegistryLite");
    doTest("com.google.protobuf.BlockingRpcChannel", "BlockingRpcChannel");
    doTest("com.google.protobuf.SingleFieldBuilder", "SingleFieldBuilder");
    doTest("com.google.protobuf.GeneratedMessage.BuilderParent", "BuilderParent");
    doTest("com.google.protobuf.GeneratedMessage.FieldAccessorTable.RepeatedFieldAccessor", "RepeatedFieldAccessor");
    doTest("com.google.protobuf.AbstractMessageLite.Builder", "Builder");
    doTest("com.google.protobuf.AbstractMessageLite.Builder.LimitedInputStream", "LimitedInputStream");
    doTest("java.io.FilterInputStream", "FilterInputStream");
    doTest("com.google.protobuf.LazyStringArrayList", "LazyStringArrayList");
    doTest("com.google.protobuf.GeneratedMessage.FieldAccessorTable.SingularFieldAccessor", "SingularFieldAccessor");
    doTest("java.util.AbstractList<java.lang.String>", "AbstractList");
    doTest("java.util.RandomAccess", "RandomAccess");
    doTest("com.google.protobuf.ProtocolMessageEnum", "ProtocolMessageEnum");
    doTest("com.google.protobuf.GeneratedMessageLite", "GeneratedMessageLite");
    doTest("com.google.protobuf.GeneratedMessageLite.SerializedForm", "SerializedForm");
    doTest("com.google.protobuf.GeneratedMessageLite.GeneratedExtension", "GeneratedExtension");
    doTest("com.google.protobuf.GeneratedMessage.FieldAccessorTable.FieldAccessor", "FieldAccessor");
    doTest("com.google.protobuf.Descriptors.Descriptor", "Descriptor");
    doTest("com.google.protobuf.GeneratedMessageLite.ExtensionDescriptor", "ExtensionDescriptor");
    doTest("com.google.protobuf.GeneratedMessage.GeneratedExtension", "GeneratedExtension");
    doTest("com.google.protobuf.GeneratedMessageLite.Builder", "Builder");
    doTest("com.google.protobuf.GeneratedMessage.ExtensionDescriptorRetriever", "ExtensionDescriptorRetriever");
    doTest("com.google.protobuf.FieldSet.FieldDescriptorLite<com.google.protobuf.GeneratedMessageLite.ExtensionDescriptor>", "FieldDescriptorLite");
    doTest("com.google.protobuf.GeneratedMessageLite.Builder<MessageType,BuilderType>", "Builder");
    doTest("com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType,Type>", "GeneratedExtension");
    doTest("com.google.protobuf.Descriptors.FileDescriptor", "FileDescriptor");
    doTest("com.google.protobuf.RepeatedFieldBuilder", "RepeatedFieldBuilder");
    doTest("com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner", "InternalDescriptorAssigner");
    doTest("com.google.protobuf.RepeatedFieldBuilder.MessageOrBuilderExternalList", "MessageOrBuilderExternalList");
    doTest("com.google.protobuf.RepeatedFieldBuilder.BuilderExternalList", "BuilderExternalList");
    doTest("com.google.protobuf.RepeatedFieldBuilder.MessageExternalList", "MessageExternalList");
    doTest("java.util.AbstractList<IType>", "AbstractList");
    doTest("java.util.List<IType>", "List");
    doTest("java.util.AbstractList<BType>", "AbstractList");
    doTest("java.util.List<BType>", "List");
    doTest("java.util.AbstractList<MType>", "AbstractList");
    doTest("java.util.List<MType>", "List");
    doTest("com.google.protobuf.ExtensionRegistryLite.ObjectIntPair", "ObjectIntPair");
    doTest("com.google.protobuf.GeneratedMessage.Builder", "Builder");
    doTest("com.google.protobuf.Internal.EnumLiteMap<com.google.protobuf.Descriptors.EnumValueDescriptor>", "EnumLiteMap");
    doTest("java.lang.Comparable<com.google.protobuf.Descriptors.FieldDescriptor>", "Comparable");
    doTest("com.google.protobuf.FieldSet.FieldDescriptorLite<com.google.protobuf.Descriptors.FieldDescriptor>", "FieldDescriptorLite");
    doTest("com.google.protobuf.GeneratedMessage.Builder.BuilderParentImpl", "BuilderParentImpl");
    doTest("com.google.protobuf.UnmodifiableLazyStringList", "UnmodifiableLazyStringList");
    doTest("Map<Integer, Integer>", "Map");
    doTest("java.lang.Comparable<T.NameRef>", "Comparable");
    doTest("List<T[]>", "List");
    doTest("Condition<T>", "Condition");
    doTest("Class<Foo>", "Class");
    doTest("Class<Runnable>", "Class");
    doTest("Foo<BarImpl>", "Foo");
    doTest("Y<T>", "Y");
    doTest("GenericClass<String>", "GenericClass");
    doTest("A.I", "I");
    doTest("Test<T>", "Test");
    doTest("Comparable<Integer>", "Comparable");
    doTest("Iterator<Map.Entry<K, V>>", "Iterator");
    doTest("Predicate<T>", "Predicate");
    doTest("Foo.Predicate<T>", "Predicate");
    doTest("Callable<Object>", "Callable");
    doTest("C<String>", "C");
    doTest("p1.S2", "S2");
    doTest("p2.S1", "S1");
    doTest("p1.S1", "S1");
    doTest("p2.S2", "S2");
    doTest("p2.p1.S1", "S1");
    doTest("p2.p1.S2", "S2");
    doTest("@javax.xml.bind.annotation.XmlSchema", "XmlSchema");
    doTest("A <R>", "A");
    doTest("Extracted.Inner", "Inner");
    doTest("java.util.List<String>", "List");
    doTest("@java.lang.Override", "Override");
    doTest("a.Test", "Test");
    doTest("b.TestSubclass", "TestSubclass");
    doTest("java.util.ListIterator", "ListIterator");
    doTest("p1.AA", "AA");
    doTest("p2.C", "C");
    doTest("java.math.BigDecimal", "BigDecimal");
    doTest("java.sql.SQLWarning", "SQLWarning");
    doTest("java.sql.ResultSetMetaData", "ResultSetMetaData");
    doTest("java.sql.Statement", "Statement");
    doTest("java.sql.Ref", "Ref");
    doTest("java.sql.Blob", "Blob");
    doTest("java.sql.Clob", "Clob");
    doTest("java.sql.Array", "Array");
    doTest("java.sql.ResultSet", "ResultSet");
    doTest("p.Test", "Test");
    doTest("p1.Usage", "Usage");
    doTest("Super<R>", "Super");
    doTest("java.lang.Comparable<java.lang.Long>", "Comparable");
    doTest("R<String, Object>", "R");
    doTest("Res.R<java.lang.String,java.lang.Object>", "R");
    doTest("Res.R<String,java.lang.Object>", "R");
    doTest("Res.R<String,Object>", "R");
    doTest("Res.R<String, Object>", "R");
    doTest("@Before", "Before");
    doTest("org.junit.Before", "Before");
    doTest("Test<G, T>", "Test");
    doTest("p.Param", "Param");
    doTest("p2.Test", "Test");
    doTest("pack1.Class2", "Class2");
    doTest("pack2.Class1", "Class1");
    doTest("pack1.X", "X");
    doTest("pack2.X", "X");
    doTest("pack2.A", "A");
    doTest("pack1.Class1", "Class1");
    doTest("packUser.Class2", "Class2");
    doTest("pack0.Class0", "Class0");
    doTest("pack2.A.Class1", "Class1");
    doTest("A.Class1", "Class1");
    doTest("pack1.Usage", "Usage");
    doTest("pack1.StaticInner", "StaticInner");
    doTest("pack1.Client", "Client");
    doTest("xxx.Outer", "Outer");
    doTest("p.A.B", "B");
    doTest("p.A", "A");
    doTest("p.B", "B");
    doTest("package2.InnerClass", "InnerClass");
    doTest("package1.OuterClass", "OuterClass");
    doTest("pack1.DImpl", "DImpl");
    doTest("pack1.A", "A");
    doTest("pack1.B", "B");
    doTest("pack2.B", "B");
    doTest("pack1.Outer", "Outer");
    doTest("POne<Hooray<A>>", "POne");
    doTest("Eff<POne<A>, A>", "Eff");
    doTest("@SomeAnnotation", "SomeAnnotation");
    doTest("pack2.OtherClass", "OtherClass");
    doTest("pack1.ClassWithStaticMethod", "ClassWithStaticMethod");
    doTest("bar.A", "A");
    doTest("A.Inner", "Inner");
    doTest("B.Inner", "Inner");
    doTest("target.pack1.S1", "S1");
    doTest("pack2.UsagesFromBoth", "UsagesFromBoth");
    doTest("pack2.UsagesFromBoth2", "UsagesFromBoth2");
    doTest("Parent<T>", "Parent");
    doTest("Parent<String>", "Parent");
    doTest("I<S>", "I");
    doTest("Base<U>", "Base");
    doTest("javax.swing.JTextField", "JTextField");
    doTest("Test<Throwable>", "Test");
    doTest("BaseTask<T, ForEachTask<T>>", "BaseTask");
    doTest("pack1.List", "List");
    doTest("pack2.Usage2", "Usage2");
    doTest("pack2.Usage", "Usage");
    doTest("pack1.ParentXXX", "ParentXXX");
    doTest("pack1.Derived", "Derived");
    doTest("pack1.Object", "Object");
    doTest("renameCollisions.String", "String");
    doTest("javax.swing.SwingConstants", "SwingConstants");
    doTest("Holder<X>", "Holder");
    doTest("MyEventListener<Object>", "MyEventListener");
    doTest("foo.Builder", "Builder");
    doTest("Test<A, B, C>", "Test");
    doTest("B<TC>", "B");
    doTest("A<TB>", "A");
    doTest("A<TC>", "A");
    doTest("pack1.AnInterface", "AnInterface");
    doTest("pack1.AClass", "AClass");
    doTest("pack2.Client", "Client");
    doTest("Int<Xyz>", "Int");
    doTest("Int<XInt>", "Int");
    doTest("Factory<IntF>", "Factory");
    doTest("Factory<Clazz>", "Factory");
    doTest("LinkedList<Integer>", "LinkedList");
    doTest("LinkedList<E, T>", "LinkedList");
    doTest("LinkedList<E, Integer>", "LinkedList");
    doTest("Map<Integer, Y>", "Map");
    doTest("List<X>", "List");
    doTest("Collection<X>", "Collection");
    doTest("List<P>", "List");
    doTest("C<String,Integer>", "C");
    doTest("C<Integer, String,Integer>", "C");
    doTest("C<Integer, String >", "C");
    doTest("C<String, L<String>>", "C");
    doTest("Subject<String>", "Subject");
    doTest("Subject<SubjectFace, Set<Object>>", "Subject");
    doTest("Subject<SubjectFace, java.util.Set<Object>>", "Subject");
    doTest("X<U>", "X");
    doTest("java.util.TreeMap.Entry", "Entry");
    doTest("java.util.TreeMap.Entry<K,?>", "Entry");
    doTest("java.util.TreeMap.Entry<K,V>", "Entry");
    doTest("java.util.Comparator<? super K>", "Comparator");
    doTest("WeighingComparable<T, Loc>", "WeighingComparable");
    doTest("Key<ProximityWeigher>", "Key");
    doTest("Weigher<String, ProximityLocation>", "Weigher");
    doTest("Comparable<WeighingComparable<T, Loc>>", "Comparable");
    doTest("p1.ParentWithProtected", "ParentWithProtected");
    doTest("p1.SubjectWithSuper", "SubjectWithSuper");
    doTest("p2.Usage", "Usage");
    doTest("p1.ParentUniqueName", "ParentUniqueName");
    doTest("p1.ChildCtor", "ChildCtor");
    doTest("java.util.Comparator<String>", "Comparator");
    doTest("Demo.MyParent", "MyParent");
    doTest("A.MyActionListener", "MyActionListener");
    doTest("Comparable<T>", "Comparable");
    doTest("qqq.aaa.Yahoo", "Yahoo");
    doTest("p1.C1", "C1");
    doTest("zzz.bbb.QQQ", "QQQ");
}
Example 5
Project: eclipse.jdt.core-master  File: ClassFileTests.java View source code
public void setUpSuite() throws Exception {
    super.setUpSuite();
    IJavaProject javaProject = createJavaProject("P", new String[0], new String[] { "JCL15_LIB", "/P/lib" }, "", JavaCore.VERSION_1_5);
    String[] pathAndContents = new String[] { "nongeneric/A.java", "package nongeneric;\n" + "public class A {\n" + "}", "generic/X.java", "package generic;\n" + "public class X<T> {\n" + "  <U extends Exception> X<T> foo(X<T> x) throws RuntimeException, U {\n" + "    return null;\n" + "  }\n" + "  <K, V extends T> V foo(K key, V value) throws Exception {\n" + "    return value;\n" + "  }\n" + "}", "generic/Y.java", "package generic;\n" + "public class Y<K, L> {\n" + "}", "generic/Z.java", "package generic;\n" + "public class Z<T extends Object & I<? super T>> {\n" + "}", "generic/I.java", "package generic;\n" + "public interface I<T> {\n" + "}", "generic/W.java", "package generic;\n" + "public class W<T extends X<T> , U extends T> {\n" + "}", "generic/V.java", "package generic;\n" + "public class V extends X<Thread> implements I<String> {\n" + "}", "generic/GenericField.java", "package generic;\n" + "import java.util.Collection;\n" + "public class GenericField {\n" + "	protected Collection<String> myField;\n" + "}", "annotated/X.java", "package annotated;\n" + "@MyOtherAnnot\n" + "public class X {\n" + "  @MyOtherAnnot\n" + "  Object field;\n" + "  @MyOtherAnnot\n" + "  void method() {}\n" + "  @MyAnnot(_int=1)\n" + "  void foo01() {}\n" + "  @MyAnnot(_byte=(byte)2)\n" + "  void foo02() {}\n" + "  @MyAnnot(_short=(short)3)\n" + "  void foo03() {}\n" + "  @MyAnnot(_char='a')\n" + "  void foo04() {}\n" + "  @MyAnnot(_float=1.2f)\n" + "  void foo05() {}\n" + "  @MyAnnot(_double=3.4)\n" + "  void foo06() {}\n" + "  @MyAnnot(_boolean=true)\n" + "  void foo07() {}\n" + "  @MyAnnot(_long=123456789L)\n" + "  void foo08() {}\n" + "  @MyAnnot(_string=\"abc\")\n" + "  void foo09() {}\n" + "  @MyAnnot(_annot=@MyOtherAnnot)\n" + "  void foo10() {}\n" + "  @MyAnnot(_class=String.class)\n" + "  void foo11() {}\n" + "  @MyAnnot(_enum=MyEnum.SECOND)\n" + "  void foo12() {}\n" + "  @MyAnnot(_array={1, 2, 3})\n" + "  void foo13() {}\n" + "  @MyAnnot(_neg_int = -2)\n" + "  void foo14() {}\n" + "  @MyAnnot(_neg_float=-2.0f)\n" + "  void foo15() {}\n" + "  @MyAnnot(_neg_double=-2.0)\n" + "  void foo16() {}\n" + "  @MyAnnot(_neg_long=-2L)\n" + "  void foo17() {}\n" + "}\n" + "@interface MyAnnot {\n" + "  int _int() default 0;\n" + "  byte _byte() default 0;\n" + "  short _short() default 0;\n" + "  char _char() default ' ';\n" + "  float _float() default 0.0f;\n" + "  double _double() default 0.0;\n" + "  boolean _boolean() default false;\n" + "  long _long() default 0L;\n" + "  String _string() default \"   \";\n" + "  MyOtherAnnot _annot() default @MyOtherAnnot;\n" + "  Class _class() default Object.class;\n" + "  MyEnum _enum() default MyEnum.FIRST;\n" + "  int[] _array() default {};\n" + "  int _neg_int() default -1;\n" + "  float _neg_float() default -1.0f;\n" + "  double _neg_double() default -1.0;\n" + "  long _neg_long() default -1L;\n" + "}\n" + "@interface MyOtherAnnot {\n" + "}\n" + "enum MyEnum {\n" + "  FIRST, SECOND;\n" + "}", "annotated/Y.java", "package annotated;\n" + "import java.lang.annotation.*;\n" + "import static java.lang.annotation.ElementType.*;\n" + "import static java.lang.annotation.RetentionPolicy.*;\n" + "@Deprecated\n" + "@Documented\n" + "@Inherited\n" + "@Retention(SOURCE)\n" + "@Target({PACKAGE, TYPE, ANNOTATION_TYPE, METHOD, CONSTRUCTOR, FIELD, LOCAL_VARIABLE, PARAMETER})\n" + "public @interface Y {\n" + "}", "varargs/X.java", "package varargs;\n" + "public class X {\n" + "  void foo(String s, Object ... others) {\n" + "  }\n" + "}", "workingcopy/X.java", "package workingcopy;\n" + "public class X {\n" + "  void foo() {\n" + "    System.out.println();\n" + "  }\n" + "}", "workingcopy/Y.java", "package workingcopy;\n" + "public class Y<W> {\n" + "  <T> T foo(T t, String... args) {\n" + "    return t;\n" + "  }\n" + "}", "annotated/MyAnnotation.java", "package annotated;\n" + "import java.lang.annotation.Retention;\n" + "import java.lang.annotation.RetentionPolicy;\n" + "@Retention(value = RetentionPolicy.RUNTIME)\n" + "public @interface MyAnnotation {}", "annotated/MyAnnotation2.java", "package annotated;\n" + "import java.lang.annotation.Retention;\n" + "import java.lang.annotation.RetentionPolicy;\n" + "@Retention(value = RetentionPolicy.SOURCE)\n" + "public @interface MyAnnotation2 {}", "annotated/MyAnnotation3.java", "package annotated;\n" + "import java.lang.annotation.Retention;\n" + "import java.lang.annotation.RetentionPolicy;\n" + "@Retention(value = RetentionPolicy.CLASS)\n" + "public @interface MyAnnotation3 {}", "test342757/X.java", "package test342757;\n" + "public class X {\n" + "	class B {\n" + "		public B(@Deprecated @Annot String s) {}\n" + "		public void foo(@Deprecated @Annot int j) {}\n" + "	}\n" + "}", "test342757/Annot.java", "package test342757;\n" + "import java.lang.annotation.Retention;\n" + "import static java.lang.annotation.RetentionPolicy.*;\n" + "@Retention(CLASS)\n" + "@interface Annot {}" };
    addLibrary(javaProject, "lib.jar", "libsrc.zip", pathAndContents, JavaCore.VERSION_1_5);
    this.jarRoot = javaProject.getPackageFragmentRoot(getFile("/P/lib.jar"));
}
Example 6
Project: eclipse.jdt.ui-master  File: QuickFixTest18.java View source code
// bug 420116 : test for user defined annotation in varargs
public void testUnimplementedMethods5() throws Exception {
    IPackageFragment pack2 = fSourceFolder.createPackageFragment("test2", false, null);
    StringBuffer buf = new StringBuffer();
    buf.append("package test2;\n");
    buf.append("public interface List {\n");
    buf.append("}\n");
    pack2.createCompilationUnit("List.java", buf.toString(), false, null);
    buf.append("package test2;\n");
    buf.append("import java.lang.annotation.ElementType;\n");
    buf.append("import java.lang.annotation.Target;\n");
    buf.append("\n");
    buf.append("@Target({ ElementType.TYPE_USE }) @interface N1 { }\n");
    buf.append("@Target({ ElementType.TYPE_USE }) @interface N2 { }\n");
    buf.append("@Target({ ElementType.TYPE_USE }) @interface N3 { }\n");
    buf.append("}\n");
    buf.append("\n");
    buf.append("public interface Inter {\n");
    buf.append("    int foo2U(@N1 String @N2 [] s1 @N3 [], @N1 String @N2 [] @N3 [] @N4 ... s2);\n");
    buf.append("}\n");
    pack2.createCompilationUnit("Inter.java", buf.toString(), false, null);
    IPackageFragment pack1 = fSourceFolder.createPackageFragment("test1", false, null);
    buf = new StringBuffer();
    buf.append("package test1;\n");
    buf.append("import test2.Inter;\n");
    buf.append("public class E implements Inter{\n");
    buf.append("}\n");
    ICompilationUnit cu = pack1.createCompilationUnit("E.java", buf.toString(), false, null);
    CompilationUnit astRoot = getASTRoot(cu);
    ArrayList<IJavaCompletionProposal> proposals = collectCorrections(cu, astRoot, 1);
    assertNumberOfProposals(proposals, 2);
    assertCorrectLabels(proposals);
    CUCorrectionProposal proposal = (CUCorrectionProposal) proposals.get(1);
    String preview1 = getPreviewContent(proposal);
    buf = new StringBuffer();
    buf.append("package test1;\n");
    buf.append("import test2.Inter;\n");
    buf.append("public abstract class E implements Inter{\n");
    buf.append("}\n");
    String expected1 = buf.toString();
    proposal = (CUCorrectionProposal) proposals.get(0);
    String preview2 = getPreviewContent(proposal);
    buf = new StringBuffer();
    buf.append("package test1;\n");
    buf.append("import test2.Inter;\n");
    buf.append("import test2.N1;\n");
    buf.append("import test2.N2;\n");
    buf.append("import test2.N3;\n");
    buf.append("import test2.N4;\n");
    buf.append("public class E implements Inter{\n");
    buf.append("\n");
    buf.append("    @Override\n");
    buf.append("    public int foo2U(@N1 String @N3 [] @N2 [] s1,\n");
    buf.append("            @N1 String @N2 [] @N3 [] @N4... s2) {\n");
    buf.append("        return 0;\n");
    buf.append("    }\n");
    buf.append("}\n");
    String expected2 = buf.toString();
    assertEqualStringsIgnoreOrder(new String[] { preview1, preview2 }, new String[] { expected1, expected2 });
}
Example 7
Project: jadx-master  File: TestAnnotations2.java View source code
@Test
public void test() {
    ClassNode cls = getClassNode(TestCls.class);
    String code = cls.getCode().toString();
    assertThat(code, containsString("@Target({ElementType.TYPE})"));
    assertThat(code, containsString("@Retention(RetentionPolicy.RUNTIME)"));
    assertThat(code, containsString("public @interface A {"));
    assertThat(code, containsString("float f();"));
    assertThat(code, containsString("int i();"));
}
Example 8
Project: che-plugins-master  File: SourceFromBytecodeGeneratorTest.java View source code
@Test
public void testAnnotationsOnAnnotation() throws Exception {
    IType interfaceType = project.findType("com.google.gwt.core.client.SingleJsoImpl");
    String source = new SourcesFromBytecodeGenerator().generateSource(interfaceType);
    assertThat(source).contains("@java.lang.annotation.Retention(value=java.lang.annotation.RetentionPolicy.RUNTIME)\n").contains("@java.lang.annotation.Target(value=java.lang.annotation.ElementType.TYPE)\n");
}
Example 9
Project: eql-master  File: EqlConverts.java View source code
public static <T extends Annotation> void searchEqlConvertAnns(Annotation[] annotations, List<EqlConvertAnn<T>> ecas, Class<T> annClass) {
    for (val annotation : annotations) {
        if (annotation instanceof Retention)
            continue;
        if (annotation instanceof Target)
            continue;
        if (annotation instanceof Documented)
            continue;
        val type = annotation.annotationType();
        T convert = type.getAnnotation(annClass);
        if (convert != null)
            ecas.add(new EqlConvertAnn<T>(convert, annotation));
        val annotations1 = type.getAnnotations();
        searchEqlConvertAnns(annotations1, ecas, annClass);
    }
}
Example 10
Project: error-prone-master  File: ImmutableCheckerTest.java View source code
@Test
public void protosNotOnClasspath() {
    compilationHelper.addSourceLines("com/google/errorprone/annotations/Immutable.java", "package com.google.errorprone.annotations;", "import static java.lang.annotation.ElementType.TYPE;", "import static java.lang.annotation.RetentionPolicy.RUNTIME;", "import java.lang.annotation.Retention;", "import java.lang.annotation.Target;", "@Target(TYPE)", "@Retention(RUNTIME)", "public @interface Immutable {", "  String[] containerOf() default {};", "}").addSourceLines("Foo.java", "class Foo {}").addSourceLines("Test.java", "import com.google.errorprone.annotations.Immutable;", "@Immutable class Test {", "  // BUG: Diagnostic contains: 'Foo' is not annotated @Immutable", "  final Foo f = null;", "}").setArgs(Arrays.asList("-cp", "NOSUCH")).doTest();
}
Example 11
Project: jaxb-master  File: AnnotationUseTest.java View source code
@Test
public void main() throws Exception {
    JCodeModel cm = new JCodeModel();
    JDefinedClass cls = cm._class("Test");
    // JMethod m =
    cls.method(JMod.PUBLIC, cm.VOID, "foo");
    // Annotating a class
    // Using the existing Annotations from java.lang.annotation package
    JAnnotationUse use = cls.annotate(cm.ref(Retention.class));
    use = tstremoveAnnotation(cm, cls, use);
    // declaring an enum class and an enumconstant as a membervaluepair
    JDefinedClass enumcls = cls._enum("Iamenum");
    JEnumConstant ec = enumcls.enumConstant("GOOD");
    JEnumConstant ec1 = enumcls.enumConstant("BAD");
    JEnumConstant ec2 = enumcls.enumConstant("BAD");
    ec1.equals(ec2);
    use.param("value", ec);
    // adding another param as an enum
    use.param("value1", RetentionPolicy.RUNTIME);
    // Adding annotation for fields
    // will generate like
    // @String(name = "book") private double y;
    //
    JFieldVar field = cls.field(JMod.PRIVATE, cm.DOUBLE, "y");
    // Adding more annotations which are member value pairs
    JAnnotationUse ause = field.annotate(Retention.class);
    ause.param("name", "book");
    ause.param("targetNamespace", 5);
    // Adding arrays as member value pairs
    JAnnotationArrayMember arrayMember = ause.paramArray("names");
    arrayMember.param("Bob");
    arrayMember.param("Rob");
    arrayMember.param("Ted");
    JAnnotationArrayMember arrayMember1 = ause.paramArray("namesno");
    arrayMember1.param(4);
    arrayMember1.param(5);
    arrayMember1.param(6);
    JAnnotationArrayMember arrayMember2 = ause.paramArray("values");
    // adding an annotation as a member value pair
    arrayMember2.annotate(Target.class).param("type", Integer.class);
    arrayMember2.annotate(Target.class).param("type", Float.class);
    // test typed annotation writer
    XmlElementW w = cls.annotate2(XmlElementW.class);
    w.ns("##default").value("foobar");
    // adding an annotation as a member value pair
    JAnnotationUse myuse = ause.annotationParam("foo", Target.class);
    myuse.param("junk", 7);
    cm.build(new SingleStreamCodeWriter(System.out));
}
Example 12
Project: openjdk-master  File: Utils.java View source code
/**
     * Returns true if the {@code annotationDoc} is to be treated
     * as a declaration annotation, when targeting the
     * {@code elemType} element type.
     *
     * @param annotationDoc the annotationDoc to check
     * @param elemType  the targeted elemType
     * @return true if annotationDoc is a declaration annotation
     */
public boolean isDeclarationAnnotation(AnnotationTypeDoc annotationDoc, boolean isJava5DeclarationLocation) {
    if (!isJava5DeclarationLocation)
        return false;
    AnnotationDesc[] annotationDescList = annotationDoc.annotations();
    // Annotations with no target are treated as declaration as well
    if (annotationDescList.length == 0)
        return true;
    for (AnnotationDesc anno : annotationDescList) {
        if (anno.annotationType().qualifiedName().equals(Target.class.getName())) {
            if (isDeclarationTarget(anno))
                return true;
        }
    }
    return false;
}
Example 13
Project: hibernate-validator-master  File: TargetCheck.java View source code
@Override
public Set<ConstraintCheckIssue> checkAnnotationType(TypeElement element, AnnotationMirror annotation) {
    Target target = element.getAnnotation(Target.class);
    //no target given allows the annotation to be declared at any type
    if (target == null) {
        return Collections.emptySet();
    }
    if (!containsAtLeastOneSupportedElementType(target)) {
        return CollectionHelper.asSet(ConstraintCheckIssue.error(element, annotationApiHelper.getMirror(element.getAnnotationMirrors(), Target.class), "CONSTRAINT_TYPE_WITH_WRONG_TARGET"));
    }
    return Collections.emptySet();
}
Example 14
Project: jsr308-langtools-master  File: JavacProcessingEnvironment.java View source code
private Set<String> initPlatformAnnotations() {
    Set<String> platformAnnotations = new HashSet<String>();
    platformAnnotations.add("java.lang.Deprecated");
    platformAnnotations.add("java.lang.Override");
    platformAnnotations.add("java.lang.SuppressWarnings");
    platformAnnotations.add("java.lang.annotation.Documented");
    platformAnnotations.add("java.lang.annotation.Inherited");
    platformAnnotations.add("java.lang.annotation.Retention");
    platformAnnotations.add("java.lang.annotation.Target");
    return Collections.unmodifiableSet(platformAnnotations);
}
Example 15
Project: mqnaas-master  File: ReflectionUtilsTests.java View source code
@Test
public void testGetAnnotationFieldsWithSimpelClass() {
    List<Field> fields = ReflectionUtils.getAnnotationFields(SimpleClass.class, TestAnnotation.class);
    Assert.assertEquals("SimpleClass does not contain any field annotated with TestAnnotation", 0, fields.size());
    fields = ReflectionUtils.getAnnotationFields(SimpleClassWithAnnotation.class, TestAnnotation.class);
    Assert.assertEquals("SimpleClassWithAnnotation contains a field annotated with TestAnnotation", 1, fields.size());
    fields = ReflectionUtils.getAnnotationFields(SubClass.class, TestAnnotation.class);
    Assert.assertEquals("SubClass contains a superclass field annotated with TestAnnotation", 1, fields.size());
    fields = ReflectionUtils.getAnnotationFields(SubSubClass.class, TestAnnotation.class);
    Assert.assertEquals("SubClass contains a field and a superclass field annotated with TestAnnotation", 2, fields.size());
    fields = ReflectionUtils.getAnnotationFields(SubSubClass.class, Target.class);
    Assert.assertEquals("SubClass contains no fields annotated with Target", 0, fields.size());
}
Example 16
Project: OpenJML-master  File: JavacProcessingEnvironment.java View source code
private Set<String> initPlatformAnnotations() {
    Set<String> platformAnnotations = new HashSet<String>();
    platformAnnotations.add("java.lang.Deprecated");
    platformAnnotations.add("java.lang.Override");
    platformAnnotations.add("java.lang.SuppressWarnings");
    platformAnnotations.add("java.lang.annotation.Documented");
    platformAnnotations.add("java.lang.annotation.Inherited");
    platformAnnotations.add("java.lang.annotation.Retention");
    platformAnnotations.add("java.lang.annotation.Target");
    return Collections.unmodifiableSet(platformAnnotations);
}
Example 17
Project: che-master  File: SourceFromBytecodeGeneratorTest.java View source code
@Test
public void testAnnotationsOnAnnotation() throws Exception {
    IType interfaceType = project.findType("com.google.gwt.core.client.SingleJsoImpl");
    String source = new SourcesFromBytecodeGenerator().generateSource(interfaceType);
    assertThat(source).contains("@java.lang.annotation.Retention(value=java.lang.annotation.RetentionPolicy.RUNTIME)\n").contains("@java.lang.annotation.Target(value=java.lang.annotation.ElementType.TYPE)\n");
}
Example 18
Project: DevTools-master  File: SourceFromBytecodeGeneratorTest.java View source code
@Test
public void testAnnotationsOnAnnotation() throws Exception {
    IType interfaceType = project.findType("com.google.gwt.core.client.SingleJsoImpl");
    String source = new SourcesFromBytecodeGenerator().generateSource(interfaceType);
    assertThat(source).contains("@java.lang.annotation.Retention(value=java.lang.annotation.RetentionPolicy.RUNTIME)\n").contains("@java.lang.annotation.Target(value=java.lang.annotation.ElementType.TYPE)\n");
}
Example 19
Project: eclipse3-master  File: EngineAnnotationProcessorTest.java View source code
private void declareDartName() throws Exception {
    setFileLines("test/DartName.java", toString("// filler filler filler filler filler filler filler filler filler filler", "package test;", "import java.lang.annotation.*;", "@Target({ElementType.TYPE, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD})", "public @interface DartOmit {", "  String value();", "}"));
}
Example 20
Project: ceylon-model-master  File: AnnotationTarget.java View source code
/**
     * Returns the elements in the {@code @Target} annotation of the given 
     * {@code @interface}, or null if 
     * the annotation type lacks the {@code @Target} annotation.
     */
public static EnumSet<AnnotationTarget> getAnnotationTarget(LazyInterface annotationType) {
    AnnotationMirror targetAnno = annotationType.classMirror.getAnnotation("java.lang.annotation.Target");
    if (targetAnno != null) {
        @SuppressWarnings("unchecked") List<String> targets = (List<String>) targetAnno.getValue();
        EnumSet<AnnotationTarget> result = EnumSet.noneOf(AnnotationTarget.class);
        for (String name : targets) {
            result.add(AnnotationTarget.valueOf(name));
        }
        return result;
    }
    return null;
}
Example 21
Project: core-master  File: StereotypeModel.java View source code
@Override
protected void check(EnhancedAnnotation<T> annotatedAnnotation) {
    super.check(annotatedAnnotation);
    if (isValid()) {
        if (!annotatedAnnotation.isAnnotationPresent(Target.class)) {
            ReflectionLogger.LOG.missingTarget(annotatedAnnotation);
        } else {
            ElementType[] elementTypes = annotatedAnnotation.getAnnotation(Target.class).value();
            if (!(Arrays2.unorderedEquals(elementTypes, METHOD, FIELD, TYPE) || Arrays2.unorderedEquals(elementTypes, TYPE) || Arrays2.unorderedEquals(elementTypes, METHOD) || Arrays2.unorderedEquals(elementTypes, FIELD) || Arrays2.unorderedEquals(elementTypes, METHOD, TYPE))) {
                ReflectionLogger.LOG.missingTargetMethodFieldTypeParameterOrTargetMethodTypeOrTargetMethodOrTargetTypeOrTargetField(annotatedAnnotation);
            }
        }
    }
}
Example 22
Project: gosu-lang-master  File: UsageModifier.java View source code
private static UsageModifier translateJavaElementTypeToUsageModifier(UsageTarget targetType, IType annotationType) {
    Target targetAnnotation = ((IJavaType) annotationType).getClassInfo().getAnnotation(Target.class);
    if (targetAnnotation == null || targetAnnotation.value().length == 0) {
        // If there are no targets, it can be used everywhere
        return UsageModifier.One;
    } else {
        // otherwise, look for a target that matches our own UsageTarget
        for (ElementType elementType : targetAnnotation.value()) {
            UsageTarget usageTarget = null;
            if (elementType == ElementType.CONSTRUCTOR && targetType == UsageTarget.ConstructorTarget || elementType == ElementType.FIELD && targetType == UsageTarget.PropertyTarget || elementType == ElementType.ANNOTATION_TYPE && targetType == UsageTarget.TypeTarget || elementType == ElementType.TYPE && targetType == UsageTarget.TypeTarget || elementType == ElementType.METHOD && targetType == UsageTarget.MethodTarget) {
                return UsageModifier.One;
            }
        }
        return UsageModifier.None;
    }
}
Example 23
Project: groovy-eclipse-master  File: TransformationsTests.java View source code
@Test
public void testJDTClassNode_1731() {
    assumeTrue(isAtLeastGroovy(21));
    // Testcode based on article: http://www.infoq.com/articles/groovy-1.5-new
    // The groups of tests are loosely based on the article contents - but what is really exercised here is the accessibility of
    // the described constructs across the Java/Groovy divide.
    String[] sources = { "c/Main.java", "package c;\n" + "import java.lang.reflect.Method;\n" + "import a.SampleAnnotation;\n" + "import b.Sample;\n" + "public class Main {\n" + "    public static void main(String[] args) throws Exception {" + "        Method method = Sample.class.getMethod(\"doSomething\");\n" + "        SampleAnnotation annotation = method.getAnnotation(SampleAnnotation.class);\n" + "        System.out.print(annotation);\n" + "    }\n" + "}\n", "a/SampleAnnotation.java", "package a;\n" + "import java.lang.annotation.ElementType;\n" + "import java.lang.annotation.Retention;\n" + "import java.lang.annotation.RetentionPolicy;\n" + "import java.lang.annotation.Target;\n" + "@Retention(RetentionPolicy.RUNTIME)\n" + "@Target({ElementType.METHOD})\n" + "public @interface SampleAnnotation {}\n", "a/DelegateInOtherProject.java", "package a;\n" + "public class DelegateInOtherProject {\n" + "    @SampleAnnotation\n" + "    public void doSomething() {}\n" + "}\n", "b/Sample.groovy", "package b\n" + "import groovy.transform.CompileStatic\n" + "import a.DelegateInOtherProject;\n" + "@CompileStatic\n" + "class Sample {\n" + "    @Delegate(methodAnnotations = true)\n" + "    DelegateInOtherProject delegate\n" + "}\n", "b/Delegated.groovy", "package b\n" + "import groovy.transform.CompileStatic\n" + "import a.SampleAnnotation;\n" + "@CompileStatic\n" + "class Delegated {\n" + "    @SampleAnnotation\n" + "    def something() {}\n" + "}\n" };
    runConformTest(sources, "@a.SampleAnnotation()");
}
Example 24
Project: richfaces-cdk-master  File: JavaSourceProcessor.java View source code
protected void processAnnotation(CdkAnnotationProcessor processor, RoundEnvironment environment) {
    Class<? extends Annotation> processedAnnotation = processor.getProcessedAnnotation();
    log.debug("Process all elements annotated with " + processedAnnotation.getName());
    Target target = processedAnnotation.getAnnotation(Target.class);
    Set<? extends Element> rootElements = environment.getRootElements();
    for (Element element : rootElements) {
        if (!sourceCache.isChanged(element)) {
            continue;
        }
        if (isAppropriateTarget(element, target)) {
            processElement(processor, processedAnnotation, element);
        } else {
            for (Element enclosedElement : element.getEnclosedElements()) {
                if (!sourceCache.isChanged(enclosedElement)) {
                    continue;
                }
                if (isAppropriateTarget(enclosedElement, target)) {
                    processElement(processor, processedAnnotation, enclosedElement);
                }
            }
        }
    }
}
Example 25
Project: smooth-build-master  File: JunitTest.java View source code
private static String testAnnotationSourceCode() {
    return "package org.junit;\n" + "import java.lang.annotation.ElementType;\n" + "import java.lang.annotation.Retention;\n" + "import java.lang.annotation.RetentionPolicy;\n" + "import java.lang.annotation.Target;\n" + "\n" + "@Retention(RetentionPolicy.RUNTIME)\n" + "@Target({ ElementType.METHOD })\n" + "public @interface Test {\n" + "  static class None extends Throwable {\n" + "    private static final long serialVersionUID = 1L;\n" + "    private None() {\n" + "    }\n" + "  }\n" + "  Class<? extends Throwable> expected() default None.class;\n" + "  long timeout() default 0L;\n" + "}\n";
}
Example 26
Project: auto-value-redacted-master  File: AutoValueRedactedExtensionTest.java View source code
@Before
public void setUp() {
    redacted = JavaFileObjects.forSourceString("test.Redacted", "" + "package test;\n" + "import java.lang.annotation.Retention;\n" + "import java.lang.annotation.Target;\n" + "import static java.lang.annotation.ElementType.FIELD;\n" + "import static java.lang.annotation.ElementType.METHOD;\n" + "import static java.lang.annotation.ElementType.PARAMETER;\n" + "import static java.lang.annotation.RetentionPolicy.SOURCE;\n" + "@Retention(SOURCE)\n" + "@Target({METHOD, PARAMETER, FIELD})\n" + "public @interface Redacted {\n" + "}");
    nullable = JavaFileObjects.forSourceString("test.Nullable", "" + "package test;\n" + "import java.lang.annotation.Retention;\n" + "import java.lang.annotation.Target;\n" + "import static java.lang.annotation.ElementType.FIELD;\n" + "import static java.lang.annotation.ElementType.METHOD;\n" + "import static java.lang.annotation.ElementType.PARAMETER;\n" + "import static java.lang.annotation.RetentionPolicy.CLASS;\n" + "@Retention(CLASS)\n" + "@Target({METHOD, PARAMETER, FIELD})\n" + "public @interface Nullable {\n" + "}");
}
Example 27
Project: buck-master  File: InterfaceTypeAndConstantReferenceFinderTest.java View source code
@Test
public void testFindsAnnotationTypeReferencesOnTypeParameters() throws IOException {
    findTypeReferences("import java.lang.annotation.*;", "class Foo<@Anno T> { }", "@Target(ElementType.TYPE_PARAMETER)", "@interface Anno { }");
    assertThat(typeReferences, Matchers.containsInAnyOrder(createSymbolicReference("Anno", 2, 12), createSymbolicReference("java.lang.annotation.Target", 3, 2), createSymbolicReference("java.lang.annotation.ElementType", 3, 9)));
}
Example 28
Project: jcodemodel-master  File: AnnotationUseFuncTest.java View source code
/**
   * *********************************************************************
   * Generates this
   * **********************************************************************
   *
   * <pre>
   * import java.lang.annotation.Retention;
   * import java.lang.annotation.RetentionPolicy;
   * import java.lang.annotation.Target;
   * import com.helger.jcodemodel.tests.AnnotationUseTest;
   *
   * @Retention (value = Test.Iamenum.GOOD, value1 = RetentionPolicy.RUNTIME)
   * @AnnotationUseTest.XmlElement (ns = "##default", value = "foobar")
   * public class Test
   * {
   *   @Retention (name = "book",
   *               targetNamespace = 5,
   *               names = { "Bob", "Rob", "Ted" },
   *               namesno = { 4, 5, 6 },
   *               values = { @Target (type = java.lang.Integer.class), @Target (type = java.lang.Float.class) },
   *               foo = @Target (junk = 7))
   *   private double y;
   *
   *   public void foo ()
   *   {}
   *
   *   public enum Iamenum
   *   {
   *     GOOD,
   *     BAD;
   *   }
   * }
   * </pre>
   */
@Test
public void testMain() throws Exception {
    final JCodeModel cm = new JCodeModel();
    final JDefinedClass cls = cm._class("Test");
    // JMethod m =
    cls.method(JMod.PUBLIC, cm.VOID, "foo");
    // Annotating a class
    // Using the existing Annotations from java.lang.annotation package
    final JAnnotationUse use = cls.annotate(cm.ref(Retention.class));
    // declaring an enum class and an enumconstant as a membervaluepair
    final JDefinedClass enumcls = cls._enum("Iamenum");
    final JEnumConstant ec = enumcls.enumConstant("GOOD");
    final JEnumConstant ec1 = enumcls.enumConstant("BAD");
    final JEnumConstant ec2 = enumcls.enumConstant("BAD");
    assertEquals(ec1, ec2);
    use.param("value", ec);
    // adding another param as an enum
    use.param("value1", RetentionPolicy.RUNTIME);
    // Adding annotation for fields
    // will generate like
    // @String(name = "book") private double y;
    //
    final JFieldVar field = cls.field(JMod.PRIVATE, cm.DOUBLE, "y");
    // Adding more annotations which are member value pairs
    final JAnnotationUse aUse = field.annotate(Retention.class);
    aUse.param("name", "book");
    aUse.param("targetNamespace", 5);
    // Adding arrays as member value pairs
    final JAnnotationArrayMember arrayMember = aUse.paramArray("names");
    arrayMember.param("Bob");
    arrayMember.param("Rob");
    arrayMember.param("Ted");
    // Shortcut
    // Ambiguous on OpenJDK6 - explicit array needed
    aUse.paramArray("namesno", new int[] { 4, 5, 6 });
    final JAnnotationArrayMember arrayMember2 = aUse.paramArray("values");
    // adding an annotation as a member value pair
    arrayMember2.annotate(Target.class).param("type", Integer.class);
    arrayMember2.annotate(Target.class).param("type", Float.class);
    // test typed annotation writer
    final XmlElementW w = cls.annotate2(XmlElementW.class);
    w.ns("##default").value("foobar");
    // adding an annotation as a member value pair
    final JAnnotationUse myuse = aUse.annotationParam("foo", Target.class);
    myuse.param("junk", 7);
    CodeModelTestsHelper.parseCodeModel(cm);
}
Example 29
Project: platform_build-master  File: InterfaceTypeAndConstantReferenceFinderTest.java View source code
@Test
public void testFindsAnnotationTypeReferencesOnTypeParameters() throws IOException {
    findTypeReferences("import java.lang.annotation.*;", "class Foo<@Anno T> { }", "@Target(ElementType.TYPE_PARAMETER)", "@interface Anno { }");
    assertThat(typeReferences, Matchers.containsInAnyOrder(createSymbolicReference("Anno", 2, 12), createSymbolicReference("java.lang.annotation.Target", 3, 2), createSymbolicReference("java.lang.annotation.ElementType", 3, 9)));
}
Example 30
Project: anno4j-master  File: RDFProperty.java View source code
private void annotationHeader(JavaMessageBuilder builder) throws ObjectStoreConfigException {
    String pkg = builder.getPackageName(this.getURI());
    String simple = builder.getSimpleName(this.getURI());
    if (pkg == null) {
        builder.imports(simple);
    } else {
        builder.pkg(pkg);
        builder.imports(pkg + '.' + simple);
    }
    builder.comment(this);
    if (this.isA(OWL.DEPRECATEDPROPERTY)) {
        builder.annotate(Deprecated.class);
    }
    builder.annotateEnum(Retention.class, "value", RetentionPolicy.class, "RUNTIME");
    builder.annotateEnums(Target.class, "value", ElementType.class, "TYPE", "METHOD", "PARAMETER", "ANNOTATION_TYPE", "PACKAGE");
    builder.annotationName(simple);
    builder.annotationProperties(this);
    builder.annotateURI(Iri.class, "value", builder.getType(this.getURI()));
    if (this.isA(OWL.FUNCTIONALPROPERTY)) {
        builder.method("value", true).returnType(builder.imports(String.class)).end();
    } else {
        builder.method("value", true).returnType(builder.imports(String.class) + "[]").end();
    }
}
Example 31
Project: forge-beanstest-master  File: MockitoFacet.java View source code
private void createStereotype(String beanstestPackage, String stereotype) throws FileNotFoundException {
    //        @Stereotype
    //        @Alternative
    //        @Target(ElementType.METHOD)
    //        @Retention(RetentionPolicy.RUNTIME)
    //        public @interface BeanstestAlternative {
    //        }
    //TODO how do i create a nested annotation with Forge ?
    JavaResource stereotypeResource = getStereotype(stereotype);
    if (!stereotypeResource.exists()) {
        JavaAnnotation javaAnnotation = JavaParser.create(JavaAnnotation.class);
        javaAnnotation.setName(stereotype);
        javaAnnotation.setPackage(beanstestPackage);
        javaAnnotation.addAnnotation(Stereotype.class);
        javaAnnotation.addAnnotation(Alternative.class);
        javaAnnotation.addAnnotation(Target.class).setEnumValue(ElementType.METHOD);
        javaAnnotation.addAnnotation(Retention.class).setEnumValue(RetentionPolicy.RUNTIME);
        stereotypeResource.setContents(javaAnnotation);
        BeansDescriptor beansDescriptor = project.getFacet(CDITestFacet.class).getConfig();
        if (!beansDescriptor.getAlternativeStereotypes().contains(javaAnnotation.getCanonicalName())) {
            beansDescriptor.alternativeStereotype(javaAnnotation.getCanonicalName());
            project.getFacet(CDITestFacet.class).saveConfig(beansDescriptor);
        }
    }
}
Example 32
Project: old-gosu-repo-master  File: UsageModifier.java View source code
private static UsageModifier translateJavaElementTypeToUsageModifier(UsageTarget targetType, IType annotationType) {
    IAnnotationInfo targetAnnotation = ((IJavaType) annotationType).getBackingClassInfo().getAnnotation(Target.class);
    if (targetAnnotation == null) {
        // If there are no targets, it can be used everywhere
        return UsageModifier.One;
    } else {
        Object v = targetAnnotation.getFieldValue("value");
        String[] value;
        if (v == null) {
            value = null;
        } else if (v.getClass().isArray()) {
            value = (String[]) v;
        } else {
            value = new String[] { (String) v };
        }
        if (value == null || value.length == 0) {
            // If there are no targets, it can be used everywhere
            return UsageModifier.One;
        }
        // otherwise, look for a target that matches our own UsageTarget
        for (String elementTypeConst : value) {
            if (elementTypeConst.equals(ElementType.CONSTRUCTOR.name()) && targetType == UsageTarget.ConstructorTarget || elementTypeConst.equals(ElementType.FIELD.name()) && targetType == UsageTarget.PropertyTarget || elementTypeConst.equals(ElementType.ANNOTATION_TYPE.name()) && targetType == UsageTarget.TypeTarget || elementTypeConst.equals(ElementType.TYPE.name()) && targetType == UsageTarget.TypeTarget || elementTypeConst.equals(ElementType.METHOD.name()) && (targetType == UsageTarget.MethodTarget || targetType == UsageTarget.PropertyTarget) || elementTypeConst.equals(ElementType.PARAMETER.name()) && targetType == UsageTarget.ParameterTarget) {
                return UsageModifier.One;
            }
        }
        return UsageModifier.None;
    }
}
Example 33
Project: xapi-master  File: ClasspathResourceMap.java View source code
protected void maybeAccept(final String name, final ByteCodeResource bytecode, final ClassFile classFile, final Class<? extends Annotation> annoClass) {
    final xapi.bytecode.annotation.Annotation anno = classFile.getAnnotation(annoClass.getName());
    if (anno != null) {
        this.bytecode.put(name, bytecode);
        return;
    }
    // check the target retention of these annotations, and scan methods or fields
    try {
        final Target target = annoClass.getAnnotation(Target.class);
        ElementType[] targets;
        if (target == null) {
            targets = getDefaultAnnotationTargets();
        } else {
            targets = target.value();
        }
        for (final ElementType type : targets) {
            switch(type) {
                case METHOD:
                    for (final MethodInfo method : classFile.getMethods()) {
                        if (accepts(method, annoClass)) {
                            this.bytecode.put(name, bytecode);
                            return;
                        }
                    }
                    break;
                case FIELD:
                    for (final FieldInfo field : classFile.getFields()) {
                        if (accepts(field, annoClass)) {
                            this.bytecode.put(name, bytecode);
                            return;
                        }
                    }
                    break;
                case CONSTRUCTOR:
                    for (final MethodInfo method : classFile.getMethods()) {
                        if (method.getName().contains("<init>") && accepts(method, annoClass)) {
                            this.bytecode.put(name, bytecode);
                            return;
                        }
                    }
                    break;
                default:
                    break;
            }
        }
    } catch (final Throwable e) {
        throw X_Debug.rethrow(e);
    }
}
Example 34
Project: auto-master  File: AutoValueJava8Test.java View source code
// This is appalling. Some versions of javac do not correctly report annotations on type uses in
// certain cases, for example on type variables or arrays. Since some of the tests here are for
// exactly that, we compile a test program with a test annotation processor to see whether we
// might be in the presence of such a javac, and if so we skip the tests that would fail because
// of the bug. This isn't completely sound because we can't be entirely sure that the javac that
// Compiler.javac() finds is the same as the javac that was used to build this test (and therefore
// run AutoValueProcessor), but it's better than just ignoring the tests outright.
@BeforeClass
public static void setUpClass() {
    JavaFileObject javaFileObject = JavaFileObjects.forSourceLines("Test", "import java.lang.annotation.ElementType;", "import java.lang.annotation.Retention;", "import java.lang.annotation.RetentionPolicy;", "import java.lang.annotation.Target;", "public abstract class Test<T> {", "  @Retention(RetentionPolicy.RUNTIME)", "  @Target(ElementType.TYPE_USE)", "  public @interface Nullable {}", "", "  public abstract @Nullable T t();", "}");
    Compilation compilation = Compiler.javac().withProcessors(new BugTestProcessor()).compile(javaFileObject);
    if (compilation.errors().isEmpty()) {
        javacHandlesTypeAnnotationsCorrectly = true;
    } else {
        assertThat(compilation).hadErrorCount(1);
        assertThat(compilation).hadErrorContaining(JAVAC_HAS_BUG_ERROR);
    }
}
Example 35
Project: generators-master  File: AutoValueJava8Test.java View source code
// This is appalling. Some versions of javac do not correctly report annotations on type uses in
// certain cases, for example on type variables or arrays. Since some of the tests here are for
// exactly that, we compile a test program with a test annotation processor to see whether we
// might be in the presence of such a javac, and if so we skip the tests that would fail because
// of the bug. This isn't completely sound because we can't be entirely sure that the javac that
// Compiler.javac() finds is the same as the javac that was used to build this test (and therefore
// run AutoValueProcessor), but it's better than just ignoring the tests outright.
@BeforeClass
public static void setUpClass() {
    JavaFileObject javaFileObject = JavaFileObjects.forSourceLines("Test", "import java.lang.annotation.ElementType;", "import java.lang.annotation.Retention;", "import java.lang.annotation.RetentionPolicy;", "import java.lang.annotation.Target;", "public abstract class Test<T> {", "  @Retention(RetentionPolicy.RUNTIME)", "  @Target(ElementType.TYPE_USE)", "  public @interface Nullable {}", "", "  public abstract @Nullable T t();", "}");
    Compilation compilation = Compiler.javac().withProcessors(new BugTestProcessor()).compile(javaFileObject);
    if (compilation.errors().isEmpty()) {
        javacHandlesTypeAnnotationsCorrectly = true;
    } else {
        assertThat(compilation).hadErrorCount(1);
        assertThat(compilation).hadErrorContaining(JAVAC_HAS_BUG_ERROR);
    }
}
Example 36
Project: groovy-core-master  File: ExtendedVerifier.java View source code
protected void visitAnnotations(AnnotatedNode node, int target) {
    if (node.getAnnotations().isEmpty()) {
        return;
    }
    this.currentClass.setAnnotated(true);
    if (!isAnnotationCompatible()) {
        addError("Annotations are not supported in the current runtime. " + JVM_ERROR_MESSAGE, node);
        return;
    }
    for (AnnotationNode unvisited : node.getAnnotations()) {
        AnnotationNode visited = visitAnnotation(unvisited);
        boolean isTargetAnnotation = visited.getClassNode().isResolved() && visited.getClassNode().getName().equals("java.lang.annotation.Target");
        // defining on which target elements the annotation applies
        if (!isTargetAnnotation && !visited.isTargetAllowed(target)) {
            addError("Annotation @" + visited.getClassNode().getName() + " is not allowed on element " + AnnotationNode.targetToName(target), visited);
        }
        visitDeprecation(node, visited);
        visitOverride(node, visited);
    }
}
Example 37
Project: groovy-master  File: ExtendedVerifier.java View source code
protected void visitAnnotations(AnnotatedNode node, int target) {
    if (node.getAnnotations().isEmpty()) {
        return;
    }
    this.currentClass.setAnnotated(true);
    if (!isAnnotationCompatible()) {
        addError("Annotations are not supported in the current runtime. " + JVM_ERROR_MESSAGE, node);
        return;
    }
    for (AnnotationNode unvisited : node.getAnnotations()) {
        AnnotationNode visited = visitAnnotation(unvisited);
        boolean isTargetAnnotation = visited.getClassNode().isResolved() && visited.getClassNode().getName().equals("java.lang.annotation.Target");
        // defining on which target elements the annotation applies
        if (!isTargetAnnotation && !visited.isTargetAllowed(target)) {
            addError("Annotation @" + visited.getClassNode().getName() + " is not allowed on element " + AnnotationNode.targetToName(target), visited);
        }
        visitDeprecation(node, visited);
        visitOverride(node, visited);
    }
}
Example 38
Project: apkinspector-master  File: Annotation.java View source code
// Declared in Annotations.jrag at line 41
// 9.6 Annotation Types
/* The Identifier in an annotation type declaration specifies the name of the
  annotation type. A compile-time error occurs if an annotation type has the same
  simple name as any of its enclosing classes or interfaces.
  Comment: This is common for all type declarations and need thus no specific
  implementation. */
// 9.6.1.1
/* If an annotation a on an annotation declaration corresponds to an
  annotation type T, and T has a (meta-)annotation m that corresponds to
  annotation.Target, then m must have either an element whose matches the 
  annotated declaration, or a compile-time error occurs.*/
public void checkModifiers() {
    super.checkModifiers();
    if (decl() instanceof AnnotationDecl) {
        AnnotationDecl T = (AnnotationDecl) decl();
        Annotation m = T.annotation(lookupType("java.lang.annotation", "Target"));
        if (m != null && m.getNumElementValuePair() == 1 && m.getElementValuePair(0).getName().equals("value")) {
            ElementValue v = m.getElementValuePair(0).getElementValue();
            //System.out.println("Annotation: \n" + dumpTree());
            if (!v.validTarget(this))
                error("annotation type " + T.typeName() + " is not applicable to this kind of declaration");
        }
    }
}
Example 39
Project: bugvm-master  File: Annotation.java View source code
// Declared in Annotations.jrag at line 41
// 9.6 Annotation Types
/* The Identifier in an annotation type declaration specifies the name of the
  annotation type. A compile-time error occurs if an annotation type has the same
  simple name as any of its enclosing classes or interfaces.
  Comment: This is common for all type declarations and need thus no specific
  implementation. */
// 9.6.1.1
/* If an annotation a on an annotation declaration corresponds to an
  annotation type T, and T has a (meta-)annotation m that corresponds to
  annotation.Target, then m must have either an element whose matches the 
  annotated declaration, or a compile-time error occurs.*/
public void checkModifiers() {
    super.checkModifiers();
    if (decl() instanceof AnnotationDecl) {
        AnnotationDecl T = (AnnotationDecl) decl();
        Annotation m = T.annotation(lookupType("java.lang.annotation", "Target"));
        if (m != null && m.getNumElementValuePair() == 1 && m.getElementValuePair(0).getName().equals("value")) {
            ElementValue v = m.getElementValuePair(0).getElementValue();
            //System.out.println("Annotation: \n" + dumpTree());
            if (!v.validTarget(this))
                error("annotation type " + T.typeName() + " is not applicable to this kind of declaration");
        }
    }
}
Example 40
Project: cdi-tck-master  File: InterceptorDefinitionTest.java View source code
@Test
@SpecAssertions({ @SpecAssertion(section = BINDING_INTERCEPTOR_TO_BEAN, id = "a") })
public void testInterceptorBindingAnnotation() {
    List<Interceptor<?>> interceptors = getLoggedInterceptors();
    assertTrue(interceptors.size() > 1);
    Interceptor<?> interceptorBean = interceptors.iterator().next();
    assertEquals(interceptorBean.getInterceptorBindings().size(), 1);
    assertTrue(interceptorBean.getInterceptorBindings().contains(LOGGED_LITERAL));
    Target target = (interceptorBean.getInterceptorBindings().iterator().next()).annotationType().getAnnotation(Target.class);
    List<ElementType> elements = Arrays.asList(target.value());
    assertTrue(elements.contains(ElementType.TYPE));
    assertTrue(elements.contains(ElementType.METHOD));
}
Example 41
Project: codegen-master  File: ScalaWriterTest.java View source code
@Test
public void Annotation_With_ArrayMethod() throws IOException {
    Target annotation = new Target() {

        @Override
        public ElementType[] value() {
            return new ElementType[] { ElementType.FIELD, ElementType.METHOD };
        }

        @Override
        public Class<? extends Annotation> annotationType() {
            return Target.class;
        }
    };
    writer.imports(Target.class.getPackage());
    writer.annotation(annotation);
    assertTrue(w.toString().contains("@Target(Array(FIELD, METHOD))"));
}
Example 42
Project: discobot-master  File: ExtendedVerifier.java View source code
protected void visitAnnotations(AnnotatedNode node, int target) {
    if (node.getAnnotations().isEmpty()) {
        return;
    }
    this.currentClass.setAnnotated(true);
    if (!isAnnotationCompatible()) {
        addError("Annotations are not supported in the current runtime. " + JVM_ERROR_MESSAGE, node);
        return;
    }
    for (AnnotationNode unvisited : node.getAnnotations()) {
        AnnotationNode visited = visitAnnotation(unvisited);
        boolean isTargetAnnotation = visited.getClassNode().isResolved() && visited.getClassNode().getTypeClass() == Target.class;
        // defining on which target elements the annotation applies
        if (!isTargetAnnotation && !visited.isTargetAllowed(target)) {
            addError("Annotation @" + visited.getClassNode().getName() + " is not allowed on element " + AnnotationNode.targetToName(target), visited);
        }
        visitDeprecation(node, visited);
    }
}
Example 43
Project: epoxy-master  File: BaseModelAttributeInfo.java View source code
/**
   * Keeps track of annotations on the attribute so that they can be used in the generated setter
   * and getter method. Setter and getter annotations are stored separately since the annotation may
   * not target both method and parameter types.
   */
private void buildAnnotationLists(List<? extends AnnotationMirror> annotationMirrors) {
    for (AnnotationMirror annotationMirror : annotationMirrors) {
        if (!annotationMirror.getElementValues().isEmpty()) {
            // Not supporting annotations with values for now
            continue;
        }
        ClassName annotationClass = ClassName.bestGuess(annotationMirror.getAnnotationType().toString());
        if (annotationClass.equals(ClassName.get(EpoxyAttribute.class))) {
            // Don't include our own annotation
            continue;
        }
        DeclaredType annotationType = annotationMirror.getAnnotationType();
        // A target may exist on an annotation type to specify where the annotation can
        // be used, for example fields, methods, or parameters.
        Target targetAnnotation = annotationType.asElement().getAnnotation(Target.class);
        // Allow all target types if no target was specified on the annotation
        List<ElementType> elementTypes = Arrays.asList(targetAnnotation == null ? ElementType.values() : targetAnnotation.value());
        AnnotationSpec annotationSpec = AnnotationSpec.builder(annotationClass).build();
        if (elementTypes.contains(ElementType.PARAMETER)) {
            setterAnnotations.add(annotationSpec);
        }
        if (elementTypes.contains(ElementType.METHOD)) {
            getterAnnotations.add(annotationSpec);
        }
    }
}
Example 44
Project: felix-master  File: Predicates.java View source code
/**
     * Restrict to the supported {@link ElementType}(s) of the annotation (use the @Target, if provided).
     * @param annotationType annotation to explore
     */
public static Predicate onlySupportedElements(final Class<? extends Annotation> annotationType) {
    Target target = annotationType.getAnnotation(Target.class);
    if (target == null) {
        return alwaysTrue();
    }
    Collection<Predicate> supportedTypes = new HashSet<Predicate>();
    for (ElementType type : target.value()) {
        supportedTypes.add(on(type));
    }
    return or(supportedTypes);
}
Example 45
Project: generator-master  File: SummarizerTest.java View source code
@Test
public void testAnnotationSummarizer() throws IOException {
    InputStream resource = getClass().getResourceAsStream("/org/mybatis/generator/eclipse/tests/harness/tests/resources/OuterAnnotation.src");
    CompilationUnitSummary cuSummary = getCompilationUnitSummaryFromResource(resource);
    assertThat(cuSummary, hasImportCount(4));
    assertThat(cuSummary, hasImport("import java.lang.annotation.ElementType"));
    assertThat(cuSummary, hasImport("import java.lang.annotation.Retention"));
    assertThat(cuSummary, hasImport("import java.lang.annotation.RetentionPolicy"));
    assertThat(cuSummary, hasImport("import java.lang.annotation.Target"));
    assertThat(cuSummary, hasAnnotationCount(2));
    assertThat(cuSummary, hasAnnotation("OuterAnnotation"));
    assertThat(cuSummary, hasAnnotation("SecondOuterAnnotation"));
    assertThat(cuSummary, hasClassCount(0));
    assertThat(cuSummary, hasEnumCount(0));
    assertThat(cuSummary, hasInterfaceCount(0));
    AnnotationSummary annotationSummary = cuSummary.getAnnotationSummary("OuterAnnotation");
    assertThat(annotationSummary, hasAnnotationMember("name"));
    assertThat(annotationSummary, hasAnnotationMemberCount(1));
    assertThat(annotationSummary, hasField("id", ofType("int")));
    assertThat(annotationSummary, hasField("id2", ofType("int")));
    assertThat(annotationSummary, hasField("name", ofType("int")));
    assertThat(annotationSummary, hasFieldCount(3));
    verifyInners(annotationSummary);
}
Example 46
Project: geowave-master  File: JavassistUtils.java View source code
/**
	 * This function will take the given annotations attribute and create a new
	 * attribute, cloning all the annotations and specified values within the
	 * attribute. The annotations attribute can then be set on a method, class,
	 * or field.
	 * 
	 * @param attr
	 * @return
	 */
public static AnnotationsAttribute cloneAnnotationsAttribute(ConstPool constPool, AnnotationsAttribute attr, ElementType validElementType) {
    // We can use system class loader here because the annotations for
    // Target
    // are part of the Java System.
    ClassLoader cl = ClassLoader.getSystemClassLoader();
    AnnotationsAttribute attrNew = new AnnotationsAttribute(constPool, AnnotationsAttribute.visibleTag);
    if (attr != null) {
        for (Annotation annotation : attr.getAnnotations()) {
            Annotation newAnnotation = new Annotation(annotation.getTypeName(), constPool);
            // If this must target a certain type of field, then ensure we
            // only
            // copy over annotations that can target that type of field.
            // For instances, a METHOD annotation can't be applied to a
            // FIELD or TYPE.
            Class<?> annoClass;
            try {
                annoClass = cl.loadClass(annotation.getTypeName());
                Target target = annoClass.getAnnotation(Target.class);
                if (target != null && !Arrays.asList(target.value()).contains(validElementType)) {
                    continue;
                }
            } catch (ClassNotFoundException e) {
                LOGGER.error("Cannot apply this annotation because it's type cannot be found", e);
                continue;
            }
            // StringMemberValue
            if (annotation.getMemberNames() != null) {
                for (Object memberName : annotation.getMemberNames()) {
                    MemberValue memberValue = annotation.getMemberValue((String) memberName);
                    if (memberValue != null) {
                        newAnnotation.addMemberValue((String) memberName, memberValue);
                    }
                }
            }
            attrNew.addAnnotation(newAnnotation);
        }
    }
    return attrNew;
}
Example 47
Project: IMM-master  File: Annotations.java View source code
static boolean annotationMatchesTarget(Element annotationElement, ElementType elementType) {
    @Nullable Target target = annotationElement.getAnnotation(Target.class);
    if (target != null) {
        ElementType[] targetTypes = target.value();
        if (targetTypes.length == 0) {
            return false;
        }
        boolean found = false;
        for (ElementType t : targetTypes) {
            if (t == elementType) {
                found = true;
            }
        }
        if (!found) {
            return false;
        }
    }
    return true;
}
Example 48
Project: immutables-master  File: Annotations.java View source code
static boolean annotationMatchesTarget(Element annotationElement, ElementType elementType) {
    @Nullable Target target = annotationElement.getAnnotation(Target.class);
    if (target != null) {
        ElementType[] targetTypes = target.value();
        if (targetTypes.length == 0) {
            return false;
        }
        boolean found = false;
        for (ElementType t : targetTypes) {
            if (t == elementType) {
                found = true;
            }
        }
        if (!found) {
            return false;
        }
    }
    return true;
}
Example 49
Project: jackson-databind-master  File: AnnotatedClassResolver.java View source code
private AnnotationCollector _addFromBundleIfNotPresent(AnnotationCollector c, Annotation bundle) {
    for (Annotation ann : ClassUtil.findClassAnnotations(bundle.annotationType())) {
        // minor optimization: by-pass 2 common JDK meta-annotations
        if ((ann instanceof Target) || (ann instanceof Retention)) {
            continue;
        }
        if (!c.isPresent(ann)) {
            c = c.addOrOverride(ann);
            if (_intr.isAnnotationBundle(ann)) {
                c = _addFromBundleIfNotPresent(c, ann);
            }
        }
    }
    return c;
}
Example 50
Project: JBossAS51-master  File: AltAnnotationMetaDataDeployer.java View source code
/**
    * Add annotation to matching set.
    *
    * @param annotation the annotation class
    */
public void addAnnotationClass(Class<? extends Annotation> annotation) {
    Target target = annotation.getAnnotation(Target.class);
    if (target == null) {
        log.info("Annotation " + annotation + " has not @Target.");
        return;
    }
    ElementType[] types = target.value();
    if (types == null || types.length == 0) {
        log.info("Null or empty types on annotation's @Target: " + annotation);
        return;
    }
    for (ElementType type : types) {
        // no need for duplicates
        boolean used = false;
        if (type == ElementType.TYPE) {
            annotationOnClass.add(annotation);
            used = true;
        }
        if (used == false && type == ElementType.METHOD) {
            annotationOnMethod.add(annotation);
            used = true;
        }
        if (used == false && type == ElementType.FIELD) {
            annotationOnField.add(annotation);
        }
    }
}
Example 51
Project: JBossAS_5_1_EDG-master  File: AltAnnotationMetaDataDeployer.java View source code
/**
    * Add annotation to matching set.
    *
    * @param annotation the annotation class
    */
public void addAnnotationClass(Class<? extends Annotation> annotation) {
    Target target = annotation.getAnnotation(Target.class);
    if (target == null) {
        log.info("Annotation " + annotation + " has not @Target.");
        return;
    }
    ElementType[] types = target.value();
    if (types == null || types.length == 0) {
        log.info("Null or empty types on annotation's @Target: " + annotation);
        return;
    }
    for (ElementType type : types) {
        // no need for duplicates
        boolean used = false;
        if (type == ElementType.TYPE) {
            annotationOnClass.add(annotation);
            used = true;
        }
        if (used == false && type == ElementType.METHOD) {
            annotationOnMethod.add(annotation);
            used = true;
        }
        if (used == false && type == ElementType.FIELD) {
            annotationOnField.add(annotation);
        }
    }
}
Example 52
Project: jbosstools-javaee-master  File: NewCDIAnnotationWizardPage.java View source code
protected void addTargetAnnotation(ImportsManager imports, StringBuffer sb, String lineDelimiter, String[] targets) {
    if (targets.length == 0) {
        return;
    }
    imports.addImport("java.lang.annotation.Target");
    StringBuffer list = new StringBuffer();
    for (int i = 0; i < targets.length; i++) {
        imports.addImport("static java.lang.annotation.ElementType." + targets[i]);
        if (i > 0)
            list.append(", ");
        list.append(targets[i]);
    }
    sb.append("@Target( {" + list.toString() + "} )").append(lineDelimiter);
}
Example 53
Project: jbosstools-webservices-master  File: TargetAnnotationMarkerResolutionTestCase.java View source code
@Test
public void shouldAddTargetAnnotationAndAllImportsOnHttpMethod() throws CoreException, ValidationException {
    // pre-conditions
    metamodelMonitor.createCompilationUnit("BAZ.txt", "org.jboss.tools.ws.jaxrs.sample.services", "BAZ.java");
    replaceFirstOccurrenceOfCode("org.jboss.tools.ws.jaxrs.sample.services.BAZ", javaProject, "import java.lang.annotation.Target;", "//import java.lang.annotation.Target;", false);
    replaceFirstOccurrenceOfCode("org.jboss.tools.ws.jaxrs.sample.services.BAZ", javaProject, "import java.lang.annotation.ElementType;", "//import java.lang.annotation.ElementType;", false);
    replaceFirstOccurrenceOfCode("org.jboss.tools.ws.jaxrs.sample.services.BAZ", javaProject, "@Target(value=ElementType.METHOD)", "//@Target(value=ElementType.METHOD)", false);
    metamodelMonitor.createElements("org.jboss.tools.ws.jaxrs.sample.services.BAZ");
    final JaxrsHttpMethod bazMethod = (JaxrsHttpMethod) metamodel.findElement("org.jboss.tools.ws.jaxrs.sample.services.BAZ", EnumElementCategory.HTTP_METHOD);
    // operation 1: validate the HTTP Method
    new JaxrsMetamodelValidator().validate(toSet(bazMethod.getResource()), project, validationHelper, context, validatorManager, reporter);
    // verification 1: there should be 1 error: missing @Target annotation
    final IMarker[] markers = findJaxrsMarkers(bazMethod);
    assertThat(markers.length, equalTo(1));
    assertThat(markers, havePreferenceKey(HTTP_METHOD_MISSING_TARGET_ANNOTATION));
    // operation 2: now, use the quickfix to fix the problem
    final ICompilationUnit compilationUnit = bazMethod.getJavaElement().getCompilationUnit();
    JavaCompletionProposalUtils.applyMarkerResolution(new AddHttpMethodTargetAnnotationMarkerResolution(bazMethod.getJavaElement()), bazMethod.getResource());
    metamodelMonitor.processEvent(compilationUnit, IJavaElementDelta.CHANGED);
    // verification 2: revalidate, there should be 0 JAX-RS/Java error
    new JaxrsMetamodelValidator().validate(toSet(bazMethod.getResource()), project, validationHelper, context, validatorManager, reporter);
    assertThat(findJaxrsMarkers(bazMethod).length, equalTo(0));
    assertThat(findJavaProblems(bazMethod.getResource()).length, equalTo(0));
}
Example 54
Project: lightblue-migrator-master  File: FacadeProxyFactory.java View source code
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
    if (method.isAnnotationPresent(DirectOperation.class)) {
        DirectOperation.Target t = method.getAnnotation(DirectOperation.class).target();
        switch(t) {
            case LEGACY:
                {
                    log.debug("Method \"{}\" is explicitly annotated to call legacy", method);
                    Method legacyMethod = svcFacade.getLegacySvc().getClass().getMethod(method.getName(), method.getParameterTypes());
                    return legacyMethod.invoke(svcFacade.getLegacySvc(), args);
                }
            case LIGHTBLUE:
                {
                    log.debug("Method \"{}\" is explicitly annotated to call lightblue", method);
                    Method destinationMethod = svcFacade.getLightblueSvc().getClass().getMethod(method.getName(), method.getParameterTypes());
                    return destinationMethod.invoke(svcFacade.getLightblueSvc(), args);
                }
        }
    }
    if (method.isAnnotationPresent(ReadOperation.class)) {
        ReadOperation ro = method.getAnnotation(ReadOperation.class);
        log.debug("Performing parallel=" + ro.parallel() + " " + FacadeOperation.READ + " operation");
        return svcFacade.callSvcMethod(FacadeOperation.READ, ro.parallel(), method, args);
    }
    if (method.isAnnotationPresent(WriteOperation.class)) {
        WriteOperation wo = method.getAnnotation(WriteOperation.class);
        log.debug("Performing parallel=" + wo.parallel() + " " + FacadeOperation.WRITE + " operation");
        return svcFacade.callSvcMethod(FacadeOperation.WRITE, wo.parallel(), method, args);
    }
    if (!LightblueMigration.shouldReadSourceEntity() && !LightblueMigration.shouldWriteSourceEntity()) {
        // this method is not annotated and legacy/source is no more
        throw new IllegalStateException("Method \"" + method + "\" is not annotated for facade and legacy source is disabled!");
    } else {
        // this can cause problems when entering proxy phase
        log.warn("Method \"{}\" is not annotated for facade. Proxy passing to legacy.", method);
        Method legacyMethod = svcFacade.getLegacySvc().getClass().getMethod(method.getName(), method.getParameterTypes());
        return legacyMethod.invoke(svcFacade.getLegacySvc(), args);
    }
}
Example 55
Project: lombok.ast-master  File: TypesMatchTest.java View source code
@Test
public void testToAnnotationInstance() {
    Source s = new Source(ANNOTATION_SOURCE, "SomeAnnotation.java");
    s.parseCompilationUnit();
    final AtomicInteger hit = new AtomicInteger();
    s.getNodes().get(0).accept(new ForwardingAstVisitor() {

        @Override
        public boolean visitAnnotationDeclaration(AnnotationDeclaration node) {
            Annotation annotation = node.astModifiers().astAnnotations().first();
            Target target = new Resolver().toAnnotationInstance(Target.class, annotation);
            assertArrayEquals(new ElementType[] { ElementType.ANNOTATION_TYPE }, target.value());
            hit.incrementAndGet();
            return true;
        }
    });
    assertEquals("expected 1 hit on AnnotationDeclaration", 1, hit.get());
}
Example 56
Project: metatypes-master  File: MetaAnnotatedObject.java View source code
private static Collection<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> clazz) {
    Map<Class, Annotation> map = new HashMap<Class, Annotation>();
    for (Annotation annotation : clazz.getDeclaredAnnotations()) {
        map.put(annotation.annotationType(), annotation);
    }
    List<Annotation[]> groups = new ArrayList<Annotation[]>();
    Class<? extends Annotation> metatype = getMetatype(clazz);
    if (metatype != null) {
        try {
            Class<?> def = clazz.getClassLoader().loadClass(clazz.getName() + "$$");
            List<AnnotatedElement> elements = new ArrayList<AnnotatedElement>();
            elements.addAll(asList(def.getDeclaredFields()));
            elements.addAll(asList(def.getDeclaredConstructors()));
            elements.addAll(asList(def.getDeclaredMethods()));
            for (Method method : def.getDeclaredMethods()) {
                for (Annotation[] array : method.getParameterAnnotations()) {
                    groups.add(array);
                }
            }
            for (Constructor constructor : def.getDeclaredConstructors()) {
                for (Annotation[] array : constructor.getParameterAnnotations()) {
                    groups.add(array);
                }
            }
            for (AnnotatedElement element : elements) {
                groups.add(element.getDeclaredAnnotations());
            }
            for (Annotation[] annotations : groups) {
                if (contains(annotations, clazz)) {
                    for (Annotation annotation : annotations) {
                        map.put(annotation.annotationType(), annotation);
                    }
                }
            }
        } catch (ClassNotFoundException e) {
        }
    }
    // TODO: why not? maybe ignore all annotations that are not applicable
    map.remove(Target.class);
    map.remove(Retention.class);
    map.remove(Documented.class);
    // if the chicken is an egg, carry it forward
    if (!isMetaAnnotation(metatype))
        map.remove(metatype);
    map.remove(clazz);
    return map.values();
}
Example 57
Project: modeshape-master  File: AnnotationTypeSequencerTest.java View source code
@Test
public void shouldSequenceAnnotationTypeFile() throws Exception {
    final String packagePath = AnnotationType.class.getName().replaceAll("\\.", "/");
    createNodeWithContentFromFile("annotationtype.java", packagePath + ".java");
    // expected by sequencer in a different location
    final String expectedOutputPath = "java/annotationtype.java";
    final Node compilationUnitNode = getOutputNode(rootNode, expectedOutputPath);
    assertThat(compilationUnitNode, is(notNullValue()));
    assertThat(compilationUnitNode.isNodeType(ClassFileSequencerLexicon.COMPILATION_UNIT), is(true));
    assertThat(compilationUnitNode.hasProperty(ClassFileSequencerLexicon.SEQUENCED_DATE), is(true));
    assertThat(compilationUnitNode.hasProperty(ClassFileSequencerLexicon.TYPES), is(true));
    // assertThat(compilationUnitNode.getProperty(ClassFileSequencerLexicon.TYPES).getValues().length, is(2));
    assertThat(compilationUnitNode.hasNode(ClassFileSequencerLexicon.MESSAGES), is(false));
    {
        // 2 imports
        assertThat(compilationUnitNode.hasNode(ClassFileSequencerLexicon.IMPORTS), is(true));
        assertThat(compilationUnitNode.getNode(ClassFileSequencerLexicon.IMPORTS).getNodes().getSize(), is(2L));
        final NodeIterator itr = compilationUnitNode.getNode(ClassFileSequencerLexicon.IMPORTS).getNodes();
        {
            // first import
            final Node firstImport = itr.nextNode();
            assertThat(firstImport.getName(), is("java.lang.annotation.ElementType"));
            assertThat(firstImport.hasProperty(ClassFileSequencerLexicon.STATIC), is(true));
            assertThat(firstImport.getProperty(ClassFileSequencerLexicon.STATIC).getBoolean(), is(false));
            assertThat(firstImport.hasProperty(ClassFileSequencerLexicon.ON_DEMAND), is(true));
            assertThat(firstImport.getProperty(ClassFileSequencerLexicon.ON_DEMAND).getBoolean(), is(false));
        }
        {
            // second import
            final Node secondImport = itr.nextNode();
            assertThat(secondImport.getName(), is("java.lang.annotation.Target"));
            assertThat(secondImport.hasProperty(ClassFileSequencerLexicon.STATIC), is(true));
            assertThat(secondImport.getProperty(ClassFileSequencerLexicon.STATIC).getBoolean(), is(false));
            assertThat(secondImport.hasProperty(ClassFileSequencerLexicon.ON_DEMAND), is(true));
            assertThat(secondImport.getProperty(ClassFileSequencerLexicon.ON_DEMAND).getBoolean(), is(false));
        }
    }
    {
        // comments
        assertThat(compilationUnitNode.hasNode(ClassFileSequencerLexicon.COMMENTS), is(true));
        assertThat(compilationUnitNode.getNode(ClassFileSequencerLexicon.COMMENTS).getNodes().getSize(), is(2L));
        final NodeIterator itr = compilationUnitNode.getNode(ClassFileSequencerLexicon.COMMENTS).getNodes();
        {
            // file header
            final Node firstComment = itr.nextNode();
            assertThat(firstComment.getName(), is(ClassFileSequencerLexicon.COMMENT));
            assertThat(firstComment.hasProperty(ClassFileSequencerLexicon.COMMENT_TYPE), is(true));
            assertThat(firstComment.getProperty(ClassFileSequencerLexicon.COMMENT_TYPE).getString(), is(ClassFileSequencerLexicon.CommentType.BLOCK.toString()));
            assertThat(firstComment.hasProperty(ClassFileSequencerLexicon.COMMENT), is(true));
            assertThat(firstComment.getProperty(ClassFileSequencerLexicon.COMMENT).getString().startsWith("/*\n * ModeShape"), is(true));
        }
        {
            // line comment
            final Node lineComment = itr.nextNode();
            assertThat(lineComment.getName(), is(ClassFileSequencerLexicon.COMMENT));
            assertThat(lineComment.hasProperty(ClassFileSequencerLexicon.COMMENT_TYPE), is(true));
            assertThat(lineComment.getProperty(ClassFileSequencerLexicon.COMMENT_TYPE).getString(), is(ClassFileSequencerLexicon.CommentType.LINE.toString()));
            assertThat(lineComment.hasProperty(ClassFileSequencerLexicon.COMMENT), is(true));
            assertThat(lineComment.getProperty(ClassFileSequencerLexicon.COMMENT).getString(), is("// an annotation type"));
        }
    }
    {
        // annotation type
        final Node annotationTypeNode = compilationUnitNode.getNode(packagePath);
        assertThat(annotationTypeNode.getName(), is("AnnotationType"));
        assertThat(annotationTypeNode.getProperty(ClassFileSequencerLexicon.NAME).getString(), is(annotationTypeNode.getName()));
        assertThat(annotationTypeNode.hasProperty(ClassFileSequencerLexicon.SEQUENCED_DATE), is(true));
        assertThat(annotationTypeNode.getProperty(ClassFileSequencerLexicon.VISIBILITY).getString(), is(Visibility.PUBLIC.getDescription()));
        assertThat(annotationTypeNode.hasNode(ClassFileSequencerLexicon.ANNOTATIONS), is(true));
        assertThat(annotationTypeNode.getNode(ClassFileSequencerLexicon.ANNOTATIONS).getNodes().getSize(), is(1L));
        // throws exception if not found
        annotationTypeNode.getNode(ClassFileSequencerLexicon.ANNOTATIONS).getNode("Target");
        assertThat(annotationTypeNode.hasNode(ClassFileSequencerLexicon.JAVADOC), is(true));
        final Node javadocNode = annotationTypeNode.getNode(ClassFileSequencerLexicon.JAVADOC);
        final String comment = "This is an annotation type test class.";
        assertThat(javadocNode.getProperty(ClassFileSequencerLexicon.COMMENT).getString().contains(comment), is(true));
        assertThat(annotationTypeNode.hasNode(ClassFileSequencerLexicon.FIELDS), is(true));
        assertThat(annotationTypeNode.getNode(ClassFileSequencerLexicon.FIELDS).getNodes().getSize(), is(1L));
        // throws exception if not found
        annotationTypeNode.getNode(ClassFileSequencerLexicon.FIELDS).getNode("choice");
        assertThat(annotationTypeNode.hasNode(ClassFileSequencerLexicon.NESTED_TYPES), is(true));
        assertThat(annotationTypeNode.getNode(ClassFileSequencerLexicon.NESTED_TYPES).getNodes().getSize(), is(2L));
        annotationTypeNode.getNode(ClassFileSequencerLexicon.NESTED_TYPES).getNode("Decision");
        // throws exception if not found
        annotationTypeNode.getNode(ClassFileSequencerLexicon.NESTED_TYPES).getNode("Status");
        {
            // annotation type members
            assertThat(annotationTypeNode.hasNode(ClassFileSequencerLexicon.ANNOTATION_TYPE_MEMBERS), is(true));
            assertThat(annotationTypeNode.getNode(ClassFileSequencerLexicon.ANNOTATION_TYPE_MEMBERS).getNodes().getSize(), is(3L));
            final NodeIterator itr = annotationTypeNode.getNode(ClassFileSequencerLexicon.ANNOTATION_TYPE_MEMBERS).getNodes();
            {
                // showStopper
                final Node memberNode = itr.nextNode();
                assertThat(memberNode.getPrimaryNodeType().getName(), is(ClassFileSequencerLexicon.ANNOTATION_TYPE_MEMBER));
                assertThat(memberNode.getProperty(ClassFileSequencerLexicon.NAME).getString(), is("showStopper"));
                assertThat(memberNode.getProperty(ClassFileSequencerLexicon.ABSTRACT).getBoolean(), is(true));
                assertThat(memberNode.getProperty(ClassFileSequencerLexicon.VISIBILITY).getString(), is("package"));
                assertThat(memberNode.hasNode(ClassFileSequencerLexicon.ANNOTATIONS), is(true));
                assertThat(memberNode.hasNode(ClassFileSequencerLexicon.JAVADOC), is(false));
                assertThat(memberNode.hasNode(ClassFileSequencerLexicon.DEFAULT), is(false));
            }
            {
                // status
                final Node memberNode = itr.nextNode();
                assertThat(memberNode.getPrimaryNodeType().getName(), is(ClassFileSequencerLexicon.ANNOTATION_TYPE_MEMBER));
                assertThat(memberNode.getProperty(ClassFileSequencerLexicon.NAME).getString(), is("status"));
                assertThat(memberNode.getProperty(ClassFileSequencerLexicon.ABSTRACT).getBoolean(), is(false));
                assertThat(memberNode.getProperty(ClassFileSequencerLexicon.VISIBILITY).getString(), is("public"));
                assertThat(memberNode.hasNode(ClassFileSequencerLexicon.ANNOTATIONS), is(false));
                assertThat(memberNode.hasNode(ClassFileSequencerLexicon.JAVADOC), is(true));
                assertThat(memberNode.hasNode(ClassFileSequencerLexicon.DEFAULT), is(true));
                final Node defaultNode = memberNode.getNode(ClassFileSequencerLexicon.DEFAULT);
                assertThat(defaultNode.getPrimaryNodeType().getName(), is(ClassFileSequencerLexicon.EXPRESSION));
                assertThat(defaultNode.getProperty(ClassFileSequencerLexicon.CONTENT).getString(), is("Status.UNCONFIRMED"));
            }
            {
                // ref
                final Node memberNode = itr.nextNode();
                assertThat(memberNode.getPrimaryNodeType().getName(), is(ClassFileSequencerLexicon.ANNOTATION_TYPE_MEMBER));
                assertThat(memberNode.getProperty(ClassFileSequencerLexicon.NAME).getString(), is("ref"));
                assertThat(memberNode.getProperty(ClassFileSequencerLexicon.ABSTRACT).getBoolean(), is(false));
                assertThat(memberNode.getProperty(ClassFileSequencerLexicon.VISIBILITY).getString(), is("package"));
                assertThat(memberNode.hasNode(ClassFileSequencerLexicon.ANNOTATIONS), is(false));
                assertThat(memberNode.hasNode(ClassFileSequencerLexicon.JAVADOC), is(false));
                assertThat(memberNode.hasNode(ClassFileSequencerLexicon.DEFAULT), is(true));
                final Node defaultNode = memberNode.getNode(ClassFileSequencerLexicon.DEFAULT);
                assertThat(defaultNode.getPrimaryNodeType().getName(), is(ClassFileSequencerLexicon.EXPRESSION));
                assertThat(defaultNode.getProperty(ClassFileSequencerLexicon.CONTENT).getString(), is("@Reference"));
            }
        }
    }
}
Example 58
Project: mybatis-generator-master  File: SummarizerTest.java View source code
@Test
public void testAnnotationSummarizer() throws IOException {
    InputStream resource = getClass().getResourceAsStream("/org/mybatis/generator/eclipse/tests/harness/tests/resources/OuterAnnotation.src");
    CompilationUnitSummary cuSummary = getCompilationUnitSummaryFromResource(resource);
    assertThat(cuSummary, hasImportCount(4));
    assertThat(cuSummary, hasImport("import java.lang.annotation.ElementType"));
    assertThat(cuSummary, hasImport("import java.lang.annotation.Retention"));
    assertThat(cuSummary, hasImport("import java.lang.annotation.RetentionPolicy"));
    assertThat(cuSummary, hasImport("import java.lang.annotation.Target"));
    assertThat(cuSummary, hasAnnotationCount(2));
    assertThat(cuSummary, hasAnnotation("OuterAnnotation"));
    assertThat(cuSummary, hasAnnotation("SecondOuterAnnotation"));
    assertThat(cuSummary, hasClassCount(0));
    assertThat(cuSummary, hasEnumCount(0));
    assertThat(cuSummary, hasInterfaceCount(0));
    AnnotationSummary annotationSummary = cuSummary.getAnnotationSummary("OuterAnnotation");
    assertThat(annotationSummary, hasAnnotationMember("name"));
    assertThat(annotationSummary, hasAnnotationMemberCount(1));
    assertThat(annotationSummary, hasField("id", ofType("int")));
    assertThat(annotationSummary, hasField("id2", ofType("int")));
    assertThat(annotationSummary, hasField("name", ofType("int")));
    assertThat(annotationSummary, hasFieldCount(3));
    verifyInners(annotationSummary);
}
Example 59
Project: retry-master  File: MethodInvokerUtils.java View source code
/**
	 * Create {@link MethodInvoker} for the method with the provided annotation on the
	 * provided object. Annotations that cannot be applied to methods (i.e. that aren't
	 * annotated with an element type of METHOD) will cause an exception to be thrown.
	 *
	 * @param annotationType to be searched for
	 * @param target to be invoked
	 * @return MethodInvoker for the provided annotation, null if none is found.
	 */
public static MethodInvoker getMethodInvokerByAnnotation(final Class<? extends Annotation> annotationType, final Object target) {
    Assert.notNull(target, "Target must not be null");
    Assert.notNull(annotationType, "AnnotationType must not be null");
    Assert.isTrue(ObjectUtils.containsElement(annotationType.getAnnotation(Target.class).value(), ElementType.METHOD), "Annotation [" + annotationType + "] is not a Method-level annotation.");
    final Class<?> targetClass = (target instanceof Advised) ? ((Advised) target).getTargetSource().getTargetClass() : target.getClass();
    if (targetClass == null) {
        // Proxy with no target cannot have annotations
        return null;
    }
    final AtomicReference<Method> annotatedMethod = new AtomicReference<Method>();
    ReflectionUtils.doWithMethods(targetClass, new ReflectionUtils.MethodCallback() {

        public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException {
            Annotation annotation = AnnotationUtils.findAnnotation(method, annotationType);
            if (annotation != null) {
                Assert.isNull(annotatedMethod.get(), "found more than one method on target class [" + targetClass.getSimpleName() + "] with the annotation type [" + annotationType.getSimpleName() + "].");
                annotatedMethod.set(method);
            }
        }
    });
    Method method = annotatedMethod.get();
    if (method == null) {
        return null;
    } else {
        return new SimpleMethodInvoker(target, annotatedMethod.get());
    }
}
Example 60
Project: soot-master  File: Annotation.java View source code
/**
   * @ast method 
   * @aspect Annotations
   * @declaredat /Users/eric/Documents/workspaces/clara-soot/JastAddJ/Java1.5Frontend/Annotations.jrag:41
   */
public void checkModifiers() {
    super.checkModifiers();
    if (decl() instanceof AnnotationDecl) {
        AnnotationDecl T = (AnnotationDecl) decl();
        Annotation m = T.annotation(lookupType("java.lang.annotation", "Target"));
        if (m != null && m.getNumElementValuePair() == 1 && m.getElementValuePair(0).getName().equals("value")) {
            ElementValue v = m.getElementValuePair(0).getElementValue();
            //System.out.println("Annotation: \n" + dumpTree());
            if (!v.validTarget(this))
                error("annotation type " + T.typeName() + " is not applicable to this kind of declaration");
        }
    }
}
Example 61
Project: spring-batch-master  File: MethodInvokerUtils.java View source code
/**
	 * Create {@link MethodInvoker} for the method with the provided annotation
	 * on the provided object. Annotations that cannot be applied to methods
	 * (i.e. that aren't annotated with an element type of METHOD) will cause an
	 * exception to be thrown.
	 * 
	 * @param annotationType to be searched for
	 * @param target to be invoked
	 * @return MethodInvoker for the provided annotation, null if none is found.
	 */
public static MethodInvoker getMethodInvokerByAnnotation(final Class<? extends Annotation> annotationType, final Object target) {
    Assert.notNull(target, "Target must not be null");
    Assert.notNull(annotationType, "AnnotationType must not be null");
    Assert.isTrue(ObjectUtils.containsElement(annotationType.getAnnotation(Target.class).value(), ElementType.METHOD), "Annotation [" + annotationType + "] is not a Method-level annotation.");
    final Class<?> targetClass = (target instanceof Advised) ? ((Advised) target).getTargetSource().getTargetClass() : target.getClass();
    if (targetClass == null) {
        // Proxy with no target cannot have annotations
        return null;
    }
    final AtomicReference<Method> annotatedMethod = new AtomicReference<>();
    ReflectionUtils.doWithMethods(targetClass,  method -> {
        Annotation annotation = AnnotationUtils.findAnnotation(method, annotationType);
        if (annotation != null) {
            Assert.isNull(annotatedMethod.get(), "found more than one method on target class [" + targetClass.getSimpleName() + "] with the annotation type [" + annotationType.getSimpleName() + "].");
            annotatedMethod.set(method);
        }
    });
    Method method = annotatedMethod.get();
    if (method == null) {
        return null;
    } else {
        return new SimpleMethodInvoker(target, annotatedMethod.get());
    }
}
Example 62
Project: spring-retry-master  File: MethodInvokerUtils.java View source code
/**
	 * Create {@link MethodInvoker} for the method with the provided annotation on the
	 * provided object. Annotations that cannot be applied to methods (i.e. that aren't
	 * annotated with an element type of METHOD) will cause an exception to be thrown.
	 *
	 * @param annotationType to be searched for
	 * @param target to be invoked
	 * @return MethodInvoker for the provided annotation, null if none is found.
	 */
public static MethodInvoker getMethodInvokerByAnnotation(final Class<? extends Annotation> annotationType, final Object target) {
    Assert.notNull(target, "Target must not be null");
    Assert.notNull(annotationType, "AnnotationType must not be null");
    Assert.isTrue(ObjectUtils.containsElement(annotationType.getAnnotation(Target.class).value(), ElementType.METHOD), "Annotation [" + annotationType + "] is not a Method-level annotation.");
    final Class<?> targetClass = (target instanceof Advised) ? ((Advised) target).getTargetSource().getTargetClass() : target.getClass();
    if (targetClass == null) {
        // Proxy with no target cannot have annotations
        return null;
    }
    final AtomicReference<Method> annotatedMethod = new AtomicReference<Method>();
    ReflectionUtils.doWithMethods(targetClass, new ReflectionUtils.MethodCallback() {

        public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException {
            Annotation annotation = AnnotationUtils.findAnnotation(method, annotationType);
            if (annotation != null) {
                Assert.isNull(annotatedMethod.get(), "found more than one method on target class [" + targetClass.getSimpleName() + "] with the annotation type [" + annotationType.getSimpleName() + "].");
                annotatedMethod.set(method);
            }
        }
    });
    Method method = annotatedMethod.get();
    if (method == null) {
        return null;
    } else {
        return new SimpleMethodInvoker(target, annotatedMethod.get());
    }
}
Example 63
Project: android-platform-tools-base-master  File: SupportAnnotationDetectorTest.java View source code
private TestFile createResAnnotation(String prefix) {
    return java("src/android/support/annotation/" + prefix + "Res.java", "" + "package android.support.annotation;\n" + "\n" + "import java.lang.annotation.Retention;\n" + "import java.lang.annotation.Target;\n" + "\n" + "import static java.lang.annotation.ElementType.*;\n" + "import static java.lang.annotation.RetentionPolicy.CLASS;\n" + "\n" + "@Retention(CLASS)\n" + "@Target({METHOD, PARAMETER, FIELD, LOCAL_VARIABLE})\n" + "public @interface " + prefix + "Res {\n" + "}\n");
}
Example 64
Project: beanlet-master  File: XMLAnnotationDomain.java View source code
private void validate(ElementAnnotation ea) {
    Target target = ea.getAnnotation().annotationType().getAnnotation(Target.class);
    if (target != null) {
        if (!Arrays.asList(target.value()).contains(ea.getElement().getElementType())) {
            throw new BeanletValidationException(getBeanletName(), "Invalid element for annotation type. Element: " + ea.getElement() + ". Annotation: " + ea.getAnnotation().annotationType() + ".");
        }
    }
}
Example 65
Project: graniteds-master  File: Reflection.java View source code
public Property findProperty(Class<?> cls, Class<? extends Annotation> annotationClass) {
    AnnotatedPropertyKey key = new AnnotatedPropertyKey(cls, annotationClass);
    Property property = singlePropertyCache.get(key);
    if (property == null) {
        boolean searchFields = false;
        boolean searchMethods = false;
        if (!annotationClass.isAnnotationPresent(Target.class))
            searchFields = searchMethods = true;
        else {
            Target target = annotationClass.getAnnotation(Target.class);
            for (ElementType targetType : target.value()) {
                if (targetType == ElementType.FIELD)
                    searchFields = true;
                else if (targetType == ElementType.METHOD)
                    searchMethods = true;
            }
        }
        if (searchFields == false && searchMethods == false)
            return null;
        final int modifierMask = Modifier.PUBLIC | Modifier.STATIC;
        classLoop: for (Class<?> c = cls; c != null && c != Object.class; c = c.getSuperclass()) {
            if (searchMethods) {
                for (Method method : c.getDeclaredMethods()) {
                    if ((method.getModifiers() & modifierMask) != Modifier.PUBLIC || !method.isAnnotationPresent(annotationClass))
                        continue;
                    if (method.getReturnType() == Void.TYPE) {
                        if (method.getName().startsWith("set") && method.getParameterTypes().length == 1) {
                            String name = method.getName().substring(3);
                            if (name.length() == 0)
                                continue;
                            Method getter = null;
                            try {
                                getter = cls.getMethod("get" + name);
                            } catch (NoSuchMethodException e) {
                                try {
                                    getter = cls.getMethod("is" + name);
                                } catch (Exception f) {
                                }
                            }
                            if (getter != null && (getter.getModifiers() & Modifier.STATIC) != 0 && getter.getReturnType() != method.getParameterTypes()[0])
                                getter = null;
                            if (getter == null)
                                continue;
                            name = name.substring(0, 1).toLowerCase() + name.substring(1);
                            property = newMethodProperty(getter, method, name);
                            break classLoop;
                        }
                    } else if (method.getParameterTypes().length == 0 && (method.getName().startsWith("get") || method.getName().startsWith("is"))) {
                        String name;
                        if (method.getName().startsWith("get"))
                            name = method.getName().substring(3);
                        else
                            name = method.getName().substring(2);
                        if (name.length() == 0)
                            continue;
                        Method setter = null;
                        try {
                            setter = cls.getMethod("set" + name);
                        } catch (NoSuchMethodException e) {
                        }
                        if (setter != null && (setter.getModifiers() & Modifier.STATIC) != 0 && method.getReturnType() != setter.getParameterTypes()[0])
                            setter = null;
                        name = name.substring(0, 1).toLowerCase() + name.substring(1);
                        property = newMethodProperty(method, setter, name);
                        break classLoop;
                    }
                }
            }
            if (searchFields) {
                for (Field field : c.getDeclaredFields()) {
                    if ((field.getModifiers() & Modifier.STATIC) == 0 && field.isAnnotationPresent(annotationClass)) {
                        property = newFieldProperty(field);
                        break classLoop;
                    }
                }
            }
        }
        if (property == null)
            property = NULL_PROPERTY;
        Property previous = singlePropertyCache.putIfAbsent(key, property);
        if (previous != null)
            property = previous;
    }
    return (property != NULL_PROPERTY ? property : null);
}
Example 66
Project: jbosstools-integration-tests-master  File: WebSocketHelper.java View source code
static TextEditor prepareCustomAnnotationEditor(String projectName) {
    TextEditor annotationEditor = createClass(projectName, NameBindingTest.Constants.PROJECT_PACKAGE, NameBindingTest.Constants.CLASS_NAME_ANNOTATION);
    //replace 'class' with '@interface'
    String replacedCode = new DefaultStyledText().getText().replaceAll("public class", "public @interface");
    new DefaultStyledText().setText(replacedCode);
    addClassAnnotation(annotationEditor, "@NameBinding", "import javax.ws.rs.NameBinding;");
    addClassAnnotation(annotationEditor, "@Target({ ElementType.TYPE, ElementType.METHOD })", "import java.lang.annotation.Target;");
    addImport(annotationEditor, "import java.lang.annotation.ElementType;");
    addClassAnnotation(annotationEditor, "@Retention(value = RetentionPolicy.RUNTIME)", "import java.lang.annotation.Retention;");
    addImport(annotationEditor, "import java.lang.annotation.RetentionPolicy;");
    annotationEditor.save();
    return annotationEditor;
}
Example 67
Project: plugin-java-master  File: SourceFromBytecodeGeneratorTest.java View source code
@Test
public void testAnnotationsOnAnnotation() throws Exception {
    IType interfaceType = project.findType("com.google.gwt.core.client.SingleJsoImpl");
    String source = new SourcesFromBytecodeGenerator().generateSource(interfaceType);
    assertThat(source).contains("@java.lang.annotation.Retention(value=java.lang.annotation.RetentionPolicy.RUNTIME)\n").contains("@java.lang.annotation.Target(value=java.lang.annotation.ElementType.TYPE)\n");
}
Example 68
Project: raml-jaxrs-codegen-master  File: Context.java View source code
private JDefinedClass createCustomHttpMethodAnnotation(final String httpMethod) throws JClassAlreadyExistsException {
    final JPackage pkg = codeModel._package(getSupportPackage());
    final JDefinedClass annotationClazz = pkg._annotationTypeDeclaration(httpMethod);
    annotationClazz.annotate(Target.class).param("value", ElementType.METHOD);
    annotationClazz.annotate(Retention.class).param("value", RetentionPolicy.RUNTIME);
    annotationClazz.annotate(HttpMethod.class).param("value", httpMethod);
    annotationClazz.javadoc().add("Custom JAX-RS support for HTTP " + httpMethod + ".");
    httpMethodAnnotations.put(httpMethod.toUpperCase(), annotationClazz);
    return annotationClazz;
}
Example 69
Project: google-web-toolkit-svnmirror-master  File: UiJavaResources.java View source code
@Override
public CharSequence getContent() {
    StringBuffer code = new StringBuffer();
    code.append("package com.google.gwt.uibinder.client;\n");
    code.append("import java.lang.annotation.Target;\n");
    // code.append("@Target(ElementType.METHOD)");
    code.append("public @interface UiFactory {\n");
    code.append("}\n");
    return code;
}
Example 70
Project: gwt-master  File: UiJavaResources.java View source code
@Override
public CharSequence getContent() {
    StringBuffer code = new StringBuffer();
    code.append("package com.google.gwt.uibinder.client;\n");
    code.append("import java.lang.annotation.Target;\n");
    // code.append("@Target(ElementType.METHOD)");
    code.append("public @interface UiFactory {\n");
    code.append("}\n");
    return code;
}
Example 71
Project: gwt-sandbox-master  File: UiJavaResources.java View source code
@Override
public CharSequence getContent() {
    StringBuffer code = new StringBuffer();
    code.append("package com.google.gwt.uibinder.client;\n");
    code.append("import java.lang.annotation.Target;\n");
    // code.append("@Target(ElementType.METHOD)");
    code.append("public @interface UiFactory {\n");
    code.append("}\n");
    return code;
}
Example 72
Project: gwt.svn-master  File: UiJavaResources.java View source code
@Override
public CharSequence getContent() {
    StringBuffer code = new StringBuffer();
    code.append("package com.google.gwt.uibinder.client;\n");
    code.append("import java.lang.annotation.Target;\n");
    // code.append("@Target(ElementType.METHOD)");
    code.append("public @interface UiFactory {\n");
    code.append("}\n");
    return code;
}
Example 73
Project: scalagwt-gwt-master  File: UiJavaResources.java View source code
@Override
public CharSequence getContent() {
    StringBuffer code = new StringBuffer();
    code.append("package com.google.gwt.uibinder.client;\n");
    code.append("import java.lang.annotation.Target;\n");
    // code.append("@Target(ElementType.METHOD)");
    code.append("public @interface UiFactory {\n");
    code.append("}\n");
    return code;
}
Example 74
Project: kotlin-master  File: AnnotationGenTest.java View source code
public void testAnnotationClassWithEnumArrayProperty() throws NoSuchFieldException, NoSuchMethodException, ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException {
    loadText("import java.lang.annotation.*\n" + "" + "@java.lang.annotation.Target(ElementType.TYPE, ElementType.METHOD) annotation class A");
    Class aClass = generateClass("A");
    Target annotation = (Target) aClass.getAnnotation(Target.class);
    ElementType[] value = annotation.value();
    assertEquals(2, value.length);
    assertEquals(ElementType.TYPE, value[0]);
    assertEquals(ElementType.METHOD, value[1]);
}
Example 75
Project: raml-for-jax-rs-master  File: ResourceBuilder.java View source code
private void buildNewWebMethod(GMethod gMethod, MethodSpec.Builder methodSpec) {
    Class<? extends Annotation> type = HTTPMethods.methodNameToAnnotation(gMethod.method());
    if (type == null) {
        String name = gMethod.method().toUpperCase();
        final ClassName className = ClassName.get(build.getSupportPackage(), name);
        final TypeSpec.Builder builder = TypeSpec.annotationBuilder(className);
        builder.addModifiers(Modifier.PUBLIC).addAnnotation(AnnotationSpec.builder(Target.class).addMember("value", "{$T.$L}", ElementType.class, "METHOD").build()).addAnnotation(AnnotationSpec.builder(Retention.class).addMember("value", "$T.$L", RetentionPolicy.class, "RUNTIME").build()).addAnnotation(AnnotationSpec.builder(HttpMethod.class).addMember("value", "$S", name).build());
        build.newSupportGenerator(new JavaPoetTypeGeneratorBase(className) {

            @Override
            public void output(CodeContainer<TypeSpec.Builder> rootDirectory) throws IOException {
                rootDirectory.into(builder);
            }
        });
        methodSpec.addAnnotation(AnnotationSpec.builder(className).build());
    } else {
        methodSpec.addAnnotation(AnnotationSpec.builder(type).build());
    }
}
Example 76
Project: ceylon-compiler-master  File: JavacProcessingEnvironment.java View source code
private Set<String> initPlatformAnnotations() {
    Set<String> platformAnnotations = new HashSet<String>();
    platformAnnotations.add("java.lang.Deprecated");
    platformAnnotations.add("java.lang.Override");
    platformAnnotations.add("java.lang.SuppressWarnings");
    platformAnnotations.add("java.lang.annotation.Documented");
    platformAnnotations.add("java.lang.annotation.Inherited");
    platformAnnotations.add("java.lang.annotation.Retention");
    platformAnnotations.add("java.lang.annotation.Target");
    return Collections.unmodifiableSet(platformAnnotations);
}
Example 77
Project: checker-framework-master  File: AnnotatedTypes.java View source code
public static boolean isTypeAnnotation(AnnotationMirror anno, Class<?> cls) {
    TypeElement elem = (TypeElement) anno.getAnnotationType().asElement();
    if (isTypeAnnotationCache.containsKey(elem)) {
        return isTypeAnnotationCache.get(elem);
    }
    // the annotation is a type annotation if it has the proper ElementTypes in the @Target meta-annotation
    boolean result = hasTypeQualifierElementTypes(elem.getAnnotation(Target.class).value(), cls);
    isTypeAnnotationCache.put(elem, result);
    return result;
}
Example 78
Project: core-management-master  File: SchemaProcessor.java View source code
public void processSchema(final TypeElement schemaAnnotatedElement) {
    AnnotationMirror retentionAnnotation = null;
    AnnotationMirror targetAnnotation = null;
    AnnotationMirror schemaAnnotation = null;
    AnnotationMirror deprecatedAnnotation = null;
    AnnotationMirror documentedAnnotation = null;
    AnnotationMirror inheritedAnnotation = null;
    for (AnnotationMirror annotationMirror : schemaAnnotatedElement.getAnnotationMirrors()) {
        final TypeElement annotationTypeElement = (TypeElement) annotationMirror.getAnnotationType().asElement();
        final String annotationClassName = annotationTypeElement.getQualifiedName().toString();
        switch(annotationClassName) {
            case "org.wildfly.core.management.annotation.Schema":
                schemaAnnotation = annotationMirror;
                break;
            case "java.lang.annotation.Target":
                targetAnnotation = annotationMirror;
                break;
            case "java.lang.annotation.Retention":
                retentionAnnotation = annotationMirror;
                break;
            case "java.lang.annotation.Documented":
                documentedAnnotation = annotationMirror;
                break;
            case "java.lang.annotation.Inherited":
                inheritedAnnotation = annotationMirror;
                break;
            case "java.lang.Deprecated":
                deprecatedAnnotation = annotationMirror;
                break;
            default:
                {
                    if (annotationClassName.startsWith("org.wildfly.core.management.annotation")) {
                        msg.error(schemaAnnotatedElement, annotationMirror, "Annotation is not allowed on attribute property");
                        break;
                    }
                    // ignore
                    break;
                }
        }
    }
    if (inheritedAnnotation != null) {
        msg.error(schemaAnnotatedElement, inheritedAnnotation, "Schema annotations may not be @Inherited");
    }
    if (documentedAnnotation == null) {
        msg.reqWarn(schemaAnnotatedElement, "Schema annotations should be @Documented");
    }
    if (retentionAnnotation != null) {
        for (Map.Entry<? extends ExecutableElement, ? extends AnnotationValue> entry : retentionAnnotation.getElementValues().entrySet()) {
            final AnnotationValue annotationValue = entry.getValue();
            final Object value = annotationValue.getValue();
            switch(entry.getKey().getSimpleName().toString()) {
                case "value":
                    {
                        if (!(value instanceof VariableElement)) {
                            msg.errorf(schemaAnnotatedElement, schemaAnnotation, annotationValue, "Expected an enum RetentionPolicy value for value");
                            break;
                        }
                        RetentionPolicy retentionPolicy = RetentionPolicy.valueOf(((VariableElement) value).getConstantValue().toString());
                        if (retentionPolicy != RetentionPolicy.SOURCE) {
                            msg.reqWarn(schemaAnnotatedElement, retentionAnnotation, annotationValue, "Schema member should be annotated with a retention policy of SOURCE");
                        }
                        break;
                    }
                default:
                    {
                        unknownAnnotationArgument(schemaAnnotatedElement, schemaAnnotation, annotationValue);
                        break;
                    }
            }
        }
    } else {
        msg.reqWarn(schemaAnnotatedElement, "Schema member should be annotated with a retention policy of SOURCE");
    }
    if (targetAnnotation != null) {
        for (Map.Entry<? extends ExecutableElement, ? extends AnnotationValue> entry : retentionAnnotation.getElementValues().entrySet()) {
            final AnnotationValue annotationValue = entry.getValue();
            final Object value = annotationValue.getValue();
            switch(entry.getKey().getSimpleName().toString()) {
                case "value":
                    {
                        if (value instanceof VariableElement) {
                            ElementType elementType;
                            elementType = ElementType.valueOf(((VariableElement) value).getConstantValue().toString());
                            if (elementType != ElementType.TYPE) {
                                msg.reqWarn(schemaAnnotatedElement, retentionAnnotation, annotationValue, "Schema member should be annotated with a single target of TYPE");
                            }
                        } else if (value instanceof List) {
                            @SuppressWarnings("unchecked") List<? extends AnnotationValue> values = (List<? extends AnnotationValue>) value;
                            if (values.size() == 1) {
                                ElementType elementType;
                                elementType = ElementType.valueOf(((VariableElement) values.get(0).getValue()).getConstantValue().toString());
                                if (elementType != ElementType.TYPE) {
                                    msg.reqWarn(schemaAnnotatedElement, retentionAnnotation, annotationValue, "Schema member should be annotated with a single target of TYPE");
                                }
                            } else {
                                msg.reqWarn(schemaAnnotatedElement, retentionAnnotation, annotationValue, "Schema member should be annotated with a single target of TYPE");
                            }
                        } else {
                            msg.errorf(schemaAnnotatedElement, schemaAnnotation, annotationValue, "Expected an enum TargetType value for value");
                            break;
                        }
                        if (!(value instanceof VariableElement)) {
                            break;
                        }
                        break;
                    }
                default:
                    {
                        unknownAnnotationArgument(schemaAnnotatedElement, schemaAnnotation, annotationValue);
                        break;
                    }
            }
        }
    }
    if (schemaAnnotation != null) {
        if (schemaAnnotatedElement.getKind() != ElementKind.ANNOTATION_TYPE) {
            msg.error(schemaAnnotatedElement, schemaAnnotation, "Only an annotation type may be annotated as a Schema");
            return;
        }
        final SchemaDescription.Builder builder = SchemaDescription.Builder.create();
        processSchemaAnnotation(schemaAnnotatedElement, schemaAnnotation, builder);
        // now, find all elements for this one
        processAllSchemaMembers(schemaAnnotatedElement, schemaAnnotation, builder);
        if (!roundEnv.errorRaised()) {
            systemDescriptionBuilder.addSchema(builder.build());
        }
        return;
    }
    // no schema found - weird but not really a problem
    return;
}
Example 79
Project: kie-wb-common-master  File: DriverUtils.java View source code
public static void copyAnnotationTarget(Class annotationClass, AnnotationDefinition annotationDefinition) {
    if (annotationClass.isAnnotationPresent(Target.class)) {
        Target targetAnnotation = (Target) annotationClass.getAnnotation(Target.class);
        java.lang.annotation.ElementType[] targets = targetAnnotation.value();
        if (targets != null && targets.length > 0) {
            for (int i = 0; i < targets.length; i++) {
                annotationDefinition.addTarget(buildElementType(targets[i]));
            }
        } else {
            //added to avoid an errai unmarshalling error in broser side, when an annotation has no targets, e.g.
            //javax.persistence.UniqueConstraint
            annotationDefinition.addTarget(ElementType.UNDEFINED);
        }
    }
}
Example 80
Project: Funcheck-master  File: JavacProcessingEnvironment.java View source code
private Set<String> initPlatformAnnotations() {
    Set<String> platformAnnotations = new HashSet<String>();
    platformAnnotations.add("java.lang.Deprecated");
    platformAnnotations.add("java.lang.Override");
    platformAnnotations.add("java.lang.SuppressWarnings");
    platformAnnotations.add("java.lang.annotation.Documented");
    platformAnnotations.add("java.lang.annotation.Inherited");
    platformAnnotations.add("java.lang.annotation.Retention");
    platformAnnotations.add("java.lang.annotation.Target");
    return Collections.unmodifiableSet(platformAnnotations);
}
Example 81
Project: griffon-master  File: FXObservableASTTransformation.java View source code
/**
     * Creates the JavaFX property and three methods for accessing the property and a pair of
     * getter/setter methods for accessing the original (now synthetic) Groovy property.  For
     * example, if the original property was "String firstName" then these three methods would
     * be generated:
     * <p>
     * public String getFirstName()
     * public void setFirstName(String value)
     * public StringProperty firstNameProperty()
     *
     * @param classNode    The declaring class in which the property will appear
     * @param originalProp The original Groovy property
     */
private void createPropertyGetterSetter(ClassNode classNode, PropertyNode originalProp) {
    Expression initExp = originalProp.getInitialExpression();
    originalProp.getField().setInitialValueExpression(null);
    PropertyNode fxProperty = createFXProperty(originalProp);
    List<AnnotationNode> methodAnnotations = new ArrayList<>();
    List<AnnotationNode> fieldAnnotations = new ArrayList<>();
    for (AnnotationNode annotation : originalProp.getField().getAnnotations()) {
        if (FXOBSERVABLE_CNODE.equals(annotation.getClassNode()))
            continue;
        Class annotationClass = annotation.getClassNode().getTypeClass();
        Target target = (Target) annotationClass.getAnnotation(Target.class);
        if (isTargetAllowed(target, ElementType.METHOD)) {
            methodAnnotations.add(annotation);
        } else if (isTargetAllowed(target, ElementType.FIELD)) {
            fieldAnnotations.add(annotation);
        }
    }
    String getterName = "get" + MetaClassHelper.capitalize(originalProp.getName());
    if (classNode.getMethods(getterName).isEmpty()) {
        Statement getterBlock = createGetterStatement(createFXProperty(originalProp));
        createGetterMethod(classNode, originalProp, getterName, getterBlock, methodAnnotations);
        methodAnnotations = null;
    } else {
        wrapGetterMethod(classNode, originalProp.getName(), methodAnnotations);
        methodAnnotations = null;
    }
    String setterName = "set" + MetaClassHelper.capitalize(originalProp.getName());
    if (classNode.getMethods(setterName).isEmpty()) {
        Statement setterBlock = createSetterStatement(createFXProperty(originalProp));
        createSetterMethod(classNode, originalProp, setterName, setterBlock, methodAnnotations);
    } else {
        wrapSetterMethod(classNode, originalProp.getName(), methodAnnotations);
    }
    // We want the actual name of the field to be different from the getter (Prop vs Property) so
    // that the getter takes precedence when we say this.somethingProperty.
    FieldNode fxFieldShortName = createFieldNodeCopy(originalProp.getName() + "Prop", null, fxProperty.getField());
    createPropertyAccessor(classNode, createFXProperty(originalProp), fxFieldShortName, initExp);
    classNode.removeField(originalProp.getName());
    classNode.addField(fxFieldShortName);
    fxFieldShortName.addAnnotations(fieldAnnotations);
}
Example 82
Project: H2-Research-master  File: BuildBase.java View source code
private boolean runTarget(String target) {
    Method m = null;
    try {
        m = getClass().getMethod(target);
    } catch (Exception e) {
        sysOut.println("Unknown target: " + target);
        projectHelp();
        return false;
    }
    println("Target: " + target);
    invoke(m, this, new Object[0]);
    return true;
}
Example 83
Project: h2database-master  File: BuildBase.java View source code
private boolean runTarget(String target) {
    Method m = null;
    try {
        m = getClass().getMethod(target);
    } catch (Exception e) {
        sysOut.println("Unknown target: " + target);
        projectHelp();
        return false;
    }
    println("Target: " + target);
    invoke(m, this, new Object[0]);
    return true;
}
Example 84
Project: platform_tools_adt_idea-master  File: LombokPsiConverterTest.java View source code
public void testAnnotation() {
    String testClass = "package test.pkg;\n" + "\n" + "import java.lang.annotation.Retention;\n" + "import java.lang.annotation.RetentionPolicy;\n" + "import java.lang.annotation.Target;\n" + "\n" + "import static java.lang.annotation.ElementType.ANNOTATION_TYPE;\n" + "import static java.lang.annotation.ElementType.FIELD;\n" + "import static java.lang.annotation.ElementType.METHOD;\n" + "import static java.lang.annotation.ElementType.PARAMETER;\n" + "import static java.lang.annotation.RetentionPolicy.CLASS;\n" + "import static java.lang.annotation.RetentionPolicy.SOURCE;\n" + "@Retention(CLASS)\n" + "@Target({ANNOTATION_TYPE})\n" + "public @interface R11 {\n" + "    long[] value();\n" + "    boolean flag();\n" + "}";
    PsiFile file = myFixture.addFileToProject("src/test/pkg/R11.java", testClass);
    check(file, testClass);
}
Example 85
Project: super-csv-annotation-master  File: AnnotationExpanderTest.java View source code
/**
     * ���アノテーション - 属性�オー�ライド���シンプル�物。
     */
@Test
public void testExpand_composeSimple() {
    Field field = getSampleField("composeSimple");
    Annotation targetAnno = field.getAnnotation(ComposeSimple.class);
    List<ExpandedAnnotation> actual = expander.expand(targetAnno);
    assertThat(actual).hasSize(1);
    {
        ExpandedAnnotation expandedAnno = actual.get(0);
        assertThat(expandedAnno.getOriginal()).isInstanceOf(ComposeSimple.class);
        assertThat(expandedAnno.getChilds()).hasSize(8);
        //            expandedAnno.getChilds().forEach(anno -> System.out.println(anno.getOriginal().annotationType().getName()));
        {
            ExpandedAnnotation childAnno = expandedAnno.getChilds().get(0);
            assertThat(childAnno.getOriginal()).isInstanceOf(CsvRequire.class);
        }
        {
            ExpandedAnnotation childAnno = expandedAnno.getChilds().get(1);
            assertThat(childAnno.getOriginal()).isInstanceOf(CsvNumberMax.class);
            assertThat(childAnno.getIndex()).isEqualTo(1);
            CsvNumberMax anno = (CsvNumberMax) childAnno.getOriginal();
            assertThat(anno.order()).isEqualTo(1);
            assertThat(anno.value()).isEqualTo("30");
        }
        {
            ExpandedAnnotation childAnno = expandedAnno.getChilds().get(2);
            assertThat(childAnno.getOriginal()).isInstanceOf(CsvNumberMax.class);
            assertThat(childAnno.getIndex()).isEqualTo(0);
            CsvNumberMax anno = (CsvNumberMax) childAnno.getOriginal();
            assertThat(anno.order()).isEqualTo(2);
            assertThat(anno.value()).isEqualTo("20");
        }
        {
            ExpandedAnnotation childAnno = expandedAnno.getChilds().get(3);
            assertThat(childAnno.getOriginal()).isInstanceOf(CsvComposition.class);
        }
        {
            ExpandedAnnotation childAnno = expandedAnno.getChilds().get(4);
            assertThat(childAnno.getOriginal()).isInstanceOf(Documented.class);
        }
        {
            ExpandedAnnotation childAnno = expandedAnno.getChilds().get(5);
            assertThat(childAnno.getOriginal()).isInstanceOf(Repeatable.class);
        }
        {
            ExpandedAnnotation childAnno = expandedAnno.getChilds().get(6);
            assertThat(childAnno.getOriginal()).isInstanceOf(Retention.class);
        }
        {
            ExpandedAnnotation childAnno = expandedAnno.getChilds().get(7);
            assertThat(childAnno.getOriginal()).isInstanceOf(Target.class);
        }
    }
}
Example 86
Project: emf-databinding-example-master  File: PannotationPackageImpl.java View source code
/**
	 * Complete the initialization of the package and its meta-model. This
	 * method is guarded to have no affect on any invocation but its first. <!--
	 * begin-user-doc --> <!-- end-user-doc -->
	 * 
	 * @generated
	 */
public void initializePackageContents() {
    if (isInitialized)
        return;
    isInitialized = true;
    // Initialize package
    setName(eNAME);
    setNsPrefix(eNS_PREFIX);
    setNsURI(eNS_URI);
    // Create type parameters
    // Set bounds for type parameters
    // Add supertypes to classes
    attributeOverrideEClass.getESuperTypes().add(this.getPAnnotation());
    associationOverrideEClass.getESuperTypes().add(this.getPAnnotation());
    basicEClass.getESuperTypes().add(this.getPAnnotation());
    columnEClass.getESuperTypes().add(this.getPAnnotation());
    discriminatorColumnEClass.getESuperTypes().add(this.getPAnnotation());
    discriminatorValueEClass.getESuperTypes().add(this.getPAnnotation());
    embeddableEClass.getESuperTypes().add(this.getPAnnotation());
    embeddedEClass.getESuperTypes().add(this.getPAnnotation());
    embeddedIdEClass.getESuperTypes().add(this.getPAnnotation());
    entityEClass.getESuperTypes().add(this.getPAnnotation());
    enumeratedEClass.getESuperTypes().add(this.getPAnnotation());
    generatedValueEClass.getESuperTypes().add(this.getPAnnotation());
    idEClass.getESuperTypes().add(this.getPAnnotation());
    idClassEClass.getESuperTypes().add(this.getPAnnotation());
    inheritanceEClass.getESuperTypes().add(this.getPAnnotation());
    joinColumnEClass.getESuperTypes().add(this.getPAnnotation());
    joinTableEClass.getESuperTypes().add(this.getPAnnotation());
    lobEClass.getESuperTypes().add(this.getPAnnotation());
    manyToManyEClass.getESuperTypes().add(this.getPAnnotation());
    manyToOneEClass.getESuperTypes().add(this.getPAnnotation());
    mapKeyEClass.getESuperTypes().add(this.getPAnnotation());
    mappedSuperclassEClass.getESuperTypes().add(this.getPAnnotation());
    oneToManyEClass.getESuperTypes().add(this.getPAnnotation());
    oneToOneEClass.getESuperTypes().add(this.getPAnnotation());
    orderByEClass.getESuperTypes().add(this.getPAnnotation());
    primaryKeyJoinColumnEClass.getESuperTypes().add(this.getPAnnotation());
    secondaryTableEClass.getESuperTypes().add(this.getPAnnotation());
    sequenceGeneratorEClass.getESuperTypes().add(this.getPAnnotation());
    tableEClass.getESuperTypes().add(this.getPAnnotation());
    tableGeneratorEClass.getESuperTypes().add(this.getPAnnotation());
    temporalEClass.getESuperTypes().add(this.getPAnnotation());
    transientEClass.getESuperTypes().add(this.getPAnnotation());
    uniqueConstraintEClass.getESuperTypes().add(this.getPAnnotation());
    versionEClass.getESuperTypes().add(this.getPAnnotation());
    foreignKeyEClass.getESuperTypes().add(this.getPAnnotation());
    sequenceStyleGeneratorEClass.getESuperTypes().add(this.getPAnnotation());
    externalEClass.getESuperTypes().add(this.getPAnnotation());
    // Initialize classes and features; add operations and parameters
    initEClass(pAnnotationEClass, PAnnotation.class, "PAnnotation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEReference(getPAnnotation_EModelElement(), ecorePackage.getEModelElement(), null, "eModelElement", null, 1, 1, PAnnotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(attributeOverrideEClass, AttributeOverride.class, "AttributeOverride", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getAttributeOverride_Name(), ecorePackage.getEString(), "name", null, 1, 1, AttributeOverride.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getAttributeOverride_Column(), this.getColumn(), null, "column", null, 1, 1, AttributeOverride.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(associationOverrideEClass, AssociationOverride.class, "AssociationOverride", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getAssociationOverride_Name(), ecorePackage.getEString(), "name", null, 1, 1, AssociationOverride.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getAssociationOverride_JoinColumns(), this.getJoinColumn(), null, "joinColumns", null, 1, -1, AssociationOverride.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(basicEClass, Basic.class, "Basic", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getBasic_Fetch(), this.getFetchType(), "fetch", "EAGER", 0, 1, Basic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getBasic_Optional(), ecorePackage.getEBoolean(), "optional", "true", 0, 1, Basic.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(columnEClass, Column.class, "Column", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getColumn_Name(), ecorePackage.getEString(), "name", null, 0, 1, Column.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getColumn_Unique(), ecorePackage.getEBoolean(), "unique", "false", 0, 1, Column.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getColumn_Nullable(), ecorePackage.getEBoolean(), "nullable", "true", 0, 1, Column.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getColumn_Insertable(), ecorePackage.getEBoolean(), "insertable", "true", 0, 1, Column.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getColumn_Updatable(), ecorePackage.getEBoolean(), "updatable", "true", 0, 1, Column.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getColumn_ColumnDefinition(), ecorePackage.getEString(), "columnDefinition", null, 0, 1, Column.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getColumn_Table(), ecorePackage.getEString(), "table", null, 0, 1, Column.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getColumn_Length(), ecorePackage.getEInt(), "length", "255", 0, 1, Column.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getColumn_Precision(), ecorePackage.getEInt(), "precision", "0", 0, 1, Column.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getColumn_Scale(), ecorePackage.getEInt(), "scale", "0", 0, 1, Column.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(discriminatorColumnEClass, DiscriminatorColumn.class, "DiscriminatorColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getDiscriminatorColumn_Name(), ecorePackage.getEString(), "name", "DTYPE", 0, 1, DiscriminatorColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getDiscriminatorColumn_DiscriminatorType(), this.getDiscriminatorType(), "discriminatorType", "STRING", 0, 1, DiscriminatorColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getDiscriminatorColumn_ColumnDefinition(), ecorePackage.getEString(), "columnDefinition", null, 0, 1, DiscriminatorColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getDiscriminatorColumn_Length(), ecorePackage.getEInt(), "length", "31", 0, 1, DiscriminatorColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(discriminatorValueEClass, DiscriminatorValue.class, "DiscriminatorValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getDiscriminatorValue_Value(), ecorePackage.getEString(), "value", null, 0, 1, DiscriminatorValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(embeddableEClass, Embeddable.class, "Embeddable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEClass(embeddedEClass, Embedded.class, "Embedded", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEClass(embeddedIdEClass, EmbeddedId.class, "EmbeddedId", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEClass(entityEClass, Entity.class, "Entity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getEntity_Name(), ecorePackage.getEString(), "name", null, 0, 1, Entity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getEntity_Extends(), ecorePackage.getEString(), "extends", null, 0, 1, Entity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(enumeratedEClass, Enumerated.class, "Enumerated", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getEnumerated_Value(), this.getEnumType(), "value", "ORDINAL", 0, 1, Enumerated.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(generatedValueEClass, GeneratedValue.class, "GeneratedValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getGeneratedValue_Strategy(), this.getGenerationType(), "strategy", "AUTO", 0, 1, GeneratedValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getGeneratedValue_Generator(), ecorePackage.getEString(), "generator", null, 0, 1, GeneratedValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(idEClass, Id.class, "Id", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEClass(idClassEClass, IdClass.class, "IdClass", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getIdClass_Value(), ecorePackage.getEString(), "value", null, 1, 1, IdClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(inheritanceEClass, Inheritance.class, "Inheritance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getInheritance_Strategy(), this.getInheritanceType(), "strategy", "SINGLE_TABLE", 0, 1, Inheritance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(joinColumnEClass, JoinColumn.class, "JoinColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getJoinColumn_Name(), ecorePackage.getEString(), "name", null, 0, 1, JoinColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getJoinColumn_ReferencedColumnName(), ecorePackage.getEString(), "referencedColumnName", null, 0, 1, JoinColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getJoinColumn_Unique(), ecorePackage.getEBoolean(), "unique", "false", 0, 1, JoinColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getJoinColumn_Nullable(), ecorePackage.getEBoolean(), "nullable", "true", 0, 1, JoinColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getJoinColumn_Insertable(), ecorePackage.getEBoolean(), "insertable", "true", 0, 1, JoinColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getJoinColumn_Updatable(), ecorePackage.getEBoolean(), "updatable", "true", 0, 1, JoinColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getJoinColumn_ColumnDefinition(), ecorePackage.getEString(), "columnDefinition", null, 0, 1, JoinColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getJoinColumn_Table(), ecorePackage.getEString(), "table", null, 0, 1, JoinColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(joinTableEClass, JoinTable.class, "JoinTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getJoinTable_Name(), ecorePackage.getEString(), "name", null, 0, 1, JoinTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getJoinTable_Catalog(), ecorePackage.getEString(), "catalog", null, 0, 1, JoinTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getJoinTable_Schema(), ecorePackage.getEString(), "schema", null, 0, 1, JoinTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getJoinTable_JoinColumns(), this.getJoinColumn(), null, "joinColumns", null, 0, -1, JoinTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getJoinTable_InverseJoinColumns(), this.getJoinColumn(), null, "inverseJoinColumns", null, 0, -1, JoinTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getJoinTable_UniqueConstraints(), this.getUniqueConstraint(), null, "uniqueConstraints", null, 0, -1, JoinTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(lobEClass, Lob.class, "Lob", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEClass(manyToManyEClass, ManyToMany.class, "ManyToMany", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getManyToMany_TargetEntity(), ecorePackage.getEString(), "targetEntity", null, 0, 1, ManyToMany.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getManyToMany_Cascade(), this.getCascadeType(), "cascade", null, 0, -1, ManyToMany.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getManyToMany_Fetch(), this.getFetchType(), "fetch", "LAZY", 0, 1, ManyToMany.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getManyToMany_MappedBy(), ecorePackage.getEString(), "mappedBy", null, 0, 1, ManyToMany.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getManyToMany_Indexed(), ecorePackage.getEBoolean(), "indexed", "true", 0, 1, ManyToMany.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(manyToOneEClass, ManyToOne.class, "ManyToOne", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getManyToOne_TargetEntity(), ecorePackage.getEString(), "targetEntity", null, 0, 1, ManyToOne.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getManyToOne_Cascade(), this.getCascadeType(), "cascade", null, 0, -1, ManyToOne.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getManyToOne_Fetch(), this.getFetchType(), "fetch", "EAGER", 0, 1, ManyToOne.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getManyToOne_Optional(), ecorePackage.getEBoolean(), "optional", "true", 0, 1, ManyToOne.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(mapKeyEClass, MapKey.class, "MapKey", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getMapKey_Name(), ecorePackage.getEString(), "name", null, 0, 1, MapKey.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(mappedSuperclassEClass, MappedSuperclass.class, "MappedSuperclass", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEClass(oneToManyEClass, OneToMany.class, "OneToMany", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getOneToMany_TargetEntity(), ecorePackage.getEString(), "targetEntity", null, 0, 1, OneToMany.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getOneToMany_Cascade(), this.getCascadeType(), "cascade", null, 0, -1, OneToMany.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getOneToMany_Fetch(), this.getFetchType(), "fetch", "LAZY", 0, 1, OneToMany.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getOneToMany_MappedBy(), ecorePackage.getEString(), "mappedBy", null, 0, 1, OneToMany.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getOneToMany_Indexed(), ecorePackage.getEBoolean(), "indexed", "true", 0, 1, OneToMany.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getOneToMany_Unique(), ecorePackage.getEBoolean(), "unique", "true", 0, 1, OneToMany.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(oneToOneEClass, OneToOne.class, "OneToOne", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getOneToOne_TargetEntity(), ecorePackage.getEString(), "targetEntity", null, 0, 1, OneToOne.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getOneToOne_Cascade(), this.getCascadeType(), "cascade", null, 0, -1, OneToOne.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getOneToOne_Fetch(), this.getFetchType(), "fetch", "EAGER", 0, 1, OneToOne.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getOneToOne_Optional(), ecorePackage.getEBoolean(), "optional", "true", 0, 1, OneToOne.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getOneToOne_MappedBy(), ecorePackage.getEString(), "mappedBy", null, 0, 1, OneToOne.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(orderByEClass, OrderBy.class, "OrderBy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getOrderBy_Value(), ecorePackage.getEString(), "value", null, 0, 1, OrderBy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(primaryKeyJoinColumnEClass, PrimaryKeyJoinColumn.class, "PrimaryKeyJoinColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getPrimaryKeyJoinColumn_Name(), ecorePackage.getEString(), "name", null, 0, 1, PrimaryKeyJoinColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getPrimaryKeyJoinColumn_ReferencedColumnName(), ecorePackage.getEString(), "referencedColumnName", null, 0, 1, PrimaryKeyJoinColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getPrimaryKeyJoinColumn_ColumnDefinition(), ecorePackage.getEString(), "columnDefinition", null, 0, 1, PrimaryKeyJoinColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(secondaryTableEClass, SecondaryTable.class, "SecondaryTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getSecondaryTable_Name(), ecorePackage.getEString(), "name", null, 1, 1, SecondaryTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getSecondaryTable_Catalog(), ecorePackage.getEString(), "catalog", null, 0, 1, SecondaryTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getSecondaryTable_Schema(), ecorePackage.getEString(), "schema", null, 0, 1, SecondaryTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getSecondaryTable_PkJoinColumns(), this.getPrimaryKeyJoinColumn(), null, "pkJoinColumns", null, 0, -1, SecondaryTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getSecondaryTable_UniqueConstraints(), this.getUniqueConstraint(), null, "uniqueConstraints", null, 0, -1, SecondaryTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(sequenceGeneratorEClass, SequenceGenerator.class, "SequenceGenerator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getSequenceGenerator_Name(), ecorePackage.getEString(), "name", null, 1, 1, SequenceGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getSequenceGenerator_SequenceName(), ecorePackage.getEString(), "sequenceName", null, 0, 1, SequenceGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getSequenceGenerator_InitialValue(), ecorePackage.getEInt(), "initialValue", "1", 0, 1, SequenceGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getSequenceGenerator_AllocationSize(), ecorePackage.getEInt(), "allocationSize", "50", 0, 1, SequenceGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(tableEClass, Table.class, "Table", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getTable_Name(), ecorePackage.getEString(), "name", null, 0, 1, Table.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getTable_Catalog(), ecorePackage.getEString(), "catalog", null, 0, 1, Table.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getTable_Schema(), ecorePackage.getEString(), "schema", null, 0, 1, Table.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getTable_UniqueConstraints(), this.getUniqueConstraint(), null, "uniqueConstraints", null, 0, -1, Table.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(tableGeneratorEClass, TableGenerator.class, "TableGenerator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getTableGenerator_Name(), ecorePackage.getEString(), "name", null, 1, 1, TableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getTableGenerator_Table(), ecorePackage.getEString(), "table", null, 0, 1, TableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getTableGenerator_Catalog(), ecorePackage.getEString(), "catalog", null, 0, 1, TableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getTableGenerator_Schema(), ecorePackage.getEString(), "schema", null, 0, 1, TableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getTableGenerator_PkColumnName(), ecorePackage.getEString(), "pkColumnName", null, 0, 1, TableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getTableGenerator_ValueColumnName(), ecorePackage.getEString(), "valueColumnName", null, 0, 1, TableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getTableGenerator_PkColumnValue(), ecorePackage.getEString(), "pkColumnValue", null, 0, 1, TableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getTableGenerator_InitialValue(), ecorePackage.getEInt(), "initialValue", "0", 0, 1, TableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getTableGenerator_AllocationSize(), ecorePackage.getEInt(), "allocationSize", "50", 0, 1, TableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEReference(getTableGenerator_UniqueConstraints(), this.getUniqueConstraint(), null, "uniqueConstraints", null, 0, -1, TableGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(temporalEClass, Temporal.class, "Temporal", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getTemporal_Value(), this.getTemporalType(), "value", "", 0, 1, Temporal.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(transientEClass, Transient.class, "Transient", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEClass(uniqueConstraintEClass, UniqueConstraint.class, "UniqueConstraint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getUniqueConstraint_ColumnNames(), ecorePackage.getEString(), "columnNames", null, 1, -1, UniqueConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(versionEClass, Version.class, "Version", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEClass(foreignKeyEClass, ForeignKey.class, "ForeignKey", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getForeignKey_Name(), ecorePackage.getEString(), "name", null, 0, 1, ForeignKey.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(sequenceStyleGeneratorEClass, SequenceStyleGenerator.class, "SequenceStyleGenerator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getSequenceStyleGenerator_Name(), ecorePackage.getEString(), "name", null, 1, 1, SequenceStyleGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getSequenceStyleGenerator_SequenceName(), ecorePackage.getEString(), "sequenceName", null, 0, 1, SequenceStyleGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getSequenceStyleGenerator_InitialValue(), ecorePackage.getEInt(), "initialValue", "1", 0, 1, SequenceStyleGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getSequenceStyleGenerator_IncrementSize(), ecorePackage.getEInt(), "incrementSize", "50", 0, 1, SequenceStyleGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEAttribute(getSequenceStyleGenerator_Optimizer(), this.getOptimizerType(), "optimizer", "NONE", 0, 1, SequenceStyleGenerator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    initEClass(externalEClass, External.class, "External", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
    initEAttribute(getExternal_Type(), ecorePackage.getEString(), "type", null, 0, 1, External.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    // Initialize enums and add enum literals
    initEEnum(cascadeTypeEEnum, CascadeType.class, "CascadeType");
    addEEnumLiteral(cascadeTypeEEnum, CascadeType.ALL);
    addEEnumLiteral(cascadeTypeEEnum, CascadeType.PERSIST);
    addEEnumLiteral(cascadeTypeEEnum, CascadeType.MERGE);
    addEEnumLiteral(cascadeTypeEEnum, CascadeType.REMOVE);
    addEEnumLiteral(cascadeTypeEEnum, CascadeType.REFRESH);
    addEEnumLiteral(cascadeTypeEEnum, CascadeType.NONE);
    initEEnum(discriminatorTypeEEnum, DiscriminatorType.class, "DiscriminatorType");
    addEEnumLiteral(discriminatorTypeEEnum, DiscriminatorType.STRING);
    addEEnumLiteral(discriminatorTypeEEnum, DiscriminatorType.CHAR);
    addEEnumLiteral(discriminatorTypeEEnum, DiscriminatorType.INTEGER);
    initEEnum(enumTypeEEnum, EnumType.class, "EnumType");
    addEEnumLiteral(enumTypeEEnum, EnumType.ORDINAL);
    addEEnumLiteral(enumTypeEEnum, EnumType.STRING);
    initEEnum(fetchTypeEEnum, FetchType.class, "FetchType");
    addEEnumLiteral(fetchTypeEEnum, FetchType.LAZY);
    addEEnumLiteral(fetchTypeEEnum, FetchType.EAGER);
    addEEnumLiteral(fetchTypeEEnum, FetchType.EXTRA);
    initEEnum(generationTypeEEnum, GenerationType.class, "GenerationType");
    addEEnumLiteral(generationTypeEEnum, GenerationType.TABLE);
    addEEnumLiteral(generationTypeEEnum, GenerationType.SEQUENCE);
    addEEnumLiteral(generationTypeEEnum, GenerationType.IDENTITY);
    addEEnumLiteral(generationTypeEEnum, GenerationType.AUTO);
    addEEnumLiteral(generationTypeEEnum, GenerationType.SEQUENCESTYLE);
    initEEnum(inheritanceTypeEEnum, InheritanceType.class, "InheritanceType");
    addEEnumLiteral(inheritanceTypeEEnum, InheritanceType.SINGLE_TABLE);
    addEEnumLiteral(inheritanceTypeEEnum, InheritanceType.TABLE_PER_CLASS);
    addEEnumLiteral(inheritanceTypeEEnum, InheritanceType.JOINED);
    initEEnum(temporalTypeEEnum, TemporalType.class, "TemporalType");
    addEEnumLiteral(temporalTypeEEnum, TemporalType.DATE);
    addEEnumLiteral(temporalTypeEEnum, TemporalType.TIME);
    addEEnumLiteral(temporalTypeEEnum, TemporalType.TIMESTAMP);
    initEEnum(optimizerTypeEEnum, OptimizerType.class, "OptimizerType");
    addEEnumLiteral(optimizerTypeEEnum, OptimizerType.NONE);
    addEEnumLiteral(optimizerTypeEEnum, OptimizerType.HILO);
    addEEnumLiteral(optimizerTypeEEnum, OptimizerType.POOLED);
    // Create resource
    createResource(eNS_URI);
    // Create annotations
    // http://www.eclipse.org/emf/2004/EmfaticAnnotationMap
    createEmfaticAnnotationMapAnnotations();
    // teneo.mapping.source
    createTeneoAnnotations();
    // http://www.eclipse.org/emf/2002/Ecore
    createEcoreAnnotations();
    // teneo/internal/PersistenceMapping
    createPersistenceMappingAnnotations();
    // teneo/internal/Target
    createTargetAnnotations();
    // teneo/PeristenceMapping
    createPeristenceMappingAnnotations();
}
Example 87
Project: classlib6-master  File: JavacProcessingEnvironment.java View source code
private Set<String> initPlatformAnnotations() {
    Set<String> platformAnnotations = new HashSet<String>();
    platformAnnotations.add("java.lang.Deprecated");
    platformAnnotations.add("java.lang.Override");
    platformAnnotations.add("java.lang.SuppressWarnings");
    platformAnnotations.add("java.lang.annotation.Documented");
    platformAnnotations.add("java.lang.annotation.Inherited");
    platformAnnotations.add("java.lang.annotation.Retention");
    platformAnnotations.add("java.lang.annotation.Target");
    return Collections.unmodifiableSet(platformAnnotations);
}
Example 88
Project: csu-code-analysis-master  File: JavacProcessingEnvironment.java View source code
private Set<String> initPlatformAnnotations() {
    Set<String> platformAnnotations = new HashSet<String>();
    platformAnnotations.add("java.lang.Deprecated");
    platformAnnotations.add("java.lang.Override");
    platformAnnotations.add("java.lang.SuppressWarnings");
    platformAnnotations.add("java.lang.annotation.Documented");
    platformAnnotations.add("java.lang.annotation.Inherited");
    platformAnnotations.add("java.lang.annotation.Retention");
    platformAnnotations.add("java.lang.annotation.Target");
    return Collections.unmodifiableSet(platformAnnotations);
}
Example 89
Project: DPJ-master  File: JavacProcessingEnvironment.java View source code
private Set<String> initPlatformAnnotations() {
    Set<String> platformAnnotations = new HashSet<String>();
    platformAnnotations.add("java.lang.Deprecated");
    platformAnnotations.add("java.lang.Override");
    platformAnnotations.add("java.lang.SuppressWarnings");
    platformAnnotations.add("java.lang.annotation.Documented");
    platformAnnotations.add("java.lang.annotation.Inherited");
    platformAnnotations.add("java.lang.annotation.Retention");
    platformAnnotations.add("java.lang.annotation.Target");
    return Collections.unmodifiableSet(platformAnnotations);
}
Example 90
Project: ikvm-openjdk-master  File: JavacProcessingEnvironment.java View source code
private Set<String> initPlatformAnnotations() {
    Set<String> platformAnnotations = new HashSet<String>();
    platformAnnotations.add("java.lang.Deprecated");
    platformAnnotations.add("java.lang.Override");
    platformAnnotations.add("java.lang.SuppressWarnings");
    platformAnnotations.add("java.lang.annotation.Documented");
    platformAnnotations.add("java.lang.annotation.Inherited");
    platformAnnotations.add("java.lang.annotation.Retention");
    platformAnnotations.add("java.lang.annotation.Target");
    return Collections.unmodifiableSet(platformAnnotations);
}
Example 91
Project: javac-openjdk7-master  File: JavacProcessingEnvironment.java View source code
private Set<String> initPlatformAnnotations() {
    Set<String> platformAnnotations = new HashSet<String>();
    platformAnnotations.add("java.lang.Deprecated");
    platformAnnotations.add("java.lang.Override");
    platformAnnotations.add("java.lang.SuppressWarnings");
    platformAnnotations.add("java.lang.annotation.Documented");
    platformAnnotations.add("java.lang.annotation.Inherited");
    platformAnnotations.add("java.lang.annotation.Retention");
    platformAnnotations.add("java.lang.annotation.Target");
    return Collections.unmodifiableSet(platformAnnotations);
}
Example 92
Project: javappp-master  File: JavacProcessingEnvironment.java View source code
private Set<String> initPlatformAnnotations() {
    Set<String> platformAnnotations = new HashSet<String>();
    platformAnnotations.add("java.lang.Deprecated");
    platformAnnotations.add("java.lang.Override");
    platformAnnotations.add("java.lang.SuppressWarnings");
    platformAnnotations.add("java.lang.annotation.Documented");
    platformAnnotations.add("java.lang.annotation.Inherited");
    platformAnnotations.add("java.lang.annotation.Retention");
    platformAnnotations.add("java.lang.annotation.Target");
    return Collections.unmodifiableSet(platformAnnotations);
}
Example 93
Project: jdk7u-langtools-master  File: JavacProcessingEnvironment.java View source code
private Set<String> initPlatformAnnotations() {
    Set<String> platformAnnotations = new HashSet<String>();
    platformAnnotations.add("java.lang.Deprecated");
    platformAnnotations.add("java.lang.Override");
    platformAnnotations.add("java.lang.SuppressWarnings");
    platformAnnotations.add("java.lang.annotation.Documented");
    platformAnnotations.add("java.lang.annotation.Inherited");
    platformAnnotations.add("java.lang.annotation.Retention");
    platformAnnotations.add("java.lang.annotation.Target");
    return Collections.unmodifiableSet(platformAnnotations);
}
Example 94
Project: ManagedRuntimeInitiative-master  File: JavacProcessingEnvironment.java View source code
private Set<String> initPlatformAnnotations() {
    Set<String> platformAnnotations = new HashSet<String>();
    platformAnnotations.add("java.lang.Deprecated");
    platformAnnotations.add("java.lang.Override");
    platformAnnotations.add("java.lang.SuppressWarnings");
    platformAnnotations.add("java.lang.annotation.Documented");
    platformAnnotations.add("java.lang.annotation.Inherited");
    platformAnnotations.add("java.lang.annotation.Retention");
    platformAnnotations.add("java.lang.annotation.Target");
    return Collections.unmodifiableSet(platformAnnotations);
}
Example 95
Project: OpenJDKJavaCompilerOnlyJavaSource-master  File: JavacProcessingEnvironment.java View source code
private Set<String> initPlatformAnnotations() {
    Set<String> platformAnnotations = new HashSet<String>();
    platformAnnotations.add("java.lang.Deprecated");
    platformAnnotations.add("java.lang.Override");
    platformAnnotations.add("java.lang.SuppressWarnings");
    platformAnnotations.add("java.lang.annotation.Documented");
    platformAnnotations.add("java.lang.annotation.Inherited");
    platformAnnotations.add("java.lang.annotation.Retention");
    platformAnnotations.add("java.lang.annotation.Target");
    return Collections.unmodifiableSet(platformAnnotations);
}
Example 96
Project: Spoon-master  File: AnnotationTest.java View source code
@Test
public void testPersistenceProperty() throws Exception {
    CtType<?> type = this.factory.Type().get("spoon.test.annotation.testclasses.PersistenceProperty");
    assertEquals("PersistenceProperty", type.getSimpleName());
    assertEquals(2, type.getAnnotations().size());
    CtAnnotation<Target> a1 = type.getAnnotation(type.getFactory().Type().createReference(Target.class));
    assertNotNull(a1);
    CtAnnotation<Retention> a2 = type.getAnnotation(type.getFactory().Type().createReference(Retention.class));
    assertNotNull(a2);
    assertTrue(a1.getValues().containsKey("value"));
    assertTrue(a2.getValues().containsKey("value"));
}
Example 97
Project: synthesijer-master  File: JavacProcessingEnvironment.java View source code
private Set<String> initPlatformAnnotations() {
    Set<String> platformAnnotations = new HashSet<String>();
    platformAnnotations.add("java.lang.Deprecated");
    platformAnnotations.add("java.lang.Override");
    platformAnnotations.add("java.lang.SuppressWarnings");
    platformAnnotations.add("java.lang.annotation.Documented");
    platformAnnotations.add("java.lang.annotation.Inherited");
    platformAnnotations.add("java.lang.annotation.Retention");
    platformAnnotations.add("java.lang.annotation.Target");
    return Collections.unmodifiableSet(platformAnnotations);
}
Example 98
Project: terminal-ide-master  File: JavacProcessingEnvironment.java View source code
private Set<String> initPlatformAnnotations() {
    Set<String> platformAnnotations = new HashSet<String>();
    platformAnnotations.add("java.lang.Deprecated");
    platformAnnotations.add("java.lang.Override");
    platformAnnotations.add("java.lang.SuppressWarnings");
    platformAnnotations.add("java.lang.annotation.Documented");
    platformAnnotations.add("java.lang.annotation.Inherited");
    platformAnnotations.add("java.lang.annotation.Retention");
    platformAnnotations.add("java.lang.annotation.Target");
    return Collections.unmodifiableSet(platformAnnotations);
}
Example 99
Project: TerminalIDE-master  File: JavacProcessingEnvironment.java View source code
private Set<String> initPlatformAnnotations() {
    Set<String> platformAnnotations = new HashSet<String>();
    platformAnnotations.add("java.lang.Deprecated");
    platformAnnotations.add("java.lang.Override");
    platformAnnotations.add("java.lang.SuppressWarnings");
    platformAnnotations.add("java.lang.annotation.Documented");
    platformAnnotations.add("java.lang.annotation.Inherited");
    platformAnnotations.add("java.lang.annotation.Retention");
    platformAnnotations.add("java.lang.annotation.Target");
    return Collections.unmodifiableSet(platformAnnotations);
}
Example 100
Project: cxf-master  File: SourceGenerator.java View source code
private void writeCustomHttpMethod(ContextInfo info, String classPackage, String methodName, StringBuilder mainCode, Set<String> mainImports) {
    mainCode.append("@").append(methodName);
    mainCode.append(getLineSep());
    mainCode.append(TAB);
    final String className = methodName;
    if (info.getResourceClassNames().contains(className)) {
        return;
    }
    info.getResourceClassNames().add(className);
    StringBuilder sbMethodClassImports = new StringBuilder();
    sbMethodClassImports.append(getClassComment()).append(getLineSep());
    sbMethodClassImports.append("package " + classPackage).append(";").append(getLineSep()).append(getLineSep());
    sbMethodClassImports.append("import java.lang.annotation.ElementType;").append(getLineSep());
    sbMethodClassImports.append("import java.lang.annotation.Retention;").append(getLineSep());
    sbMethodClassImports.append("import java.lang.annotation.RetentionPolicy;").append(getLineSep());
    sbMethodClassImports.append("import java.lang.annotation.Target;").append(getLineSep());
    sbMethodClassImports.append("import javax.ws.rs.HttpMethod;").append(getLineSep());
    StringBuilder sbMethodClassCode = new StringBuilder();
    sbMethodClassCode.append("@Target({ElementType.METHOD })").append(getLineSep());
    sbMethodClassCode.append("@Retention(RetentionPolicy.RUNTIME)").append(getLineSep());
    sbMethodClassCode.append("@HttpMethod(\"" + methodName + "\")").append(getLineSep());
    sbMethodClassCode.append("public @interface " + methodName);
    sbMethodClassCode.append(" {" + getLineSep() + getLineSep());
    sbMethodClassCode.append("}");
    createJavaSourceFile(info.getSrcDir(), new QName(classPackage, className), sbMethodClassCode, sbMethodClassImports, true);
}
Example 101
Project: maven-checkerframework-javac-master  File: ErrorMessageParserTest.java View source code
/**
     * Test that CRLF is parsed correctly wrt. the filename in warnings.
     *
     * @throws Exception
     */
public void testCRLF_windows() throws Exception {
    // This test is only relevant on windows (test hardcodes EOL)
    if (!Os.isFamily("windows")) {
        return;
    }
    String CRLF = new String(new byte[] { (byte) 0x0D, (byte) 0x0A });
    String errors = "warning: [options] bootstrap class path not set in conjunction with -source 1.6" + CRLF + "[parsing started RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpServerImpl.java]]" + CRLF + "[parsing completed 19ms]" + CRLF + "[parsing started RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpServer.java]]" + CRLF + "[parsing completed 1ms]" + CRLF + "[parsing started RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpServerAware.java]]" + CRLF + "[parsing completed 1ms]" + CRLF + "[parsing started RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpUtil.java]]" + CRLF + "[parsing completed 3ms]" + CRLF + "[parsing started RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpThreadPool.java]]" + CRLF + "[parsing completed 3ms]" + CRLF + "[parsing started RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpQueueAware.java]]" + CRLF + "[parsing completed 0ms]" + CRLF + "[parsing started RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpThreadPoolAware.java]]" + CRLF + "[parsing completed 1ms]" + CRLF + "[search path for source files: C:\\commander\\pre\\ec\\ec-http\\src\\main\\java]" + CRLF + "[search path for class files: C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\resources.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\rt.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\sunrsasign.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\jsse.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\jce.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\charsets.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\jfr.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\classes,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\ext\\dnsns.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\ext\\localedata.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\ext\\sunec.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\ext\\sunjce_provider.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\ext\\sunmscapi.jar,C:\\Program Files\\Java\\jdk1.7.0_04\\jre\\lib\\ext\\zipfs.jar,C:\\commander\\pre\\ec\\ec-http\\target\\classes,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-core\\1.0.0-SNAPSHOT\\ec-core-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-lock\\1.0.0-SNAPSHOT\\ec-lock-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-timer\\1.0.0-SNAPSHOT\\ec-timer-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\org\\apache\\commons\\commons-math\\2.2\\commons-math-2.2.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-validation\\1.0.0-SNAPSHOT\\ec-validation-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-xml\\1.0.0-SNAPSHOT\\ec-xml-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\commons-beanutils\\commons-beanutils\\1.8.3-PATCH1\\commons-beanutils-1.8.3-PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\commons-collections\\commons-collections\\3.2.1\\commons-collections-3.2.1.jar,C:\\Users\\anders\\.m2\\repository\\dom4j\\dom4j\\1.6.1-PATCH1\\dom4j-1.6.1-PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\javax\\validation\\validation-api\\1.0.0.GA\\validation-api-1.0.0.GA.jar,C:\\Users\\anders\\.m2\\repository\\org\\codehaus\\jackson\\jackson-core-asl\\1.9.7\\jackson-core-asl-1.9.7.jar,C:\\Users\\anders\\.m2\\repository\\org\\codehaus\\jackson\\jackson-mapper-asl\\1.9.7\\jackson-mapper-asl-1.9.7.jar,C:\\Users\\anders\\.m2\\repository\\org\\hibernate\\hibernate-core\\3.6.7-PATCH14\\hibernate-core-3.6.7-PATCH14.jar,C:\\Users\\anders\\.m2\\repository\\antlr\\antlr\\2.7.6\\antlr-2.7.6.jar,C:\\Users\\anders\\.m2\\repository\\org\\hibernate\\hibernate-commons-annotations\\3.2.0.Final\\hibernate-commons-annotations-3.2.0.Final.jar,C:\\Users\\anders\\.m2\\repository\\javax\\transaction\\jta\\1.1\\jta-1.1.jar,C:\\Users\\anders\\.m2\\repository\\org\\hibernate\\javax\\persistence\\hibernate-jpa-2.0-api\\1.0.1.Final\\hibernate-jpa-2.0-api-1.0.1.Final.jar,C:\\Users\\anders\\.m2\\repository\\org\\hyperic\\sigar\\1.6.5.132\\sigar-1.6.5.132.jar,C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-context\\3.1.1.RELEASE-PATCH1\\spring-context-3.1.1.RELEASE-PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-expression\\3.1.1.RELEASE-PATCH1\\spring-expression-3.1.1.RELEASE-PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-core\\3.1.1.RELEASE-PATCH1\\spring-core-3.1.1.RELEASE-PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\tanukisoft\\wrapper\\3.5.14\\wrapper-3.5.14.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-log\\1.0.0-SNAPSHOT\\ec-log-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\ch\\qos\\logback\\logback-classic\\1.0.3-PATCH4\\logback-classic-1.0.3-PATCH4.jar,C:\\Users\\anders\\.m2\\repository\\ch\\qos\\logback\\logback-core\\1.0.3-PATCH4\\logback-core-1.0.3-PATCH4.jar,C:\\Users\\anders\\.m2\\repository\\org\\slf4j\\slf4j-api\\1.6.4\\slf4j-api-1.6.4.jar,C:\\Users\\anders\\.m2\\repository\\org\\slf4j\\jul-to-slf4j\\1.6.4\\jul-to-slf4j-1.6.4.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-queue\\1.0.0-SNAPSHOT\\ec-queue-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-security\\1.0.0-SNAPSHOT\\ec-security-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-acl\\1.0.0-SNAPSHOT\\ec-acl-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-transaction\\1.0.0-SNAPSHOT\\ec-transaction-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\org\\aspectj\\aspectjrt\\1.7.0.M1-PATCH1\\aspectjrt-1.7.0.M1-PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-crypto\\1.0.0-SNAPSHOT\\ec-crypto-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\org\\bouncycastle\\bcprov-jdk16\\1.46\\bcprov-jdk16-1.46.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-property\\1.0.0-SNAPSHOT\\ec-property-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\org\\apache\\commons\\commons-lang3\\3.1\\commons-lang3-3.1.jar,C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-tx\\3.1.1.RELEASE-PATCH1\\spring-tx-3.1.1.RELEASE-PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\org\\aopalliance\\com.springsource.org.aopalliance\\1.0.0\\com.springsource.org.aopalliance-1.0.0.jar,C:\\Users\\anders\\.m2\\repository\\org\\springframework\\ldap\\spring-ldap-core\\1.3.1.RELEASE\\spring-ldap-core-1.3.1.RELEASE.jar,C:\\Users\\anders\\.m2\\repository\\commons-lang\\commons-lang\\2.5\\commons-lang-2.5.jar,C:\\Users\\anders\\.m2\\repository\\org\\springframework\\security\\spring-security-core\\2.0.6.PATCH1\\spring-security-core-2.0.6.PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-util\\1.0.0-SNAPSHOT\\ec-util-1.0.0-SNAPSHOT.jar,C:\\Users\\anders\\.m2\\repository\\cglib\\cglib-nodep\\2.2.2\\cglib-nodep-2.2.2.jar,C:\\Users\\anders\\.m2\\repository\\org\\apache\\commons\\commons-digester3\\3.2-PATCH5\\commons-digester3-3.2-PATCH5.jar,C:\\Users\\anders\\.m2\\repository\\cglib\\cglib\\2.2.2\\cglib-2.2.2.jar,C:\\Users\\anders\\.m2\\repository\\asm\\asm\\3.3.1\\asm-3.3.1.jar,C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-aop\\3.1.1.RELEASE-PATCH1\\spring-aop-3.1.1.RELEASE-PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\com\\google\\guava\\guava\\12.0\\guava-12.0.jar,C:\\Users\\anders\\.m2\\repository\\com\\google\\code\\findbugs\\jsr305\\2.0.0\\jsr305-2.0.0.jar,C:\\Users\\anders\\.m2\\repository\\com\\intellij\\annotations\\116.108\\annotations-116.108.jar,C:\\Users\\anders\\.m2\\repository\\commons-io\\commons-io\\2.3\\commons-io-2.3.jar,C:\\Users\\anders\\.m2\\repository\\net\\jcip\\jcip-annotations\\1.0\\jcip-annotations-1.0.jar,C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar,C:\\Users\\anders\\.m2\\repository\\commons-codec\\commons-codec\\1.6\\commons-codec-1.6.jar,C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar,C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar,C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\orbit\\javax.servlet\\3.0.0.v201112011016\\javax.servlet-3.0.0.v201112011016.jar,C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-continuation\\8.1.4.v20120524\\jetty-continuation-8.1.4.v20120524.jar,C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-http\\8.1.4.v20120524\\jetty-http-8.1.4.v20120524.jar,C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-io\\8.1.4.v20120524\\jetty-io-8.1.4.v20120524.jar,C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-util\\8.1.4.v20120524\\jetty-util-8.1.4.v20120524.jar,C:\\Users\\anders\\.m2\\repository\\org\\mortbay\\jetty\\servlet-api\\3.0.20100224\\servlet-api-3.0.20100224.jar,C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-beans\\3.1.1.RELEASE-PATCH1\\spring-beans-3.1.1.RELEASE-PATCH1.jar,C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-asm\\3.1.1.RELEASE-PATCH1\\spring-asm-3.1.1.RELEASE-PATCH1.jar,.]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/net/BindException.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/ArrayList.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/Collection.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/Collections.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/HashSet.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/concurrent/TimeUnit.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/Handler.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/Server.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/nio/SelectChannelConnector.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/ssl/SslSelectChannelConnector.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-util\\8.1.4.v20120524\\jetty-util-8.1.4.v20120524.jar(org/eclipse/jetty/util/ssl/SslContextFactory.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\intellij\\annotations\\116.108\\annotations-116.108.jar(org/jetbrains/annotations/NonNls.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\intellij\\annotations\\116.108\\annotations-116.108.jar(org/jetbrains/annotations/NotNull.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\intellij\\annotations\\116.108\\annotations-116.108.jar(org/jetbrains/annotations/TestOnly.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-beans\\3.1.1.RELEASE-PATCH1\\spring-beans-3.1.1.RELEASE-PATCH1.jar(org/springframework/beans/factory/BeanNameAware.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-beans\\3.1.1.RELEASE-PATCH1\\spring-beans-3.1.1.RELEASE-PATCH1.jar(org/springframework/beans/factory/annotation/Autowired.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\google\\guava\\guava\\12.0\\guava-12.0.jar(com/google/common/collect/Iterables.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-log\\1.0.0-SNAPSHOT\\ec-log-1.0.0-SNAPSHOT.jar(com/electriccloud/log/Log.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-log\\1.0.0-SNAPSHOT\\ec-log-1.0.0-SNAPSHOT.jar(com/electriccloud/log/LogFactory.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-core\\1.0.0-SNAPSHOT\\ec-core-1.0.0-SNAPSHOT.jar(com/electriccloud/service/ServiceManager.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-core\\1.0.0-SNAPSHOT\\ec-core-1.0.0-SNAPSHOT.jar(com/electriccloud/service/ServiceState.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-util\\1.0.0-SNAPSHOT\\ec-util-1.0.0-SNAPSHOT.jar(com/electriccloud/util/ExceptionUtil.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-util\\1.0.0-SNAPSHOT\\ec-util-1.0.0-SNAPSHOT.jar(com/electriccloud/util/SystemUtil.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-util\\1.0.0-SNAPSHOT\\ec-util-1.0.0-SNAPSHOT.jar(com/electriccloud/util/ToString.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-util\\1.0.0-SNAPSHOT\\ec-util-1.0.0-SNAPSHOT.jar(com/electriccloud/util/ToStringSupport.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/String.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Object.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/io/Serializable.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Comparable.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/CharSequence.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Enum.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-util\\1.0.0-SNAPSHOT\\ec-util-1.0.0-SNAPSHOT.jar(com/electriccloud/util/ToStringAware.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\springframework\\spring-beans\\3.1.1.RELEASE-PATCH1\\spring-beans-3.1.1.RELEASE-PATCH1.jar(org/springframework/beans/factory/Aware.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-core\\1.0.0-SNAPSHOT\\ec-core-1.0.0-SNAPSHOT.jar(com/electriccloud/service/Service.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Integer.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/concurrent/RejectedExecutionException.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-util\\8.1.4.v20120524\\jetty-util-8.1.4.v20120524.jar(org/eclipse/jetty/util/component/AbstractLifeCycle.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-util\\8.1.4.v20120524\\jetty-util-8.1.4.v20120524.jar(org/eclipse/jetty/util/thread/ThreadPool.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-queue\\1.0.0-SNAPSHOT\\ec-queue-1.0.0-SNAPSHOT.jar(com/electriccloud/queue/ExecuteQueue.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-core\\1.0.0-SNAPSHOT\\ec-core-1.0.0-SNAPSHOT.jar(com/electriccloud/service/ServiceManagerAware.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-util\\1.0.0-SNAPSHOT\\ec-util-1.0.0-SNAPSHOT.jar(com/electriccloud/util/ToStringImpl.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-util\\8.1.4.v20120524\\jetty-util-8.1.4.v20120524.jar(org/eclipse/jetty/util/component/LifeCycle.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/InterruptedException.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Runnable.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Exception.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/io/IOException.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/security/KeyManagementException.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/security/NoSuchAlgorithmException.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/security/SecureRandom.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/javax/net/ssl/SSLContext.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/javax/net/ssl/TrustManager.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/HttpResponse.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/client/HttpClient.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/client/methods/HttpGet.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/client/methods/HttpPost.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/client/methods/HttpUriRequest.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/scheme/Scheme.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/ssl/SSLSocketFactory.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/entity/StringEntity.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/impl/client/DefaultConnectionKeepAliveStrategy.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/impl/client/DefaultHttpClient.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/impl/client/DefaultHttpRequestRetryHandler.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.class)]]" + CRLF + "C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpUtil.java:31: warning: [deprecation] ThreadSafeClientConnManager in org.apache.http.impl.conn.tsccm has been deprecated" + CRLF + "import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;" + CRLF + "                                      ^" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/params/HttpParams.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/protocol/HttpContext.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/util/EntityUtils.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-security\\1.0.0-SNAPSHOT\\ec-security-1.0.0-SNAPSHOT.jar(com/electriccloud/security/DummyX509TrustManager.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/scheme/SchemeLayeredSocketFactory.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/scheme/SchemeSocketFactory.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/scheme/LayeredSchemeSocketFactory.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/scheme/LayeredSocketFactory.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/scheme/SocketFactory.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/params/CoreConnectionPNames.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/SuppressWarnings.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/annotation/Retention.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/annotation/RetentionPolicy.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/annotation/Target.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/annotation/ElementType.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\google\\guava\\guava\\12.0\\guava-12.0.jar(com/google/common/annotations/GwtCompatible.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\google\\guava\\guava\\12.0\\guava-12.0.jar(com/google/common/annotations/GwtIncompatible.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\com\\electriccloud\\ec-core\\1.0.0-SNAPSHOT\\ec-core-1.0.0-SNAPSHOT.jar(com/electriccloud/infoset/InfosetType.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/annotation/Annotation.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Override.class)]]" + CRLF + "[checking com.electriccloud.http.HttpServerImpl]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Error.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Throwable.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/RuntimeException.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/AutoCloseable.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Class.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Number.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/AbstractList.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/AbstractCollection.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Iterable.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Byte.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Character.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Short.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/nio/AbstractNIOConnector.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/AbstractConnector.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-util\\8.1.4.v20120524\\jetty-util-8.1.4.v20120524.jar(org/eclipse/jetty/util/component/AggregateLifeCycle.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/Connector.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-util\\8.1.4.v20120524\\jetty-util-8.1.4.v20120524.jar(org/eclipse/jetty/util/component/Destroyable.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-util\\8.1.4.v20120524\\jetty-util-8.1.4.v20120524.jar(org/eclipse/jetty/util/component/Dumpable.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-http\\8.1.4.v20120524\\jetty-http-8.1.4.v20120524.jar(org/eclipse/jetty/http/HttpBuffers.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/handler/HandlerWrapper.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/handler/AbstractHandlerContainer.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\eclipse\\jetty\\jetty-server\\8.1.4.v20120524\\jetty-server-8.1.4.v20120524.jar(org/eclipse/jetty/server/handler/AbstractHandler.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/net/SocketException.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Thread.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/IllegalStateException.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/AbstractSet.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/Iterator.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/IllegalArgumentException.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/Locale.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Long.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Float.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Double.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Boolean.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/Void.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/AssertionError.class)]]" + CRLF + "[wrote RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\target\\classes\\com\\electriccloud\\http\\HttpServerImpl.class]]" + CRLF + "[checking com.electriccloud.http.HttpServer]" + CRLF + "[wrote RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\target\\classes\\com\\electriccloud\\http\\HttpServer.class]]" + CRLF + "[checking com.electriccloud.http.HttpThreadPoolAware]" + CRLF + "[wrote RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\target\\classes\\com\\electriccloud\\http\\HttpThreadPoolAware.class]]" + CRLF + "[checking com.electriccloud.http.HttpThreadPool]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/concurrent/Future.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/concurrent/Callable.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/util/Date.class)]]" + CRLF + "[wrote RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\target\\classes\\com\\electriccloud\\http\\HttpThreadPool.class]]" + CRLF + "[checking com.electriccloud.http.HttpQueueAware]" + CRLF + "[wrote RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\target\\classes\\com\\electriccloud\\http\\HttpQueueAware.class]]" + CRLF + "[checking com.electriccloud.http.HttpServerAware]" + CRLF + "[wrote RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\target\\classes\\com\\electriccloud\\http\\HttpServerAware.class]]" + CRLF + "[checking com.electriccloud.http.HttpUtil]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/net/URI.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/client/methods/HttpRequestBase.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/message/AbstractHttpMessage.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/HttpMessage.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/impl/client/AbstractHttpClient.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/annotation/GuardedBy.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/client/ResponseHandler.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/client/ClientProtocolException.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/HttpEntity.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/client/methods/HttpEntityEnclosingRequestBase.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/entity/AbstractHttpEntity.class)]]" + CRLF + "C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpUtil.java:151: warning: [deprecation] ThreadSafeClientConnManager in org.apache.http.impl.conn.tsccm has been deprecated" + CRLF + "        ThreadSafeClientConnManager connectionManager =" + CRLF + "        ^" + CRLF + "C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpUtil.java:152: warning: [deprecation] ThreadSafeClientConnManager in org.apache.http.impl.conn.tsccm has been deprecated" + CRLF + "            new ThreadSafeClientConnManager();" + CRLF + "                ^" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/security/GeneralSecurityException.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/javax/net/ssl/X509TrustManager.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/security/KeyException.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/ssl/X509HostnameVerifier.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/javax/net/ssl/SSLSocketFactory.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/scheme/HostNameResolver.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/javax/net/ssl/HostnameVerifier.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/ssl/TrustStrategy.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/security/KeyStore.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/scheme/SchemeRegistry.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/ClientConnectionManager.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/client/HttpRequestRetryHandler.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpclient\\4.2\\httpclient-4.2.jar(org/apache/http/conn/ConnectionKeepAliveStrategy.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Users\\anders\\.m2\\repository\\org\\apache\\httpcomponents\\httpcore\\4.2\\httpcore-4.2.jar(org/apache/http/ParseException.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/io/UnsupportedEncodingException.class)]]" + CRLF + "[wrote RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\target\\classes\\com\\electriccloud\\http\\HttpUtil$1.class]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/StringBuilder.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/AbstractStringBuilder.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/java/lang/StringBuffer.class)]]" + CRLF + "[loading ZipFileIndexFileObject[C:\\Program Files\\Java\\jdk1.7.0_04\\lib\\ct.sym(META-INF/sym/rt.jar/javax/net/ssl/KeyManager.class)]]" + CRLF + "[wrote RegularFileObject[C:\\commander\\pre\\ec\\ec-http\\target\\classes\\com\\electriccloud\\http\\HttpUtil.class]]" + CRLF + "[total 654ms]" + CRLF + "4 warnings" + CRLF;
    List<CompilerMessage> compilerErrors = JavacJSR308Compiler.parseModernStream(0, new BufferedReader(new StringReader(errors)));
    assertEquals("count", 3, compilerErrors.size());
    CompilerMessage error1 = compilerErrors.get(0);
    assertEquals("file", "C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpUtil.java", error1.getFile());
    assertEquals("message", "[deprecation] ThreadSafeClientConnManager in org.apache.http.impl.conn.tsccm has been deprecated", error1.getMessage());
    assertEquals("line", 31, error1.getStartLine());
    assertEquals("column", 38, error1.getStartColumn());
    CompilerMessage error2 = compilerErrors.get(1);
    assertEquals("file", "C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpUtil.java", error2.getFile());
    assertEquals("message", "[deprecation] ThreadSafeClientConnManager in org.apache.http.impl.conn.tsccm has been deprecated", error2.getMessage());
    assertEquals("line", 151, error2.getStartLine());
    assertEquals("column", 8, error2.getStartColumn());
    CompilerMessage error3 = compilerErrors.get(2);
    assertEquals("file", "C:\\commander\\pre\\ec\\ec-http\\src\\main\\java\\com\\electriccloud\\http\\HttpUtil.java", error3.getFile());
    assertEquals("message", "[deprecation] ThreadSafeClientConnManager in org.apache.http.impl.conn.tsccm has been deprecated", error3.getMessage());
    assertEquals("line", 152, error3.getStartLine());
    assertEquals("column", 16, error3.getStartColumn());
}