Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.arcetri.astro.it/irlab/doc/library/javascript/clientreference/javclass.htm
Дата изменения: Thu Oct 7 13:13:36 1999 Дата индексирования: Sat Dec 22 14:35:28 2007 Кодировка: Поисковые слова: п п п |
Packages
object:
Packages.JavaClasswhere JavaClass is the fully-specified name of the object's Java class. The LiveConnect
java
, sun
, and netscape
objects provide shortcuts for commonly used Java packages and also create JavaClass
objects.
JavaClass
object is a reference to one of the classes in a Java package, such as netscape.javascript.JSObject
. A JavaPackage
object is a reference to a Java package, such as netscape.javascript
. In JavaScript, the JavaPackage
and JavaClass
hierarchy reflect the Java package and class hierarchy.
You must create a wrapper around an instance of java.lang.Class
before you pass it as a parameter to a Java method--JavaClass
objects are not automatically converted to instances of java.lang.Class
.
JavaClass
object are the static fields of the Java class.
JavaClass
object are the static methods of the Java class.
x
is a JavaClass
object referring to java.awt.Font
. Because BOLD
is a static field in the Font
class, it is also a property of the JavaClass
object.
x = java.awt.FontThe previous example omits the
myFont = x("helv",x.BOLD,10) // creates a Font object
Packages
keyword and uses the java
synonym because the Font
class is in the java
package.
JavaArray
, JavaObject
, JavaPackage
, Packages
Last Updated: 05/28/99 11:59:41