org.hotswap.agent.annotation.Init.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(261)

本文整理了Java中org.hotswap.agent.annotation.Init.<init>()方法的一些代码示例,展示了Init.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Init.<init>()方法的具体详情如下:
包路径:org.hotswap.agent.annotation.Init
类名称:Init
方法名:<init>

Init.<init>介绍

暂无

代码示例

代码示例来源:origin: HotswapProjects/HotswapAgent

/**
 * Schedules a new redefiniton event for MultistepProxyTransformer
 *
 * @author Erki Ehtla
 */
public final class RedefinitionScheduler implements Runnable {
  private MultistepProxyTransformer transformer;

  @Init
  private static Instrumentation instrumentation;

  public RedefinitionScheduler(MultistepProxyTransformer transformer) {
    this.transformer = transformer;
  }

  @Override
  public void run() {
    try {
      instrumentation.redefineClasses(new ClassDefinition(transformer.getClassBeingRedefined(), transformer
          .getClassfileBuffer()));
    } catch (Throwable t) {
      transformer.removeClassState();
      throw new RuntimeException(t);
    }
  }

  public static void schedule(MultistepProxyTransformer multistepProxyTransformer) {
    new Thread(new RedefinitionScheduler(multistepProxyTransformer)).start();
  }
}

代码示例来源:origin: HotswapProjects/HotswapAgent

/**
 * Plugin initialization properties (from Hibernate3JPAHelper or
 * SessionFactoryProxy).
 */
@Init
public void init() {
  LOGGER.info("Hibernate3 Session plugin initialized", version);
}

代码示例来源:origin: HotswapProjects/HotswapAgent

/**
   * Initialize instance.
   *
   * @param pluginConfiguration
   *            the plugin configuration
   */
  @Init
  public void initializeInstance(PluginConfiguration pluginConfiguration) {
    LOGGER.info("WildFlyELResolverPlugin Initializing");
  }
}

代码示例来源:origin: HotswapProjects/HotswapAgent

@Init
  public void initializeInstance(PluginConfiguration pluginConfiguration) {
    LOGGER.info("ResteasyRegistryPlugin Initializing");
  }
}

代码示例来源:origin: HotswapProjects/HotswapAgent

@Init
Scheduler scheduler;
@Init
ClassLoader appClassLoader;

代码示例来源:origin: HotswapProjects/HotswapAgent

private static AgentLogger LOGGER = AgentLogger.getLogger(SeamPlugin.class);
@Init
Scheduler scheduler;
@Init
ClassLoader appClassLoader;

代码示例来源:origin: HotswapProjects/HotswapAgent

private static AgentLogger LOGGER = AgentLogger.getLogger(MojarraPlugin.class);
@Init
Scheduler scheduler;
@Init
ClassLoader appClassLoader;

代码示例来源:origin: HotswapProjects/HotswapAgent

@Init
Scheduler scheduler;
@Init
ClassLoader appClassLoader;

代码示例来源:origin: HotswapProjects/HotswapAgent

@Init
Watcher watcher;
@Init
ClassLoader appClassLoader;

代码示例来源:origin: HotswapProjects/HotswapAgent

private static final int WAIT_ON_REDEFINE = 1000;
@Init
ClassLoader appClassLoader;
@Init
Scheduler scheduler;

代码示例来源:origin: HotswapProjects/HotswapAgent

private static AgentLogger LOGGER = AgentLogger.getLogger(Jersey1Plugin.class);
@Init
Scheduler scheduler;
@Init
ClassLoader appClassLoader;

代码示例来源:origin: HotswapProjects/HotswapAgent

private static AgentLogger LOGGER = AgentLogger.getLogger(LogbackPlugin.class);
@Init
Watcher watcher;
@Init
ClassLoader appClassLoader;

代码示例来源:origin: HotswapProjects/HotswapAgent

private static final String USE_MODULES_REGEXP = "deployment\\..*";
@Init
ClassLoader moduleClassLoader;

代码示例来源:origin: HotswapProjects/HotswapAgent

public class VaadinPlugin {
  @Init
  Scheduler scheduler;
  @Init
  ClassLoader appClassLoader;

代码示例来源:origin: HotswapProjects/HotswapAgent

@Init
ClassLoader appClassLoader;
@Init
Scheduler scheduler;

代码示例来源:origin: HotswapProjects/HotswapAgent

@Init
@SuppressWarnings({ "rawtypes", "unchecked" })
public void init(PluginConfiguration pluginConfiguration, ClassLoader appClassLoader) {
  try {
    Class kvcDefaultImplementationClass = Class.forName("com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation", false, appClassLoader);
    kvcDefaultImplementation_flushCaches = kvcDefaultImplementationClass.getMethod("_flushCaches");
    Class kvcReflectionKeyBindingCreationClass = Class.forName("com.webobjects.foundation.NSKeyValueCoding$_ReflectionKeyBindingCreation", false, appClassLoader);
    kvcReflectionKeyBindingCreation_flushCaches = kvcReflectionKeyBindingCreationClass.getMethod("_flushCaches");
    Class kvcValueAccessorClass = Class.forName("com.webobjects.foundation.NSKeyValueCoding$ValueAccessor", false, appClassLoader);
    kvcValueAccessor_flushCaches = kvcValueAccessorClass.getMethod("_flushCaches");
    Class nsValidationDefaultImplementationClass = Class.forName("com.webobjects.foundation.NSValidation$DefaultImplementation", false, appClassLoader);
    nsValidationDefaultImplementation_flushCaches = nsValidationDefaultImplementationClass.getMethod("_flushCaches");
    Class woApplicationClass = Class.forName("com.webobjects.appserver.WOApplication", false, appClassLoader);
    woApplication_removeComponentDefinitionCacheContents = woApplicationClass.getMethod("_removeComponentDefinitionCacheContents");
    woApplicationObject = woApplicationClass.getMethod("application").invoke(null);
    ClassPool classPool = ClassPool.getDefault();
    woComponentCtClass = classPool.makeClass("com.webobjects.appserver.WOComponent");
    nsValidationCtClass = classPool.makeClass("com.webobjects.foundation.NSValidation");
    woActionCtClass = classPool.makeClass("com.webobjects.appserver.WOAction");
    Class woActionClass = Class.forName("com.webobjects.appserver.WOAction", false, appClassLoader);
    Field actionClassesField = woActionClass.getDeclaredField("_actionClasses");
    actionClassesField.setAccessible(true);
    actionClassesCacheDictionnary = actionClassesField.get(null);
    Class nsThreadsafeMutableDictionaryClass = Class.forName("com.webobjects.foundation._NSThreadsafeMutableDictionary", false, appClassLoader);
    woApplication_removeComponentDefinitionCacheContents = woApplicationClass.getMethod("_removeComponentDefinitionCacheContents");
    nsThreadsafeMutableDictionary_removeAllObjects = nsThreadsafeMutableDictionaryClass.getMethod("removeAllObjects");
  } catch (Exception e) {
    e.printStackTrace();
  }
}

代码示例来源:origin: HotswapProjects/HotswapAgent

@Init
Scheduler scheduler;

代码示例来源:origin: HotswapProjects/HotswapAgent

@Init
Scheduler scheduler;
@Init
ClassLoader appClassLoader;

代码示例来源:origin: HotswapProjects/HotswapAgent

@Init
Scheduler scheduler;
@Init
ClassLoader appClassLoader;

代码示例来源:origin: HotswapProjects/HotswapAgent

private static AgentLogger LOGGER = AgentLogger.getLogger(HibernatePlugin.class);
@Init
Scheduler scheduler;
@Init
ClassLoader appClassLoader;

相关文章