|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.borland.jbuilder.jot.JotPrimitiveClass
This class represents Java's primitive types (boolean, char, byte, short, int, long, float, double and void). For more information on primitives, see section 4.2 of the Java Language Specification.
Field Summary | |
static JotPrimitiveClass |
booleanType
|
static JotPrimitiveClass |
byteType
|
static JotPrimitiveClass |
charType
|
static JotPrimitiveClass |
doubleType
|
static JotPrimitiveClass |
floatType
|
static JotPrimitiveClass |
intType
|
static JotPrimitiveClass |
longType
|
static JotPrimitiveClass |
shortType
|
static JotPrimitiveClass |
voidType
|
Method Summary | |
void |
addUserData(java.lang.Object key,
java.lang.Object data)
Allows client supplied data to be associated with this JotClass. |
boolean |
equals(java.lang.Object that)
|
static JotPrimitiveClass |
forName(java.lang.String name)
Get the singleton instance of the JotClass representation for a primitive type. |
JotClass |
getComponentType()
This method is not useful when dealing with primitives and always returns null. |
JotConstructor |
getConstructor(JotClass[] parameterTypes)
This method is not useful when dealing with primitives and returns null. |
JotConstructor[] |
getConstructors()
This method is not useful when dealing with primitives and always returns a zero length array. |
JotConstructor |
getDeclaredConstructor(JotClass[] parameterTypes)
This method is not useful when dealing with primitives and returns null. |
JotConstructor[] |
getDeclaredConstructors()
This method is not useful when dealing with primitives and always returns a zero length array. |
JotField |
getDeclaredField(java.lang.String name)
This method is not useful when dealing with primitives and returns null. |
JotField[] |
getDeclaredFields()
This method is not useful when dealing with primitives and always returns a zero length array. |
JotClass[] |
getDeclaredInnerClasses()
This method is not useful when dealing with primitives and always returns a zero length array. |
JotMethod |
getDeclaredMethod(java.lang.String name,
JotClass[] parameterTypes)
This method is not useful when dealing with primitives and returns null. |
JotMethod[] |
getDeclaredMethods()
This method is not useful when dealing with primitives and always returns a zero length array. |
JotMethod[] |
getDeclaredMethods(java.lang.String name)
This method is not useful when dealing with primitives and always returns a zero length array. |
JotField |
getField(java.lang.String name)
This method is not useful when dealing with primitives and returns null. |
JotField[] |
getFields()
This method is not useful when dealing with primitives and always returns a zero length array. |
JotFile |
getFile()
This method is not useful when dealing with primitives and always returns null. |
JotClass[] |
getInnerClasses()
This method is not useful when dealing with primitives and always returns a zero length array. |
JotType[] |
getInterfaces()
This method is not useful when dealing with primitives and always returns a zero length array. |
JotClass |
getJotClass()
Returns the JotClass object which represents this type. |
JotClassSource |
getJotClassSource()
This method is not useful when dealing with primitives and returns null. |
JotMethod |
getMethod(java.lang.String name,
JotClass[] parameterTypes)
This method is not useful when dealing with primitives and returns null. |
JotMethod[] |
getMethods()
This method is not useful when dealing with primitives and always returns a zero length array. |
JotMethod[] |
getMethods(java.lang.String name)
This method is not useful when dealing with primitives and always returns a zero length array. |
int |
getModifiers()
Returns the Java language modifiers for this class or interface, encoded in an integer. |
java.lang.String |
getName()
Returns the fully-qualified name of the type (class, interface, array, or primitive) represented by this JotClass object, as a String. |
JotType |
getSuperclass()
This method is not useful when dealing with primitives and always returns null. |
JotType |
getType()
Returns a JotType object that refers to this class |
java.lang.Object |
getUserData(java.lang.Object key)
Retrieves client data associated with this JotClass. |
int |
hashCode()
|
boolean |
isArray()
This method is not useful when dealing with primitives and always returns false. |
boolean |
isAssignableFrom(JotClass cls)
Informally, this method tests whether the class or interface represented by this JotClass object is either the same as, or is a superclass or superinterface of, the class or interface represented by the specified JotClass parameter. |
boolean |
isInstance(java.lang.Object obj)
This method is the dynamic equivalent of the Java language instanceof operator. |
boolean |
isInterface()
This method is not useful when dealing with primitives and always returns false. |
boolean |
isPrimitive()
Always returns true when invoked on an instance of JotPrimitiveClass. |
java.lang.Object |
newInstance()
Attempts to create and initialize a new instance of the class represented by this JotClass object, provided it represents an instantiable class (whether a declared class or an array class). |
void |
setName(java.lang.String value)
This method is not used when dealing with primitive data types. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final JotPrimitiveClass booleanType
public static final JotPrimitiveClass charType
public static final JotPrimitiveClass byteType
public static final JotPrimitiveClass shortType
public static final JotPrimitiveClass intType
public static final JotPrimitiveClass longType
public static final JotPrimitiveClass floatType
public static final JotPrimitiveClass doubleType
public static final JotPrimitiveClass voidType
Method Detail |
public static JotPrimitiveClass forName(java.lang.String name)
public JotFile getFile()
getFile
in interface JotClass
public boolean isInstance(java.lang.Object obj)
JotClass
instanceof
operator. The method returns true if
the specified Object argument is non-null and can be cast to
the reference type represented by this JotClass object without
raising a ClassCastException. It returns false otherwise.
Specifically, if this JotClass object represents a declared class, returns true if the specified Object argument is an instance of the represented class (or of any of its subclasses); false otherwise. If this JotClass object represents an array class, returns true if the specified Object argument can be converted to an object of the array type by an identity conversion or by a widening reference conversion; false otherwise. If this JotClass object represents an interface, returns true if the class or any superclass of the specified Object argument implements this interface; false otherwise. If this JotClass object represents a primitive type, returns false.
isInstance
in interface JotClass
com.borland.jbuilder.jot.JotClass
obj
- The object to checkpublic boolean isAssignableFrom(JotClass cls)
JotClass
Specifically, this method tests whether the type represented by the specified JotClass parameter can be converted to the type represented by this JotClass object via an identity conversion or via a widening reference conversion.
See The Java Language Specification, sections 5.1.1 and 5.1.4 for more information.
isAssignableFrom
in interface JotClass
com.borland.jbuilder.jot.JotClass
cls
- the class or interface represented by the JotClass object to
be tested
true
if the JotClass object is either the same as, or is a
superclass or superinterface of, the class or interface represented by the
specified JotClass parameter. If this JotClass object represents a primitive
type, returns true
if the specified JotClass parameter is exactly
this JotClass object, false otherwise.
java.lang.NullPointerException
- If the specified JotClass parameter is null.public boolean isInterface()
isInterface
in interface JotClass
com.borland.jbuilder.jot.JotClass
true
if it represents an interface.public boolean isPrimitive()
isPrimitive
in interface JotClass
com.borland.jbuilder.jot.JotClass
true
if this JotClass object represents a primitive type.
booleanType
,
charType
,
byteType
,
shortType
,
intType
,
longType
,
floatType
,
doubleType
,
voidType
public boolean isArray()
isArray
in interface JotClass
com.borland.jbuilder.jot.JotClass
true
if this JotClass object represents an array type.public JotClass getComponentType()
getComponentType
in interface JotClass
com.borland.jbuilder.jot.JotClass
java.lang.reflect.Array
public java.lang.String getName()
JotClass
getName
in interface JotClass
public JotType getType()
JotClass
getType
in interface JotClass
public int getModifiers()
JotClass
The modifier encodings are defined in The Java Virtual Machine Specification, table 4.1.
getModifiers
in interface JotClass
com.borland.jbuilder.jot.JotClass
Modifier
public JotType getSuperclass()
getSuperclass
in interface JotClass
public JotType[] getInterfaces()
getInterfaces
in interface JotClass
com.borland.jbuilder.jot.JotClass
public JotField[] getDeclaredFields()
getDeclaredFields
in interface JotClass
com.borland.jbuilder.jot.JotClass
java.lang.SecurutyException
- If access to this information is denied.
Field
public JotField getDeclaredField(java.lang.String name)
getDeclaredField
in interface JotClass
com.borland.jbuilder.jot.JotClass
java.lang.NoSuchFieldException
- If a field with the specified name is not found.java.lang.SecurityException
- If access to this information is denied.
Field
public JotField[] getFields()
getFields
in interface JotClass
com.borland.jbuilder.jot.JotClass
java.lang.SecurityException
- If access to this information is denied.
Field
public JotField getField(java.lang.String name)
getField
in interface JotClass
com.borland.jbuilder.jot.JotClass
java.lang.NoSuchFieldException
- If a matching field is not found.java.lang.SecurityException
- If access to the underlying field is denied.
Field
public JotMethod[] getDeclaredMethods()
getDeclaredMethods
in interface JotClass
com.borland.jbuilder.jot.JotClass
java.lang.SecurityException
- If access to this information is denied.
Method
public JotMethod[] getDeclaredMethods(java.lang.String name)
getDeclaredMethods
in interface JotClass
com.borland.jbuilder.jot.JotClass
name
- is the name of the method sought
java.lang.SecurityException
- If access to this information is denied.
Method
public JotMethod getDeclaredMethod(java.lang.String name, JotClass[] parameterTypes)
getDeclaredMethod
in interface JotClass
com.borland.jbuilder.jot.JotClass
name
- is a String that specifies the simple name of the desired methodparameterTypes
- is an array of JotClass objects that identify the
method's formal parameter types, in declared order.
java.lang.NoSuchMethodException
- If a matching method is not found.java.lang.SecurityException
- If access to the underlying method is denied.
Method
public JotMethod[] getMethods()
getMethods
in interface JotClass
com.borland.jbuilder.jot.JotClass
java.lang.SecurityException
- if access to this information is denied.
Method
public JotMethod[] getMethods(java.lang.String name)
getMethods
in interface JotClass
com.borland.jbuilder.jot.JotClass
methodName
- A string representation of the name of the method sought.
java.lang.SecurityException
- if access to this information is denied.
Method
public JotMethod getMethod(java.lang.String name, JotClass[] parameterTypes)
getMethod
in interface JotClass
com.borland.jbuilder.jot.JotClass
java.lang.NoSuchMethodException
- If a matching method is not found.java.lang.SecurityException
- If access to the underlying method is denied.
Method
public JotConstructor[] getDeclaredConstructors()
getDeclaredConstructors
in interface JotClass
com.borland.jbuilder.jot.JotClass
java.lang.SecurityException
- If access to this information is denied.
Constructor
public JotConstructor getDeclaredConstructor(JotClass[] parameterTypes)
getDeclaredConstructor
in interface JotClass
com.borland.jbuilder.jot.JotClass
java.lang.NoSuchMethodException
- If a matching constructor is not found.java.lang.SecurityException
- If access to the underlying constructor is denied.
Constructor
public JotConstructor[] getConstructors()
getConstructors
in interface JotClass
com.borland.jbuilder.jot.JotClass
java.lang.SecurityException
- If access to this information is denied.
Constructor
public JotConstructor getConstructor(JotClass[] parameterTypes)
getConstructor
in interface JotClass
com.borland.jbuilder.jot.JotClass
java.lang.NoSuchMethodException
- If a matching constructor is not found.java.lang.SecurityException
- If access to the underlying constructor is denied.
Constructor
public void addUserData(java.lang.Object key, java.lang.Object data)
JotClass
addUserData
in interface JotClass
com.borland.jbuilder.jot.JotClass
key
- an Object which will can be used to identify the datadata
- an Object which a Jot client would like associated with this
JotClass. If the value is null, then the user data will be removed for
this item.
getUserData
public java.lang.Object getUserData(java.lang.Object key)
JotClass
getUserData
in interface JotClass
com.borland.jbuilder.jot.JotClass
key
- is the Object which identifies the client data to extract.public JotClass[] getDeclaredInnerClasses()
getDeclaredInnerClasses
in interface JotClass
public JotClass[] getInnerClasses()
getInnerClasses
in interface JotClass
public java.lang.Object newInstance() throws java.lang.InstantiationException, java.lang.IllegalAccessException
JotClass
newInstance
in interface JotClass
com.borland.jbuilder.jot.JotClass
java.lang.InstantiationException
- If you try to instantiate
an abstract class or an interface or a primitive type, or if the
instantiation fails for some other reason.java.lang.IllegalAccessException
- If the class or initializer
is not accessible.public JotClass getJotClass()
JotType
null
.getJotClass
in interface JotType
public JotClassSource getJotClassSource()
getJotClassSource
in interface JotType
public void setName(java.lang.String value) throws java.lang.IllegalAccessException
setName
in interface JotType
java.lang.IllegalAccessExcepton
- when invoked.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object that)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |