• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

about class

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,all
I am researching some codes.the below lines make me puzzle.
I don't understand the meaing of them
System.out.print("preloading...");
c = uci.gef.CmdSetMode.class;
c = uci.gef.ModePlace.class;
c = uci.gef.ModeModify.class;
c = uci.gef.SelectionResize.class;
c = uci.ui.ColorRenderer.class;
c = uci.ui.Swatch.class;
c = uci.util.EnumerationEmpty.class;
c = uci.util.EnumerationSingle.class;
c = uci.uml.util.GenCompositeClasses.class;
c = uci.uml.visual.FigClass.class;
c = uci.uml.visual.FigPackage.class;
c = uci.uml.visual.FigInterface.class;
c = uci.uml.visual.FigAssociation.class;
c = uci.uml.visual.FigGeneralization.class;
c = uci.uml.visual.FigRealization.class;
System.out.println(" done preloading");
I guessed that it will make a shorter time in instancing object.But I make some test that proved my guess is wrong.
Is there anyone give me some ideas?
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using an IDE like jBuilder or something???
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is this a puzzle or what,
Toy:
if you don't mind, could you please (i repeat please)
tell us how you got this code or where you found it?
that way, I think we could make a closer guess.
At this stage, if the comments mean something to me then. I would say:
This is a part of code from a static block which is attempting
to load some class libraries.
regds.
- satya
 
toy lee
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got these codes from the argo-uml that is a open source project.
I don't understand why it declare these classes during the starup.Could it improve the performance? I read the java doc carefully,but get nothing about it. I tested the below code and
find the consumed time is same. anyone can tell me the benefits
of these codes.
code 1:
System.out.println(System.currentTimeMillis());
new ClassA();
new ClassB();
System.out.println(System.currentTimeMillis());
code 2:
System.out.println(System.currentTimeMillis());
Class c = ClassA.class;
c = ClassB.class;
new ClassA();
new ClassB();
System.out.println(System.currentTimeMillis());
 
reply
    Bookmark Topic Watch Topic
  • New Topic