File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes about class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "about class" Watch "about class" New topic

about class

toy lee

Joined: Feb 08, 2001
Posts: 3
I am researching some codes.the below lines make me puzzle.
I don't understand the meaing of them
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?
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Are you using an IDE like jBuilder or something???

"JavaRanch, where the deer and the Certified play" - David O'Meara
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
is this a puzzle or what,
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.
- satya

Take a Minute, Donate an Hour, Change a Life
toy lee

Joined: Feb 08, 2001
Posts: 3
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:
new ClassA();
new ClassB();
code 2:
Class c = ClassA.class;
c = ClassB.class;
new ClassA();
new ClassB();
Don't get me started about those stupid light bulbs.
subject: about class
It's not a secret anymore!