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    /// A Java class tree (Java class files).
047    public static final ResourceType<ClassTree> ClassTreeType
048        = new ResourceType<>() {};
049
050    /// Many Java class trees.
051    public static final ResourceType<Resources<ClassTree>> ClassTreesType
052        = new ResourceType<>() {};
053
054    /// Resource files.
055    @SuppressWarnings("PMD.FieldNamingConventions")
056    public static final ResourceType<JavaResourceTree> JavaResourceTreeType
057        = new ResourceType<>() {};
058
059    /// The Java jar file.
060    public static final ResourceType<JarFile> JarFileType
061        = new ResourceType<>() {};
062
063    /// A resource that can be put on the classpath.
064    public static final ResourceType<ClasspathElement> ClasspathElementType
065        = new ResourceType<>() {};
066
067    /// The most general representation of a classpath.
068    public static final ResourceType<Resources<ClasspathElement>> ClasspathType
069        = new ResourceType<>() {};
070
071    /// The directory with files generated by javadoc.
072    public static final ResourceType<JavadocDirectory> JavadocDirectoryType
073        = new ResourceType<>() {};
074
075    /// The Java library jar file.
076    public static final ResourceType<LibraryJarFile> LibraryJarFileType
077        = new ResourceType<>() {};
078
079    /// Jar manifest attributes.
080    @SuppressWarnings("PMD.LooseCoupling")
081    public static final ResourceType<ManifestAttributes> ManifestAttributesType
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}