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 either the classpath or module-path. 064 public static final ResourceType<CodeContribution> CodeContributionType 065 = new ResourceType<>() {}; 066 067 /// The most general representation of code contributions. 068 public static final ResourceType< 069 Resources<CodeContribution>> CodeContributionsType 070 = new ResourceType<>() {}; 071 072 /// The directory with files generated by javadoc. 073 public static final ResourceType<JavadocDirectory> JavadocDirectoryType 074 = new ResourceType<>() {}; 075 076 /// The Java library jar file. 077 public static final ResourceType<LibraryJarFile> LibraryJarFileType 078 = new ResourceType<>() {}; 079 080 /// Jar manifest attributes. 081 @SuppressWarnings("PMD.LooseCoupling") 082 public static final ResourceType<ManifestAttributes> ManifestAttributesType 083 = new ResourceType<>() {}; 084 085 /// The Java application jar file. 086 public static final ResourceType<AppJarFile> AppJarFileType 087 = new ResourceType<>() {}; 088 089 /// The Java application jar file. 090 public static final ResourceType<SourcesJarFile> SourcesJarFileType 091 = new ResourceType<>() {}; 092 093 /// The javadoc jar file. 094 public static final ResourceType<JavadocJarFile> JavadocJarFileType 095 = new ResourceType<>() {}; 096}