Abstract class that represents a Java Class.
Concrete implementations of this class are for example bytecode-class and source-class.
Strategy details
|
ATerm
|
get-canonical-name
|
Returns the canonical name of this class.
Canonical names (see section 6.7) are fully qualified namesthat uniquely identify a class. There are no two different canonical names that refer to the same class.
type
|
Class Object -> TypeName
|
|
|
ATerm
|
get-constructors
|
Returns all constructors of this class, including superclasses.
type
|
Class Object -> List(Constructor Object)
|
|
|
ATerm
|
get-declared-constructor-list
|
Returns a list of the constructors declared in this class.
Don't invoke directly: use get-declared-constructors
type
|
Class Object -> List(Constructor Object)
|
todo
|
Is a list the most efficient way for storing constructors?
|
|
|
ATerm
|
get-declared-constructors
|
Returns a list of the constructors declared in this class.
type
|
Class Object -> List(Constructor Object)
|
|
|
ATerm
|
get-declared-field(ATerm name)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
|
Returns the field 'name', which must be declared in this class.
type
|
Class Object -> Field Object
|
|
|
ATerm
|
get-declared-field-table
|
Private. Do not invoke.
|
|
ATerm
|
get-declared-fields
|
No information available.
type
|
Class Object -> List(Field Object)
|
|
|
ATerm
|
get-declared-member-type(ATerm name)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
|
Returns the type 'name', which must be declared in this class.
type
|
Class Object -> Class Object
|
|
|
ATerm
|
get-declared-member-type-table
|
Private. Do not invoke directly.
type
|
Hashtable(String, Class Object)
|
|
|
ATerm
|
get-declared-member-types
|
Returns all the member types declared in this class.
type
|
Class Object -> List(Class Object)
|
|
|
ATerm
|
get-declared-method-table
|
Returns a hashtable of the methods declared in this class.
type
|
Class Object -> HashTable(String, Method Object)
|
|
|
ATerm
|
get-declared-methods
|
Returns a list of the methods declared in this class.
type
|
Class Object -> List(Method Object)
|
|
|
ATerm
|
get-declared-methods(ATerm name)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
|
Returns the methods 'name', which must be declared in this class.If no such method exits, the empty list is returned.
type
|
Class Object -> List(Method Object)
|
|
|
ATerm
|
get-enclosing-class
|
No information available.
todo
|
Anonymous classes don't have a declaring class.
|
|
|
ATerm
|
get-field(ATerm name)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
|
Returns the field for the given name.
If multiple fields are accessible, then an access of this field ambiguous and this strategy will fail. Use get-fields(|name) if you need all the field declarations of the given name.
If the class is an array class, then this method will succeed and return a field if
type
|
Class Object -> Field Object
|
|
|
ATerm
|
get-fields
|
Returns all fields of this class, including those inherited from superclasses and superinterfaces.
For array classes, this method does return the length field (java.lang.getFields doesnot return the length field for an array class).
type
|
Class Object -> List(Field Object)
|
|
|
ATerm
|
get-fields(ATerm name)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
|
Returns all the visible fields with the given name.
For valid Java classes, this should return a singletonlist. For invalid Java classes, there might be multipledeclarations with the same name.
todo
|
Optimize by not retrieving all the fields first.
|
type
|
Class Object -> List(Field Object)
|
|
|
ATerm
|
get-formal-type-parameter(ATerm name)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
ATerm
name
|
Simple name of the type parameter (String)
|
|
Returns the type parameter of the given name, or failsif this class thus have a type parameter with this name.
type
|
Class Object -> TypeParam
|
|
|
ATerm
|
get-formal-type-parameters
|
Abstract method. Has to declared in subclasses.
type
|
Class Object -> List(TypeParam)
|
|
|
ATerm
|
get-fully-qualified-name
|
Returns the canonical name of this class, which is a fully qualified name.
type
|
Class Object -> TypeName
|
|
|
ATerm
|
get-inherited-fields
|
Returns all fields of this class that are inherited from superclasses and superinterfaces.
type
|
Class Object -> List(Fields Object)
|
|
|
ATerm
|
get-inherited-fields(ATerm name)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
ATerm
name
|
Simple name of the field (String)
|
|
Returns all fields of this class that are inherited from superclasses and superinterfaces.
type
|
Class Object -> List(Field Object)
|
|
|
ATerm
|
get-inherited-member-types
|
Returns all member types of this class that are inherited from superclasses and superinterfaces.
type
|
Class Object -> List(Class Object)
|
|
|
ATerm
|
get-inherited-member-types(ATerm name)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
ATerm
name
|
Simple name of the class (String)
|
|
Returns all member types of this class with the given namethat are inherited from superclasses and superinterfaces.
type
|
Class Object -> List(Class Object)
|
|
|
ATerm
|
get-inherited-methods
|
Returns all methods of this class that are inherited from superclasses and superinterfaces.
type
|
Class Object -> List(Method Object)
|
|
|
ATerm
|
get-inherited-methods(ATerm name)
|
Returns all methods of this class with this name that are inherited from superclasses and superinterfaces.
type
|
Class Object -> List(Method Object)
|
|
|
ATerm
|
get-member-type(ATerm name)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
|
Returns the member type of this class with this name.
type
|
Class Object -> Class Object
|
|
|
ATerm
|
get-member-types
|
Returns all member types of this class.
type
|
Class Object -> List(Class Object)
|
|
|
ATerm
|
get-member-types(ATerm name)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
|
Returns the member types of this class with this name.For valid classes, this always returns a singleton list.
type
|
Class Object -> List(Class Object)
|
todo
|
Store member types in a list an remove the ![<id>]?
|
|
|
ATerm
|
get-methods
|
Returns all member methods of this class.Including superclasses and superinterfaces.
type
|
Class Object -> List(Method Object)
|
|
|
ATerm
|
get-methods(ATerm name)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
|
Returns all member methods of this class with this name.Including superclasses and superinterfaces.
type
|
Class Object -> List(Method Object)
|
|
|
ATerm
|
get-name
|
Returns the canonical name of this class.
type
|
Class Object -> TypeName
|
|
|
ATerm
|
get-simple-name
|
Returns the simple name of this class.
type
|
Class Object -> String
|
|
|
ATerm
|
get-superclass
|
Returns the super class of this class.Fails if this class has no superclass (i.e. this class is java.lang.Object)
type
|
Class Object -> Class Object
|
|
|
ATerm
|
get-superclass(ATerm intype)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
|
Superclass of a parameterized types.
type
|
Class Object -> Source Type
|
|
|
ATerm
|
get-superclass(ATerm intype)
|
Superclass of a raw type.
|
|
ATerm
|
get-superclass(ATerm intype)
|
Superclass of a unparameterized type.
|
|
ATerm
|
get-superclass-as-type
|
Returns the super class of this class as a type.
Abstract method. Must be implemented by the subclass.
type
|
Class Object -> Source Type
|
|
|
ATerm
|
get-superinterfaces
|
Returns the direct super interfaces
type
|
Class Object -> Class Object
|
|
|
ATerm
|
get-superinterfaces(ATerm intype)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
|
No information available.
type
|
Class Object -> List(Source Type)
|
|
|
ATerm
|
get-superinterfaces(ATerm intype)
|
Superclass of a raw type.
|
|
ATerm
|
get-superinterfaces(ATerm intype)
|
Superclass of a unparameterized type.
|
|
ATerm
|
get-superinterfaces-as-type
|
Returns the interfaces implemented by this class as types.
Abstract method. Must be implemented by the subclass.
type
|
Class Object -> List(Source Type)
|
|
|
ATerm
|
has-declared-field(ATerm name)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
|
Succeeds if the current class declares a field with this name.
type
|
Class Object -> Class Object
|
|
|
ATerm
|
has-declared-member-type(ATerm name)
|
Succeeds if the current class declares a class with this name.
type
|
Class Object -> Class Object
|
|
|
ATerm
|
has-declared-method(ATerm name)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
|
Succeeds if the current class declares a method with this name.
type
|
Class Object -> Class Object
|
|
|
ATerm
|
has-field(ATerm name)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
|
Succeeds if the current class has a field with this name.The field might be inherited.
type
|
Class Object -> Class Object
|
|
|
ATerm
|
has-formal-type-parameter(ATerm name)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
ATerm
name
|
Simple name of the type parameter (String)
|
|
Succeeds if this class has a type parameter of the given name.
type
|
Class Object -> TypeParam
|
|
|
ATerm
|
has-inherited-field(ATerm name)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
ATerm
name
|
Simple name of the class (String)
|
|
Succeeds if the current class inherits a field with this name.
type
|
Class Object -> Class Object
|
|
|
ATerm
|
has-inherited-member-type(ATerm name)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
ATerm
name
|
Simple name of the class (String)
|
|
Succeeds if the current class inherits a member type with this name.
type
|
Class Object -> Class Object
|
|
|
ATerm
|
has-inherited-method(ATerm name)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
|
Succeeds if the current class inherits a method with this name.
type
|
Class Object -> Class Object
|
|
|
ATerm
|
has-member-type(ATerm name)
|
Succeeds if this has a member type with the given name.
type
|
Class Object -> Class Object
|
type
|
name String
|
|
|
ATerm
|
has-method(ATerm name)
|
Succeeds if this has a member method with the given name.
type
|
Class Object -> Class Object
|
type
|
name String
|
|
|
ATerm
|
init-declared-constructor-list
|
Must be implemented by subclasses.
|
|
ATerm
|
init-declared-constructor-list
|
Default implementation (not required to use this).
|
|
ATerm
|
init-declared-field-table
|
Abstract strategy. Must be implemented by subclasses.
|
|
ATerm
|
init-declared-field-table
|
Default implementation of init-declared-field-table, which requires thesubclass to implement init-get-declared-field-list.
|
|
ATerm
|
init-declared-member-type-table
|
Should be overridden by a subclass.
|
|
ATerm
|
init-declared-method-table
|
Abstract strategy. Must be implemented by subclasses.
|
|
ATerm
|
init-declared-method-table
|
Default implementation.
|
|
ATerm
|
init-get-declared-field-list
|
Abstract strategy. Must be implemented by subclasses if the default init-declared-field-table is used.
|
|
ATerm
|
instanceof-JavaClass
|
Checks if current term is an instance of JavaClass.Subclasses of class implement this strategy.
|
|
ATerm
|
instanceof-JavaMember
|
Succeeds if the current term is an instance of a Java member.This alternative declares a JavaClass to be a JavaMember.
todo
|
Make a member class a separate subclass?
|
|
|
ATerm
|
is-anonymous-class
|
No information available.
|
|
ATerm
|
is-generic
|
Succeeds if this is a generic class (i.e. has formal type parameters).
|
|
ATerm
|
is-local-class
|
No information available.
|
|
ATerm
|
is-member-type
|
Succeeds if this class is a member of an enclosing class.
|
|
ATerm
|
is-nested-class
|
Succeeds if this is a nested class.
|
|
ATerm
|
is-not-inherited(ATerm inclass)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
ATerm
inclass
|
Class Object
|
|
Private methods are not inherited.
This strategy is defined as not-inherited to allow overloading.
type
|
Method Object -> Method Object
|
|
|
ATerm
|
is-not-inherited(ATerm inclass)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
ATerm
inclass
|
Class Object
|
|
Hidden fields are not inherited.
type
|
Field Object -> Field Object
|
|
|
ATerm
|
is-not-inherited(ATerm inclass)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
ATerm
inclass
|
Class Object
|
|
Hidden member types are not inherited.
type
|
Field Object -> Field Object
|
|
|
ATerm
|
is-not-inherited(ATerm inclass)
|
Members with default access are not inherited into classes defined in a different package.
|
|
ATerm
|
is-subclass(ATerm class)
|
File
|
class.str
|
Author
|
unknown
|
Since
|
unknown
|
|
Parameters
ATerm
class
|
The possible superclass.
|
|
Succeeds if this class is subclass of the given class.
type
|
Class Object -> Class Object
|
|
|
ATerm
|
is-top-level-class
|
Succeeds if this is a top level class.
|
|