Class SchemaToJavaTask

  • All Implemented Interfaces:
    kotlin.Comparable , org.gradle.api.Named , org.gradle.api.Task , org.gradle.api.internal.DynamicObjectAware , org.gradle.api.internal.TaskInternal , org.gradle.api.plugins.ExtensionAware , org.gradle.util.Configurable

    @CacheableTask() 
    public abstract class SchemaToJavaTask
    extends DefaultTask
                        

    This task generates a java code from an existing jaxb configuration.

    • Constructor Detail

      • SchemaToJavaTask

        SchemaToJavaTask(ObjectFactory objectFactory)
    • Method Detail

      • getPackageName

        @Optional()@Input() final String getPackageName()

        Parameter packageName for javagen.

      • getArgs

        @Input() final List<String> getArgs()

        List of additional arguments for javagen.

      • getSchema

        @Optional()@InputFile()@PathSensitive(value = PathSensitivity.RELATIVE) final File getSchema()

        Schema file for java generation.

      • getBinding

        @Optional()@InputFile()@PathSensitive(value = PathSensitivity.RELATIVE) final File getBinding()

        Binding file for java generation.

      • getCatalog

        @Optional()@InputFile()@PathSensitive(value = PathSensitivity.RELATIVE) final File getCatalog()

        Catalog file for java generation.

      • getSchemas

        @Optional()@InputFiles()@PathSensitive(value = PathSensitivity.RELATIVE) final FileCollection getSchemas()

        Schema files property for javagen.

      • setSchemas

         final Unit setSchemas(FileCollection value)

        Schema files property for javagen.

      • getBindings

        @Optional()@InputFiles()@PathSensitive(value = PathSensitivity.RELATIVE) final FileCollection getBindings()

        Schema files property for javagen.

      • setBindings

         final Unit setBindings(FileCollection value)

        Schema files property for javagen.

      • getJaxbClasspathfiles

        @InputFiles()@PathSensitive(value = PathSensitivity.RELATIVE) final ConfigurableFileCollection getJaxbClasspathfiles()

        Classpath files for schema code generation (see Jaxb configuration (JAXB_CONFIGURATION_NAME)).

        The plugin wires this at configuration time. The task must not resolve the configuration itself, because that would happen during input snapshotting in the execution phase, where accessing {@code Task.project} is deprecated in Gradle 9 and fails in Gradle 10.

      • getAddjaxbClasspathfiles

        @Classpath() final ConfigurableFileCollection getAddjaxbClasspathfiles()

        Additional classpath files for schema code generation (see Jaxb configuration (ADD_JAXB_CONFIGURATION_NAME)).

        The plugin wires this at configuration time, see {@link #jaxbClasspathfiles}.

      • getClasspathfiles

        @CompileClasspath() final ConfigurableFileCollection getClasspathfiles()

        Classpath files for Schema generation.

        The plugin wires this at configuration time, see {@link #jaxbClasspathfiles}.

      • getOutputDir

        @OutputDirectory() final File getOutputDir()

        Output directory for Schema gen.

      • provideArgs

         final Unit provideArgs(Provider<List<String>> args)

        This function set the input property of additional arguments.

      • provideSchema

         final Unit provideSchema(Provider<RegularFile> schema)

        This function set the input property schema file.

      • provideBinding

         final Unit provideBinding(Provider<RegularFile> binding)

        This function set the input property schema file.

      • provideCatalog

         final Unit provideCatalog(Provider<RegularFile> catalog)

        This function set the input property catalog file.

      • provideOutputDir

         final Unit provideOutputDir(Provider<Directory> outputDir)

        This function set the output directory provider.

      • generate

         final Unit generate()

        This creates the java code fron a JAXB configuration. It calls the original ant task with necessary parameters.