javassist.Loader.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(206)

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

Loader.<init>介绍

[英]Creates a new class loader.
[中]创建一个新的类加载器。

代码示例

代码示例来源:origin: redisson/redisson

  1. /**
  2. * Loads a class with an instance of <code>Loader</code>
  3. * and calls <code>main()</code> of that class.
  4. *
  5. * <p>This method calls <code>run()</code>.
  6. *
  7. * @param args command line parameters.
  8. * <br>&nbsp;&nbsp;{@code args[0]} is the class name to be loaded.
  9. * <br>&nbsp;&nbsp;{@code args[1..n]} are parameters passed
  10. * to the target {@code main()}.
  11. *
  12. * @see javassist.Loader#run(String[])
  13. */
  14. public static void main(String[] args) throws Throwable {
  15. Loader cl = new Loader();
  16. cl.run(args);
  17. }

代码示例来源:origin: org.javassist/javassist

  1. /**
  2. * Loads a class with an instance of <code>Loader</code>
  3. * and calls <code>main()</code> of that class.
  4. *
  5. * <p>This method calls <code>run()</code>.
  6. *
  7. * @param args command line parameters.
  8. * <br>&nbsp;&nbsp;{@code args[0]} is the class name to be loaded.
  9. * <br>&nbsp;&nbsp;{@code args[1..n]} are parameters passed
  10. * to the target {@code main()}.
  11. *
  12. * @see javassist.Loader#run(String[])
  13. */
  14. public static void main(String[] args) throws Throwable {
  15. Loader cl = new Loader();
  16. cl.run(args);
  17. }

代码示例来源:origin: stackoverflow.com

  1. var loader1 = new Loader();
  2. loader1.foo(1, 2); // prints 1 + 2 = 3, default bar() function
  3. loader1.foo(1, 2, function(a, b) {
  4. return a - b;
  5. }); // prints 1 - 2 = -1, custom bar() function

代码示例来源:origin: stackoverflow.com

  1. function theLoader() {
  2. this.load = function() {
  3. if (this.loadFunction) {
  4. return this.loadFunction.apply(this, arguments);
  5. }
  6. };
  7. }
  8. // Usage
  9. var loader = new Loader();
  10. loader.loadFunction = someFunction;
  11. loader.load(1, 2, 3, 4);

代码示例来源:origin: stackoverflow.com

  1. var loader:Loader = new Loader();
  2. var request:URLRequest = new URLRequest("twviewer.swf");
  3. request.data = getFlashVars(this.loaderInfo);
  4. loader.load(request);
  5. addChild(loader);

代码示例来源:origin: stackoverflow.com

  1. var params:URLVariables = new URLVariables();
  2. params["string"] = "ala ma kota";
  3. params["number"] = 1979;
  4. var request:URLRequest = new URLRequest();
  5. request.data = params;
  6. request.url = "urlVarsReader.swf";
  7. var loader:Loader = new Loader();
  8. loader.load(request);
  9. addChild(loader);

代码示例来源:origin: stackoverflow.com

  1. Collection<Loader> loaders = new Mapper<File, Loader>(files) {
  2. @Override public Loader map(File source) {
  3. return new Loader(source);
  4. }
  5. }.apply();

代码示例来源:origin: stackoverflow.com

  1. myModule.factory('Animator', function() {
  2. // return new Animator instance
  3. // or if you want a singleton just return it without 'new'
  4. return new Loader();
  5. });

代码示例来源:origin: stackoverflow.com

  1. enumHanderMap.put(EDay.MON, new Loader() {
  2. @Override
  3. public void loadClass() {
  4. ...
  5. }
  6. });

代码示例来源:origin: stackoverflow.com

  1. // model object starts loading upon instantiation
  2. var loader = new Loader();
  3. // however the img tag is available immediately.
  4. // the loader will update the src when ajax
  5. // calls complete.
  6. document.body.appendChild(loader.getImg());

代码示例来源:origin: stackoverflow.com

  1. var context:LoaderContext = new LoaderContext();
  2. context.applicationDomain = ApplicationDomain.currentDomain;
  3. var rslLoader:Loader = new Loader();
  4. rslLoader.contentLoaderInfo.addEventListener(Event.INIT, rslLoadedHandler);
  5. rslLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, rslIOErrorHandler, false, 0, true);
  6. rslLoader.load(new URLRequest("myurl"), context);

代码示例来源:origin: gradle.plugin.com.iperlane.gradle/plugin

  1. @Override public ClassLoader getClassLoader() {
  2. return new Loader(this);
  3. }
  4. }

代码示例来源:origin: com.darylteo.gradle/javassist-plugin

  1. @Override public ClassLoader getClassLoader() {
  2. return new Loader(this);
  3. }
  4. }

代码示例来源:origin: stackoverflow.com

  1. var loader:Loader = new Loader();
  2. var url:URLRequest = new URLRequest("my.swf");
  3. loader.load(url);
  4. addChild(loader);

代码示例来源:origin: stackoverflow.com

  1. public static Loader instance() {
  2. if (instance == null) {
  3. instance = new Loader();
  4. System.out.println("Loader ready");
  5. }
  6. return instance;
  7. }

代码示例来源:origin: stackoverflow.com

  1. public static Loader instance() {
  2. if (instance == null) {
  3. instance = new Loader();
  4. System.out.println("Loader ready");
  5. }
  6. return instance;
  7. }

代码示例来源:origin: stackoverflow.com

  1. var ldr:Loader = new Loader();
  2. var lc:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
  3. lc.allowCodeImport = true;
  4. ldr.load(new URLRequest("YOUR_FILE_PATH"), lc);

代码示例来源:origin: stackoverflow.com

  1. if (instance == null) {
  2. instance = new Loader();
  3. System.out.println("Loader ready");
  4. }

代码示例来源:origin: stackoverflow.com

  1. Vehicle[] fleet = new Vehicle[3];
  2. fleet[0] = new Tractor();
  3. fleet[1] = new Loader();
  4. fleet[2] = new Harvester();

代码示例来源:origin: stackoverflow.com

  1. Loader loader = new Loader();
  2. GuiTexture texture = new GuiTexture(loader.loadTexture("some/file/here.png", new Vector2f(0, 0), new Vector2f(1, 1));
  3. List<GuiTexture> guis = new ArrayList<GuiTexture>();
  4. guis.add(texture);
  5. GuiRenderer renderer = new GuiRenderer(loader);
  6. while(Frame is open) {
  7. renderer.render(guis);
  8. }
  9. renderer.cleanUp();

相关文章