polyglot.types
Interface ReferenceType

All Superinterfaces:
java.lang.Cloneable, Copy, Qualifier, java.io.Serializable, Type, TypeObject
All Known Subinterfaces:
ArrayType, ClassType, CofferClassType, CofferParsedClassType, CofferSubstType, ParsedClassType
All Known Implementing Classes:
ArrayType_c, ClassType_c, CofferParsedClassType_c, CofferSubstClassType_c, PaoParsedClassType_c, ParsedClassType_c, ReferenceType_c, SubstClassType_c

public interface ReferenceType
extends Type

A ReferenceType represents a reference type: a type which contains methods and fields and which is a subtype of Object.


Method Summary
 FieldInstance fieldNamed(java.lang.String name)
          Return the field named name, or null.
 java.util.List fields()
          Return the type's fields.
 boolean hasMethod(MethodInstance mi)
          Return the true if the type has the given method.
 boolean hasMethodImpl(MethodInstance mi)
          Return the true if the type has the given method.
 java.util.List interfaces()
          Return the type's interfaces.
 java.util.List methods()
          Return the type's methods.
 java.util.List methods(java.lang.String name, java.util.List argTypes)
          Return the methods named name with the given formal parameter types, if any.
 java.util.List methodsNamed(java.lang.String name)
          Return the methods named name, if any.
 Type superType()
          Return the type's super type.
 
Methods inherited from interface polyglot.types.Type
arrayOf, arrayOf, descendsFrom, descendsFromImpl, isArray, isBoolean, isByte, isCastValid, isCastValidImpl, isChar, isClass, isComparable, isDouble, isFloat, isImplicitCastValid, isImplicitCastValidImpl, isInt, isIntOrLess, isLong, isLongOrLess, isNull, isNumeric, isPrimitive, isReference, isShort, isSubtype, isSubtypeImpl, isThrowable, isUncheckedException, isVoid, numericConversionValid, numericConversionValid, numericConversionValidImpl, numericConversionValidImpl, toArray, toClass, toNull, toPrimitive, toReference, toString, translate
 
Methods inherited from interface polyglot.types.Qualifier
isPackage, isType, toPackage, toType
 
Methods inherited from interface polyglot.types.TypeObject
equalsImpl, isCanonical, position, typeSystem
 
Methods inherited from interface polyglot.util.Copy
copy
 

Method Detail

superType

Type superType()
Return the type's super type.


interfaces

java.util.List interfaces()
Return the type's interfaces.

Returns:
A list of Type.
See Also:
Type

fields

java.util.List fields()
Return the type's fields.

Returns:
A list of FieldInstance.
See Also:
FieldInstance

methods

java.util.List methods()
Return the type's methods.

Returns:
A list of MethodInstance.
See Also:
MethodInstance

fieldNamed

FieldInstance fieldNamed(java.lang.String name)
Return the field named name, or null.


methodsNamed

java.util.List methodsNamed(java.lang.String name)
Return the methods named name, if any.

Parameters:
name - Name of the method to search for.
Returns:
A list of MethodInstance.
See Also:
MethodInstance

methods

java.util.List methods(java.lang.String name,
                       java.util.List argTypes)
Return the methods named name with the given formal parameter types, if any.

Parameters:
name - Name of the method to search for.
argTypes - A list of Type.
Returns:
A list of MethodInstance.
See Also:
Type, MethodInstance

hasMethod

boolean hasMethod(MethodInstance mi)
Return the true if the type has the given method.


hasMethodImpl

boolean hasMethodImpl(MethodInstance mi)
Return the true if the type has the given method.