|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.borland.jbuilder.jot.JotArrayClass
This implementation of JotClass represents an array type. See chapter 10 of the Java Language Specification for more information.
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)
Returns true if object passed in is an instance of JotType or JotClass and the results of getName() on the object passed in and the current object match. |
static JotArrayClass |
forName(java.lang.String className,
JotPackages manager,
int needs)
Return a JotArrayClass wrapper for an array type reference in the form: packages.class[][] |
JotClass |
getComponentType()
If this Jotclass represents an array type, returns the JotClass object representing the component type of the array; otherwise returns null. |
JotConstructor |
getConstructor(JotClass[] parameterTypes)
This method is not useful when dealing with arrays and always returns null. |
JotConstructor[] |
getConstructors()
This method is not useful when dealing with arrays and always returns a zero length array. |
JotConstructor |
getDeclaredConstructor(JotClass[] parameterTypes)
This method is not useful when dealing with arrays and always returns null. |
JotConstructor[] |
getDeclaredConstructors()
This method is not useful when dealing with arrays and always returns a zero length array. |
JotField |
getDeclaredField(java.lang.String name)
This method is not useful when dealing with arrays and always returns null. |
JotField[] |
getDeclaredFields()
This method is not useful when dealing with arrays and always returns a zero length array. |
JotClass[] |
getDeclaredInnerClasses()
This method is not useful when dealing with arrays and always returns a zero length array. |
JotMethod |
getDeclaredMethod(java.lang.String name,
JotClass[] parameterTypes)
This method is not useful when dealing with arrays and always returns null. |
JotMethod[] |
getDeclaredMethods()
This method is not useful when dealing with arrays and always returns a zero length array. |
JotMethod[] |
getDeclaredMethods(java.lang.String name)
This method is not useful when dealing with arrays and always returns a zero length array. |
static int[] |
getDimensions(java.lang.String declaration)
Given an array declaration (such as String[2][3]), this method will return an integer array of the dimensions. |
JotField |
getField(java.lang.String name)
This method is not useful when dealing with arrays and always returns null. |
JotField[] |
getFields()
This method is not useful when dealing with arrays and always returns a zero length array. |
JotFile |
getFile()
|
JotClass[] |
getInnerClasses()
This method is not useful when dealing with arrays and always returns a zero length array. |
JotType[] |
getInterfaces()
This method is not useful when dealing with arrays and always returns a zero length array. |
JotClass |
getJotClass()
Returns this which is an instance of JotClass. |
JotClassSource |
getJotClassSource()
This method is not useful when dealing with arrays and always returns null. |
JotMethod |
getMethod(java.lang.String name,
JotClass[] parameterTypes)
This method is not useful when dealing with arrays and always returns null. |
JotMethod[] |
getMethods()
This method is not useful when dealing with arrays and always returns a zero length array. |
JotMethod[] |
getMethods(java.lang.String name)
This method is not useful when dealing with arrays 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 name of the array and appends [] to that name. |
JotType |
getSuperclass()
This method is not useful when dealing with arrays 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()
Always returns true on an instance of JotArrayClass |
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 arrays and always returns false. |
boolean |
isPrimitive()
This method is not useful when dealing with arrays and always returns false. |
java.lang.Object |
newInstance()
This method is not useful when dealing with arrays and always returns null. |
static java.lang.String |
removeDimensions(java.lang.String declaration)
Returns a String representation of the array declaration after stripping the declaration of square brackets. |
void |
setName(java.lang.String value)
This method is not useful when dealing with arrays. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
public static JotArrayClass forName(java.lang.String className, JotPackages manager, int needs)
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.
JotPrimitiveClass.booleanType
,
JotPrimitiveClass.charType
,
JotPrimitiveClass.byteType
,
JotPrimitiveClass.shortType
,
JotPrimitiveClass.intType
,
JotPrimitiveClass.longType
,
JotPrimitiveClass.floatType
,
JotPrimitiveClass.doubleType
,
JotPrimitiveClass.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()
JotClass
getComponentType
in interface JotClass
com.borland.jbuilder.jot.JotClass
java.lang.reflect.Array
public java.lang.String getName()
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 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
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 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 getJotClass()
this
which is an instance of JotClass.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.IllegalAccessException
- 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
public static final int[] getDimensions(java.lang.String declaration)
public static final java.lang.String removeDimensions(java.lang.String declaration)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |