001/*
002 * JDrupes Builder
003 * Copyright (C) 2025 Michael N. Lipp
004 * 
005 * This program is free software: you can redistribute it and/or modify
006 * it under the terms of the GNU Affero General Public License as
007 * published by the Free Software Foundation, either version 3 of the
008 * License, or (at your option) any later version.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
013 * GNU Affero General Public License for more details.
014 *
015 * You should have received a copy of the GNU Affero General Public License
016 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
017 */
018
019package org.jdrupes.builder.java;
020
021import org.jdrupes.builder.api.FileTree;
022import org.jdrupes.builder.api.ResourceType;
023import org.jdrupes.builder.api.Resources;
024
025/// A collection of Java specific [ResourceType]s.
026///
027@SuppressWarnings({ "PMD.FieldNamingConventions", "PMD.DataClass" })
028public final class JavaTypes {
029
030    private JavaTypes() {
031    }
032
033    /// The Java source file.
034    public static final ResourceType<JavaSourceFile> JavaSourceFileType
035        = new ResourceType<>() {};
036
037    /// The Java source files.
038    public static final ResourceType<
039            FileTree<JavaSourceFile>> JavaSourceTreeType
040                = new ResourceType<>() {};
041
042    /// The class file.
043    public static final ResourceType<ClassFile> ClassFileType
044        = new ResourceType<>() {};
045
046    /// The Java class files.
047    public static final ResourceType<ClassTree> ClassTreeType
048        = new ResourceType<>() {};
049
050    /// Resource files.
051    @SuppressWarnings("PMD.FieldNamingConventions")
052    public static final ResourceType<JavaResourceTree> JavaResourceTreeType
053        = new ResourceType<>() {};
054
055    /// The Java jar file.
056    public static final ResourceType<JarFile> JarFileType
057        = new ResourceType<>() {};
058
059    /// A resource that can be put on the classpath.
060    public static final ResourceType<ClasspathElement> ClasspathElementType
061        = new ResourceType<>() {};
062
063    /// The most general representation of a classpath.
064    public static final ResourceType<Resources<ClasspathElement>> ClasspathType
065        = new ResourceType<>() {};
066
067    /// Contributions to the compilation classpath.
068    public static final ResourceType<
069            CompilationResources> CompilationResourcesType
070                = new ResourceType<>() {};
071
072    /// Contributions to the runtime classpath.
073    public static final ResourceType<RuntimeResources> RuntimeResourcesType
074        = new ResourceType<>() {};
075
076    /// The directory with files generated by javadoc.
077    public static final ResourceType<JavadocDirectory> JavadocDirectoryType
078        = new ResourceType<>() {};
079
080    /// The Java library jar file.
081    public static final ResourceType<LibraryJarFile> LibraryJarFileType
082        = new ResourceType<>() {};
083
084    /// The Java application jar file.
085    public static final ResourceType<AppJarFile> AppJarFileType
086        = new ResourceType<>() {};
087
088    /// The Java application jar file.
089    public static final ResourceType<SourcesJarFile> SourcesJarFileType
090        = new ResourceType<>() {};
091
092    /// The javadoc jar file.
093    public static final ResourceType<JavadocJarFile> JavadocJarFileType
094        = new ResourceType<>() {};
095}