
org.hotswap.agent.plugin.deltaspike_jakarta.DeltaSpikeJakartaPlugin Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hotswap-agent-deltaspike-jakarta-plugin Show documentation
Show all versions of hotswap-agent-deltaspike-jakarta-plugin Show documentation
Java unlimited runtime class and resource redefinition.
The newest version!
/*
* Copyright 2013-2024 the HotswapAgent authors.
*
* This file is part of HotswapAgent.
*
* HotswapAgent is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 2 of the License, or (at your
* option) any later version.
*
* HotswapAgent is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with HotswapAgent. If not, see http://www.gnu.org/licenses/.
*/
package org.hotswap.agent.plugin.deltaspike_jakarta;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.WeakHashMap;
import org.hotswap.agent.annotation.Init;
import org.hotswap.agent.annotation.LoadEvent;
import org.hotswap.agent.annotation.OnClassLoadEvent;
import org.hotswap.agent.annotation.Plugin;
import org.hotswap.agent.command.Scheduler;
import org.hotswap.agent.config.PluginConfiguration;
import org.hotswap.agent.javassist.ClassPool;
import org.hotswap.agent.javassist.CtClass;
import org.hotswap.agent.javassist.NotFoundException;
import org.hotswap.agent.logging.AgentLogger;
import org.hotswap.agent.plugin.deltaspike_jakarta.command.PartialBeanClassRefreshCommand;
import org.hotswap.agent.plugin.deltaspike_jakarta.command.RepositoryRefreshCommand;
import org.hotswap.agent.plugin.deltaspike_jakarta.transformer.DeltaSpikeProxyTransformer;
import org.hotswap.agent.plugin.deltaspike_jakarta.transformer.DeltaspikeContextsTransformer;
import org.hotswap.agent.plugin.deltaspike_jakarta.transformer.PartialBeanExtensionTransformer;
import org.hotswap.agent.plugin.deltaspike_jakarta.transformer.RepositoryTransformer;
import org.hotswap.agent.util.AnnotationHelper;
/**
* Apache DeltaSpike Jakarta
* @author Vladimir Dvorak
*/
@Plugin(name = "DeltaspikeJakarta",
description = "Apache DeltaSpike (http://deltaspike.apache.org/), support repository reloading",
testedVersions = {"2.0.0"},
expectedVersions = {"2.0.x"},
supportClass = {
DeltaSpikeProxyTransformer.class, PartialBeanExtensionTransformer.class, RepositoryTransformer.class, DeltaspikeContextsTransformer.class
}
)
public class DeltaSpikeJakartaPlugin
{
private static AgentLogger LOGGER = AgentLogger.getLogger(DeltaSpikeJakartaPlugin.class);
private static final String REPOSITORY_ANNOTATION = "org.apache.deltaspike.data.api.Repository";
public static final int WAIT_ON_REDEFINE = 500;
@Init
ClassLoader appClassLoader;
@Init
Scheduler scheduler;
@Init
PluginConfiguration pluginConfiguration;
boolean initialized = false;
int waitOnRedefine = WAIT_ON_REDEFINE;
Map registeredPartialBeanClasses = new WeakHashMap<>();
Map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy