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<ClasspathElement>> CompilationClasspathType 070 = new ResourceType<>() {}; 071 072 /// Contributions to the runtime classpath. 073 public static final ResourceType< 074 RuntimeResources<ClasspathElement>> RuntimeClasspathType 075 = new ResourceType<>() {}; 076 077 /// The directory with files generated by javadoc. 078 public static final ResourceType<JavadocDirectory> JavadocDirectoryType 079 = new ResourceType<>() {}; 080 081 /// The Java library jar file. 082 public static final ResourceType<LibraryJarFile> LibraryJarFileType 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}