ChannelHandlerMetadataUtil.java — netty Source File
Architecture documentation for ChannelHandlerMetadataUtil.java, a java file in the netty codebase.
Entity Profile
Relationship Graph
Source Code
/*
* Copyright 2022 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.nativeimage;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import io.netty.channel.ChannelHandler;
import io.netty.channel.NativeImageHandlerMetadataTest;
import org.junit.jupiter.api.Assertions;
import org.reflections.Reflections;
import org.reflections.util.ConfigurationBuilder;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.lang.reflect.Type;
import java.net.URL;
import java.text.Collator;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* Generates native-image reflection metadata for subtypes of {@link io.netty.channel.ChannelHandler}.
* <p>
* To use, create a JUnit test in the desired Netty module and invoke {@link #generateMetadata(String...)} with a list
* of packages present in the target Netty module that may contain subtypes of the ChannelHandler.
* <p>
* See {@link NativeImageHandlerMetadataTest}
*/
public final class ChannelHandlerMetadataUtil {
private static final Type HANDLER_METADATA_LIST_TYPE = new TypeToken<List<HandlerMetadata>>() {
}.getType();
private static final Gson gson = new GsonBuilder().setPrettyPrinting().create();
private ChannelHandlerMetadataUtil() {
}
public static void generateMetadata(String... packageNames) {
String projectGroupId = System.getProperty("nativeImage.handlerMetadataGroupId");
String projectArtifactId = System.getProperty("nativeimage.handlerMetadataArtifactId");
// ... (186 more lines)
Domain
Subdomains
Source
Frequently Asked Questions
What does ChannelHandlerMetadataUtil.java do?
ChannelHandlerMetadataUtil.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Allocators subdomain.
Where is ChannelHandlerMetadataUtil.java in the architecture?
ChannelHandlerMetadataUtil.java is located at transport/src/test/java/io/netty/nativeimage/ChannelHandlerMetadataUtil.java (domain: Buffer, subdomain: Allocators, directory: transport/src/test/java/io/netty/nativeimage).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free