few javadoc warnings

Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
diff --git a/jaxb-ri/bundles/jxc/src/main/java/module-info.java b/jaxb-ri/bundles/jxc/src/main/java/module-info.java
index 1a4b6de..bf24aa6 100644
--- a/jaxb-ri/bundles/jxc/src/main/java/module-info.java
+++ b/jaxb-ri/bundles/jxc/src/main/java/module-info.java
@@ -18,6 +18,7 @@
 
     exports com.sun.tools.jxc;
     exports com.sun.tools.jxc.ap;
-    exports com.sun.tools.jxc.model.nav;
     exports com.sun.tools.jxc.api;
+    exports com.sun.tools.jxc.gen.config;
+    exports com.sun.tools.jxc.model.nav;
 }
diff --git a/jaxb-ri/bundles/runtime/src/main/java/module-info.java b/jaxb-ri/bundles/runtime/src/main/java/module-info.java
index 04fbf6e..ab107f6 100644
--- a/jaxb-ri/bundles/runtime/src/main/java/module-info.java
+++ b/jaxb-ri/bundles/runtime/src/main/java/module-info.java
@@ -28,6 +28,8 @@
     exports org.glassfish.jaxb.runtime.v2.model.impl;
     exports org.glassfish.jaxb.runtime.v2.model.runtime;
     exports org.glassfish.jaxb.runtime.v2.runtime;
+    exports org.glassfish.jaxb.runtime.v2.runtime.output;
+    exports org.glassfish.jaxb.runtime.v2.runtime.property;
     exports org.glassfish.jaxb.runtime.v2.runtime.reflect;
     exports org.glassfish.jaxb.runtime.v2.runtime.unmarshaller;
     exports org.glassfish.jaxb.runtime.v2.schemagen;
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ApBasedTask.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ApBasedTask.java
index a4784ba..4eb6784 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ApBasedTask.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ApBasedTask.java
@@ -42,6 +42,7 @@
 
     /**
      * Implemented by the derived class to set up command line switches passed to annotation processing.
+     * @param cmd command line
      */
     protected abstract void setupCommandlineSwitches(Commandline cmd);
 
@@ -114,6 +115,7 @@
 
     /**
      * Creates a factory that does the actual job.
+     * @return a factory
      */
     protected abstract Processor getProcessor();
 
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ConfigReader.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ConfigReader.java
index 53dd51f..0898571 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ConfigReader.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/ConfigReader.java
@@ -70,10 +70,14 @@
 
     /**
      *
+     * @param env
+     *      The ProcessingEnvironment
      * @param classes
      *      The set of classes passed to the AnnotationProcessor
      * @param xmlFile
      *      The configuration file.
+     * @param errorHandler
+     *      The error handler
      * @throws SAXException
      *      If this is thrown, the error has already been reported.
      * @throws IOException
@@ -89,6 +93,13 @@
 
     }
 
+    /**
+     * Return collection of classes to be included based on the configuration.
+     * @return to be included classes.
+     */
+    public Collection<Reference> getClassesToBeIncluded() {
+        return classesToBeIncluded;
+    }
 
     /**
      * This creates a regular expression
@@ -98,10 +109,6 @@
      * after applying those patterns
      *
      */
-    public Collection<Reference> getClassesToBeIncluded() {
-        return classesToBeIncluded;
-    }
-
     private void checkAllClasses(Config config, Collection<? extends TypeElement> rootClasses) {
 
         List<Pattern> includeRegexList = config.getClasses().getIncludes();
@@ -130,6 +137,7 @@
 
     /**
      * This returns the SchemaOutputResolver to generate the schemas
+     * @return schema output resolver
      */
     public SchemaOutputResolver getSchemaOutputResolver(){
         return schemaOutputResolver;
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/NGCCRuntimeEx.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/NGCCRuntimeEx.java
index 931a972..dc611ca 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/NGCCRuntimeEx.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/NGCCRuntimeEx.java
@@ -46,6 +46,7 @@
      *    The baseDir attribute passed by the user in the xml config file as a path
      * @return
      *     The file representation of the path name
+     * @throws SAXException if provided {@code basedir} does not exist
      */
     public File getBaseDir(String baseDir) throws SAXException {
         File dir = new File(baseDir);
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/SchemaGenerator.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/SchemaGenerator.java
index e79438a..8518490 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/SchemaGenerator.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/SchemaGenerator.java
@@ -47,11 +47,20 @@
 
     /**
      * Runs the schema generator.
+     * @param args command line arguments
+     * @throws java.lang.Exception for error
      */
     public static void main(String[] args) throws Exception {
         System.exit(run(args));
     }
 
+    /**
+     * Runs the schema generator.
+     * @param args command line arguments
+     * @return
+     *      exit code. 0 if success.
+     * @throws java.lang.Exception for error
+     */
     public static int run(String[] args) throws Exception {
         try {
             ClassLoader cl = SecureLoader.getClassClassLoader(SchemaGenerator.class);
@@ -68,6 +77,7 @@
     /**
      * Runs the schema generator.
      *
+     * @param args arguments for the schema generator
      * @param classLoader
      *      the schema generator will run in this classLoader.
      *      It needs to be able to load annotation processing and JAXB RI classes. Note that
@@ -75,6 +85,10 @@
      *
      * @return
      *      exit code. 0 if success.
+     * @throws java.lang.ClassNotFoundException if {@link Runner} cannot be found
+     * @throws java.lang.NoSuchMethodException if {@link Runner#compile(java.lang.String[], java.io.File) } cannot be found
+     * @throws java.lang.IllegalAccessException if {@link Runner#compile(java.lang.String[], java.io.File) } cannot be accessed
+     * @throws java.lang.reflect.InvocationTargetException if {@link Runner#compile(java.lang.String[], java.io.File) } cannot be invoked
      *
      */
     public static int run(String[] args, ClassLoader classLoader) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
@@ -115,7 +129,7 @@
         Class<?> schemagenRunner = classLoader.loadClass(Runner.class.getName());
         Method compileMethod = schemagenRunner.getDeclaredMethod("compile",String[].class,File.class);
 
-        List<String> aptargs = new ArrayList<String>();
+        List<String> aptargs = new ArrayList<>();
 
         if (options.encoding != null) {
             aptargs.add("-encoding");
@@ -214,7 +228,7 @@
         public static boolean compile(String[] args, File episode) throws Exception {
 
             JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
-            DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>();
+            DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<>();
             StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnostics, null, null);
             JavacOptions options = JavacOptions.parse(compiler, fileManager, args);
             List<String> unrecognizedOptions = options.getUnrecognizedOptions();
@@ -260,10 +274,10 @@
         }
 
         public static JavacOptions parse(OptionChecker primary, OptionChecker secondary, String... arguments) {
-            List<String> recognizedOptions = new ArrayList<String>();
-            List<String> unrecognizedOptions = new ArrayList<String>();
-            List<String> classNames = new ArrayList<String>();
-            List<File> files = new ArrayList<File>();
+            List<String> recognizedOptions = new ArrayList<>();
+            List<String> unrecognizedOptions = new ArrayList<>();
+            List<String> classNames = new ArrayList<>();
+            List<File> files = new ArrayList<>();
             for (int i = 0; i < arguments.length; i++) {
                 String argument = arguments[i];
                 int optionCount = primary.isSupportedOption(argument);
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/NGCCRuntime.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/NGCCRuntime.java
index 230c8aa..2542220 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/NGCCRuntime.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/gen/config/NGCCRuntime.java
@@ -61,6 +61,7 @@
      * pattern will be used as the root handler, but any NGCCHandler
      * can be a root handler.
      *
+     * @param rootHandler new root handler
      * @exception IllegalStateException
      *      If this method is called but it doesn't satisfy the
      *      pre-condition stated above.
@@ -105,6 +106,7 @@
      * <p>
      * One can call this method from RelaxNGCC handlers to access
      * the line number information. Note that to
+     * @return the source location of the current event
      */
     public Locator getLocator() { return locator; }
 
@@ -121,6 +123,7 @@
      * this method. RelaxNGCC internally removes processed attributes,
      * so this doesn't correctly reflect all the attributes an element
      * carries.
+     * @return Attributes that belong to the current element
      */
     public Attributes getCurrentAttributes() {
         return currentAtts;
@@ -249,16 +252,28 @@
      * because the processing of the enterElement event can trigger
      * other attribute events and etc.
      * <p>
-     * This method will be called from one of handlers when it truely
+     * This method will be called from one of handlers when it truly
      * consumes the enterElement event.
+     * @param uri Parameter passed to the element event.
+     * @param localName Parameter passed to the element event.
+     * @param qname Parameter passed to the element event.
+     * @param atts Parameter passed to the element event.
+     * @throws SAXException for errors
+     * 
      */
     public void onEnterElementConsumed(
             String uri, String localName, String qname,Attributes atts) throws SAXException {
         attStack.push(currentAtts=new AttributesImpl(atts));
-        nsEffectiveStack.push( Integer.valueOf(nsEffectivePtr) );
+        nsEffectiveStack.push(nsEffectivePtr);
         nsEffectivePtr = namespaces.size();
     }
 
+    /**
+     * @param uri Parameter passed to the element event.
+     * @param localName Parameter passed to the element event.
+     * @param qname Parameter passed to the element event.
+     * @throws SAXException for errors
+     */
     public void onLeaveElementConsumed(String uri, String localName, String qname) throws SAXException {
         attStack.pop();
         if(attStack.isEmpty())
@@ -449,8 +464,15 @@
      * Currently active NGCCHandler will only receive the leaveElement
      * event of the newly started element.
      *
-     * @param   uri,local,qname
-     *      Parameters passed to the enter element event. Used to
+     * @param child the new ContentHandler
+     * @param uri
+     *      Parameter passed to the enter element event. Used to
+     *      simulate the startElement event for the new ContentHandler.
+     * @param local
+     *      Parameter passed to the enter element event. Used to
+     *      simulate the startElement event for the new ContentHandler.
+     * @param qname
+     *      Parameter passed to the enter element event. Used to
      *      simulate the startElement event for the new ContentHandler.
      */
     public void redirectSubtree( ContentHandler child,
@@ -527,8 +549,8 @@
                 "Unexpected {0} appears at line {1} column {2}",
                 new Object[]{
                         token,
-                        Integer.valueOf(getLocator().getLineNumber()),
-                        Integer.valueOf(getLocator().getColumnNumber()) }),
+                    getLocator().getLineNumber(),
+                    getLocator().getColumnNumber() }),
                 getLocator());
     }
 
diff --git a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/model/nav/ApNavigator.java b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/model/nav/ApNavigator.java
index 5299931..7c1cd58 100644
--- a/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/model/nav/ApNavigator.java
+++ b/jaxb-ri/jxc/src/main/java/com/sun/tools/jxc/model/nav/ApNavigator.java
@@ -368,7 +368,7 @@
         return t.getKind().isPrimitive();
     }
 
-    private static final Map<Class, TypeKind> primitives = new HashMap<Class, TypeKind>();
+    private static final Map<Class<?>, TypeKind> primitives = new HashMap<>();
 
     static {
         primitives.put(Integer.TYPE, TypeKind.INT);
diff --git a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/JAXBRIContext.java b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/JAXBRIContext.java
index f3ed546..2ebeef0 100644
--- a/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/JAXBRIContext.java
+++ b/jaxb-ri/runtime/impl/src/main/java/org/glassfish/jaxb/runtime/api/JAXBRIContext.java
@@ -124,11 +124,11 @@
         if (subclassReplacements != null) properties.put(JAXBRIContext.SUBCLASS_REPLACEMENTS, subclassReplacements);
         if (defaultNamespaceRemap != null) properties.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, defaultNamespaceRemap);
         if (ar != null) properties.put(JAXBRIContext.ANNOTATION_READER, ar);
-        properties.put(JAXBRIContext.CANONICALIZATION_SUPPORT, Boolean.valueOf(c14nSupport));
-        properties.put(JAXBRIContext.XMLACCESSORFACTORY_SUPPORT, Boolean.valueOf(xmlAccessorFactorySupport));
-        properties.put(JAXBRIContext.TREAT_EVERYTHING_NILLABLE, Boolean.valueOf(allNillable));
-        properties.put(JAXBRIContext.RETAIN_REFERENCE_TO_INFO, Boolean.valueOf(retainPropertyInfo));
-        properties.put(JAXBRIContext.SUPRESS_ACCESSOR_WARNINGS, Boolean.valueOf(supressAccessorWarnings));
+        properties.put(JAXBRIContext.CANONICALIZATION_SUPPORT, c14nSupport);
+        properties.put(JAXBRIContext.XMLACCESSORFACTORY_SUPPORT, xmlAccessorFactorySupport);
+        properties.put(JAXBRIContext.TREAT_EVERYTHING_NILLABLE, allNillable);
+        properties.put(JAXBRIContext.RETAIN_REFERENCE_TO_INFO, retainPropertyInfo);
+        properties.put(JAXBRIContext.SUPRESS_ACCESSOR_WARNINGS, supressAccessorWarnings);
         return (JAXBRIContext) ContextFactory.createContext(classes, properties);
     }
 
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/Options.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/Options.java
index d5c0d18..71a2754 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/Options.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/Options.java
@@ -283,7 +283,6 @@
     /**
      * Sets the {@link FieldRendererFactory}.
      * <p>
-     * <p>
      * This method is for plugins to call to set a custom {@link FieldRendererFactory}.
      *
      * @param frf   The {@link FieldRendererFactory} to be installed. Must not be null.
@@ -320,7 +319,6 @@
     /**
      * Sets the {@link NameConverter}.
      * <p>
-     * <p>
      * This method is for plugins to call to set a custom {@link NameConverter}.
      *
      * @param nc    The {@link NameConverter} to be installed. Must not be null.
@@ -347,7 +345,6 @@
     /**
      * Gets all the {@link Plugin}s discovered so far.
      * <p>
-     * <p>
      * A plugins are enumerated when this method is called for the first time,
      * by taking {@link #classpaths} into account. That means
      * "-cp plugin.jar" has to come before you specify options to enable it.
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCBase.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCBase.java
index d0be84f..86dd98a 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCBase.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCBase.java
@@ -704,12 +704,12 @@
 
                         try {
                             // this method is available only on JDK1.4
-                            Constructor c = Thread.class.getConstructor(
+                            Constructor<Thread> c = Thread.class.getConstructor(
                                 ThreadGroup.class,
                                 Runnable.class,
                                 String.class,
                                 long.class);
-                            t = (Thread) c.newInstance(
+                            t = c.newInstance(
                                 Thread.currentThread().getThreadGroup(),
                                 job,
                                 Thread.currentThread().getName() + ":XJC",
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCFacade.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCFacade.java
index 3c51403..d71861b 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCFacade.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/XJCFacade.java
@@ -44,7 +44,7 @@
             ClassLoader cl = SecureLoader.getClassClassLoader(XJCFacade.class);
             SecureLoader.setContextClassLoader(cl);
             Class<?> driver = cl.loadClass("com.sun.tools.xjc.Driver");
-            Method mainMethod = driver.getDeclaredMethod("main", new Class[]{String[].class});
+            Method mainMethod = driver.getDeclaredMethod("main", new Class<?>[]{String[].class});
             try {
                 mainMethod.invoke(null, new Object[]{args});
             } catch (InvocationTargetException e) {
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/annotation/spec/XmlEnumWriter.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/annotation/spec/XmlEnumWriter.java
index 926e0a6..2a001aa 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/annotation/spec/XmlEnumWriter.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/annotation/spec/XmlEnumWriter.java
@@ -24,7 +24,7 @@
 {
 
 
-    XmlEnumWriter value(Class value);
+    XmlEnumWriter value(Class<?> value);
 
     XmlEnumWriter value(JType value);
 
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/annotation/spec/XmlSeeAlsoWriter.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/annotation/spec/XmlSeeAlsoWriter.java
index 8587ca6..642a88e 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/annotation/spec/XmlSeeAlsoWriter.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/generator/annotation/spec/XmlSeeAlsoWriter.java
@@ -24,7 +24,7 @@
 {
 
 
-    XmlSeeAlsoWriter value(Class value);
+    XmlSeeAlsoWriter value(Class<?> value);
 
     XmlSeeAlsoWriter value(JType value);
 
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CBuiltinLeafInfo.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CBuiltinLeafInfo.java
index 41dd436..a6989ab 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CBuiltinLeafInfo.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/model/CBuiltinLeafInfo.java
@@ -282,7 +282,7 @@
     }
 
     private static final class NoConstantBuiltin extends Builtin {
-        public NoConstantBuiltin(Class c, String typeName) {
+        public NoConstantBuiltin(Class<?> c, String typeName) {
             super(c, typeName);
         }
         @Override
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIProperty.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIProperty.java
index 969ee03..84b817c 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIProperty.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/BIProperty.java
@@ -779,7 +779,7 @@
             return null;
     }
 
-    private static final class BaseTypeBean {
+    public static final class BaseTypeBean {
         /**
          * If there's a nested javaType customization, this field
          * will keep that customization. Otherwise null.
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/CollectionTypeAttribute.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/CollectionTypeAttribute.java
index f2eed7b..ffc17fc 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/CollectionTypeAttribute.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/reader/xmlschema/bindinfo/CollectionTypeAttribute.java
@@ -22,7 +22,7 @@
  * Bean used by JAXB to bind a collection type attribute to our {@link FieldRenderer}.
  * @author Kohsuke Kawaguchi
  */
-final class CollectionTypeAttribute {
+public final class CollectionTypeAttribute {
     @XmlValue
     String collectionType = null;
 
diff --git a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/util/Util.java b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/util/Util.java
index 17bea8f..be7a8ae 100644
--- a/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/util/Util.java
+++ b/jaxb-ri/xjc/src/main/java/com/sun/tools/xjc/util/Util.java
@@ -55,7 +55,7 @@
      * Calls the other getSystemProperty method with
      * "[clazz]&#x2E;[name].
      */
-    public static String getSystemProperty( Class clazz, String name ) {
+    public static String getSystemProperty( Class<?> clazz, String name ) {
         return getSystemProperty( clazz.getName()+'.'+name );
     }    
 }
diff --git a/jaxb-ri/xjc/src/main/java/module-info.java b/jaxb-ri/xjc/src/main/java/module-info.java
index bb1e9aa..4c99aa0 100644
--- a/jaxb-ri/xjc/src/main/java/module-info.java
+++ b/jaxb-ri/xjc/src/main/java/module-info.java
@@ -44,6 +44,7 @@
     exports com.sun.tools.xjc.model.nav;
     exports com.sun.tools.xjc.outline;
     exports com.sun.tools.xjc.reader;
+    exports com.sun.tools.xjc.reader.gbind;
     exports com.sun.tools.xjc.reader.internalizer;
     exports com.sun.tools.xjc.reader.xmlschema;
     exports com.sun.tools.xjc.reader.xmlschema.bindinfo;