Lines Matching full:classpool
22 <br>2. <a href="#pool">ClassPool</a>
46 ClassPool pool = ClassPool.getDefault();
52 <p>This program first obtains a <code>ClassPool</code> object, which
54 <code>ClassPool</code> object is a container of <code>CtClass</code>
60 from a <code>ClassPool</code> object
62 <code>get()</code> in <code>ClassPool</code> is used for this purpose.
66 <code>ClassPool</code> object and it is assigned to a variable
68 The <code>ClassPool</code> object returned by <code>getDfault()</code>
71 <p>From the implementation viewpoint, <code>ClassPool</code> is a hash
73 keys. <code>get()</code> in <code>ClassPool</code> searches this hash
80 <p>The <code>CtClass</code> object obtained from a <code>ClassPool</code>
114 must be called on a <code>ClassPool</code>.
117 ClassPool pool = ClassPool.getDefault();
129 <code>makeInterface()</code> in <code>ClassPool</code> can do.
159 <p>If <code>ClassPool.doPruning</code> is set to <code>true</code>,
172 The default value of <code>ClassPool.doPruning</code> is <code>false</code>.
200 <p>The default <code>ClassPool</code> returned
201 by a static method <code>ClassPool.getDefault()</code>
204 the <code>ClassPool</code> object may not be able to find user classes</em>
207 registered to the <code>ClassPool</code>. Suppose that <code>pool</code>
208 refers to a <code>ClassPool</code> object:
228 ClassPool pool = ClassPool.getDefault();
236 ClassPool pool = ClassPool.getDefault();
250 to a <code>ClassPool</code> object
255 ClassPool cp = ClassPool.getDefault();
264 The <code>ClassPool</code> reads a class file from the given
270 can use <code>makeClass()</code> in <code>ClassPool</code>:
273 ClassPool cp = ClassPool.getDefault();
281 the <code>ClassPool</code> object. This might improve performance
283 a <code>ClassPool</code> object reads a class file on demand,
287 is kept in the <code>ClassPool</code> object and the class file is never
293 <code>ClassPool</code>. This allows a non-standard resource to be
299 <h2>2. ClassPool</h2>
302 A <code>ClassPool</code> object is a container of <code>CtClass</code>
304 recorded in a <code>ClassPool</code> for ever. This is because a
319 such a method call, the <code>ClassPool</code>
328 This specification of <code>ClassPool</code> may cause huge memory
334 the <code>ClassPool</code>. If you call <code>detach()</code> on a
336 removed from the <code>ClassPool</code>. For example,
346 However, you can call <code>get()</code> on <code>ClassPool</code>
348 the same class. If you call <code>get()</code>, the <code>ClassPool</code>
353 Another idea is to occasionally replace a <code>ClassPool</code> with
354 a new one and discard the old one. If an old <code>ClassPool</code>
356 that <code>ClassPool</code> are also garbage collected.
357 To create a new instance of <code>ClassPool</code>, execute the following
361 ClassPool cp = new ClassPool(true);
365 <p>This creates a <code>ClassPool</code> object that behaves as the
366 default <code>ClassPool</code> returned by
367 <code>ClassPool.getDefault()</code> does.
368 Note that <code>ClassPool.getDefault()</code> is a singleton factory method
369 provided for convenience. It creates a <code>ClassPool</code> object in
371 <code>ClassPool</code> and reuses it.
372 A <code>ClassPool</code> object returned by <code>getDefault()</code>
376 <p>Note that <code>new ClassPool(true)</code> is a convenient constructor,
377 which constructs a <code>ClassPool</code> object and appends the system
382 ClassPool cp = new ClassPool();
390 creating multiple instances of <code>ClassPool</code> might be necessary;
391 an instance of <code>ClassPool</code> should be created
393 The program should create a <code>ClassPool</code> object by not calling
394 <code>getDefault()</code> but a constructor of <code>ClassPool</code>.
397 Multiple <code>ClassPool</code> objects can be cascaded like
401 ClassPool parent = ClassPool.getDefault();
402 ClassPool child = new ClassPool(parent);
407 If <code>child.get()</code> is called, the child <code>ClassPool</code>
408 first delegates to the parent <code>ClassPool</code>. If the parent
409 <code>ClassPool</code> fails to find a class file, then the child
410 <code>ClassPool</code> attempts to find a class file
415 <code>ClassPool</code> attempts to find a class file before delegating
416 to the parent <code>ClassPool</code>. For example,
419 ClassPool parent = ClassPool.getDefault();
420 ClassPool child = new ClassPool(parent);
431 ClassPool pool = ClassPool.getDefault();
445 record in the <code>ClassPool</code> object. From the implementation
446 viewpoint, a <code>ClassPool</code> object is a hash table of
453 <code>ClassPool</code> object again, then it never returns the
455 The <code>ClassPool</code> object reads
464 ClassPool pool = ClassPool.getDefault();
479 <p>The <code>ClassPool</code> object is used to maintain one-to-one
482 the same class unless two independent <code>ClassPool</code> are created.
487 <code>ClassPool</code>, which is returned by
488 <code>ClassPool.getDefault()</code>, execute the following code
492 ClassPool cp = new ClassPool(true);
495 <p>If you have two <code>ClassPool</code> objects, then you can
496 obtain, from each <code>ClassPool</code>, a distinct
513 ClassPool pool = ClassPool.getDefault();
520 in <code>ClassPool</code>. For example,
523 ClassPool pool = ClassPool.getDefault();
529 <p>If <code>getAndRename()</code> is called, the <code>ClassPool</code>
548 <code>ClassPool.get()</code>,
585 ClassPool cp = ClassPool.getDefault();
613 ClassPool cp = ClassPool.getDefault();
830 <code>javassist.ClassPool</code> object for reading a class file.
841 ClassPool pool = ClassPool.getDefault();
867 public void start(ClassPool pool)
869 public void onLoad(ClassPool pool, String classname)
884 void start(ClassPool pool)
886 void onLoad(ClassPool pool, String classname)
908 ClassPool pool = ClassPool.getDefault();
927 <code>MyTranslator</code>, and <code>ClassPool</code> because they
943 a <code>ClassPool</code> object, or
979 private ClassPool pool;
982 pool = new ClassPool();
1045 <ul><pre>ClassPool pool = ClassPool.getDefault();