polyglot.types
Interface ReferenceType

All Superinterfaces:
java.lang.Cloneable, Copy, Qualifier, java.io.Serializable, Type, TypeObject
All Known Subinterfaces:
ArrayType, ClassType, CofferClassType, CofferParsedClassType, CofferSubstType, ConstArrayType, ParsedClassType
All Known Implementing Classes:
ArrayType_c, ClassType_c, CofferParsedClassType_c, CofferSubstClassType_c, ConstArrayType_c, ParsedClassType_c, ReferenceType_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

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


interfaces

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

Returns:
A list of Type.
See Also:
Type

fields

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

Returns:
A list of FieldInstance.
See Also:
FieldInstance

methods

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

Returns:
A list of MethodInstance.
See Also:
MethodInstance

fieldNamed

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


methodsNamed

public 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

public 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

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


hasMethodImpl

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