org.openide.cookies.InstanceCookie, org.openide.cookies.InstanceCookie.Of, org.openide.nodes.Node.Cookiepublic class InstanceSupport
extends java.lang.Object
implements org.openide.cookies.InstanceCookie.Of
| Modifier and Type | Class | Description |
|---|---|---|
static class |
InstanceSupport.Instance |
Trivial supporting instance cookie for already-existing objects.
|
| Constructor | Description |
|---|---|
InstanceSupport(MultiDataObject.Entry entry) |
New support for given entry.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected java.lang.ClassLoader |
createClassLoader() |
Creates new NbClassLoader with restricted PermissionCollection
that contains only:
java.io.FilePermission("<<ALL FILES>>", "read")
java.util.PropertyPermission("*", "read")
|
static org.openide.util.HelpCtx |
findHelp(org.openide.cookies.InstanceCookie instance) |
Deprecated.
use org.openide.util.HelpCtx.findHelp (Object)
|
java.lang.Class<?> |
instanceClass() |
|
java.lang.Object |
instanceCreate() |
|
java.lang.String |
instanceName() |
|
boolean |
instanceOf(java.lang.Class<?> type) |
|
org.openide.filesystems.FileObject |
instanceOrigin() |
Returns the origin of the instance.
|
boolean |
isApplet() |
Deprecated.
This method probably should not be used, as it catches a variety of potentially
serious exceptions and errors, and swallows them so as to produce a simple boolean
result. (Notifying them all would be inappropriate as they typically come from user
code.) Better to directly parse the bytecode, using e.g. the classfile module,
which is immune to this class of errors.
|
boolean |
isExecutable() |
Deprecated.
This method probably should not be used, as it catches a variety of potentially
serious exceptions and errors, and swallows them so as to produce a simple boolean
result. (Notifying them all would be inappropriate as they typically come from user
code.) Better to directly parse the bytecode, using e.g. the classfile module,
which is immune to this class of errors.
|
boolean |
isInterface() |
Deprecated.
This method probably should not be used, as it catches a variety of potentially
serious exceptions and errors, and swallows them so as to produce a simple boolean
result. (Notifying them all would be inappropriate as they typically come from user
code.) Better to directly parse the bytecode, using e.g. the classfile module,
which is immune to this class of errors.
|
boolean |
isJavaBean() |
Deprecated.
This method probably should not be used, as it catches a variety of potentially
serious exceptions and errors, and swallows them so as to produce a simple boolean
result. (Notifying them all would be inappropriate as they typically come from user
code.) Better to directly parse the bytecode, using e.g. the classfile module,
which is immune to this class of errors.
|
java.lang.String |
toString() |
public InstanceSupport(MultiDataObject.Entry entry)
entry - entry to create instance frompublic java.lang.String instanceName()
instanceName in interface org.openide.cookies.InstanceCookiepublic java.lang.Class<?> instanceClass()
throws java.io.IOException,
java.lang.ClassNotFoundException
instanceClass in interface org.openide.cookies.InstanceCookiejava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic boolean instanceOf(java.lang.Class<?> type)
instanceOf in interface org.openide.cookies.InstanceCookie.Ofpublic org.openide.filesystems.FileObject instanceOrigin()
public java.lang.Object instanceCreate()
throws java.io.IOException,
java.lang.ClassNotFoundException
instanceCreate in interface org.openide.cookies.InstanceCookiejava.io.IOExceptionjava.lang.ClassNotFoundException@Deprecated public boolean isApplet()
true if this class is a java.applet.Applet@Deprecated public boolean isExecutable()
true if this class has main method
(e.g., public static void main (String[] arguments)).@Deprecated public boolean isJavaBean()
true if this class represents JavaBean (is public and has a public default constructor).@Deprecated public boolean isInterface()
true if the class is an interfacepublic java.lang.String toString()
toString in class java.lang.Object@Deprecated public static org.openide.util.HelpCtx findHelp(org.openide.cookies.InstanceCookie instance)
HelpCtx instances themselves).
JComponents are checked for an attached help ID property,
as with HelpCtx.findHelp(java.awt.Component) (but not traversing parents).
Also, partial compliance with the JavaHelp section on JavaBeans help is implemented--i.e.,
if a Bean in its BeanInfo provides a BeanDescriptor which
has the attribute helpID, this will be returned. The value is not
defaulted (because it would usually be nonsense and would mask a useful default
help for the instance container), nor is the help set specification checked,
since someone should have installed the proper help set anyway, and the APIs
cannot add a new reference to a help set automatically.
See javax.help.HelpUtilities.getIDStringFromBean for details.
Special IDs are added, corresponding to the class name, for all standard visual components.
instance - the instance to check for help (it is permissible for the InstanceCookie.instanceCreate() to return null)null if none was found (or it was HelpCtx.DEFAULT_HELP)protected java.lang.ClassLoader createClassLoader()
Built on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.