ariba.util.fieldtype
Interface TypeInfo

All Known Implementing Classes:
ContainerTypeInfo, JavaTypeProvider.JavaTypeInfo, NullTypeInfo

public interface TypeInfo

TypeInfo is an abstraction of a type of an underlying type system.


Field Summary
static int AccessibilityPrivate
          The accessiblity code for the type. AccessibilityPrivate - private accessiblity.
static int AccessibilityPublic
           
static int AccessibilitySafe
           
 
Method Summary
 int getAccessibility()
          Return the accessiblity code of this type.
 java.util.Set getAllMethods(TypeRetriever retriever)
          Get all methods belong to this type.
 TypeInfo getElementType()
          If this type is a collection of element type, this method returns the TypeInfo of the element type.
 FieldInfo getField(TypeRetriever retriever, java.lang.String name)
          Get the field belongs to this type.
 java.lang.String getImplementationName()
          Get the implementation name.
 MethodInfo getMethodForName(TypeRetriever retriever, java.lang.String name, java.util.List<java.lang.String> parameters, boolean staticOnly)
          Get the method belongs to this type.
 java.lang.String getName()
          Get the type name.
 PropertyResolver getPropertyResolver()
          Create a PropertyResolver that can be used to resolve property name.
 boolean isAssignableFrom(TypeInfo other)
          This method tests if this type is asssignable from other type.
 boolean isCompatible(TypeInfo other)
          This method returns true if one type is assignable to another.
 boolean isWideningTypeOf(TypeInfo other)
          This method returns true if one type can be widening to another.
 

Field Detail

AccessibilityPrivate

static final int AccessibilityPrivate
The accessiblity code for the type.
  1. AccessibilityPrivate - private accessiblity. This indicates that access is limited to within Ariba shipped codeline.
  2. AccessibilityPublic - public accessibility. This indicates that the access is open for customization with possible future upgrade or compatibility issues.
  3. AccessibilitySafe - safe accessbility. This indicates that the access is open for customization without future upgrade or compatbility issue.
  4. See Also:
    Constant Field Values

AccessibilityPublic

static final int AccessibilityPublic
See Also:
Constant Field Values

AccessibilitySafe

static final int AccessibilitySafe
See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
Get the type name.

Returns:
the name of the type

getImplementationName

java.lang.String getImplementationName()
Get the implementation name.

Returns:
the implementation name of the type. It is typically the class name of the type.

getElementType

TypeInfo getElementType()
If this type is a collection of element type, this method returns the TypeInfo of the element type. Otherwise, this method return false.

Returns:
the TypeInfo of element type. Otherwise, return null.

isAssignableFrom

boolean isAssignableFrom(TypeInfo other)
This method tests if this type is asssignable from other type. This method should also handle auto-boxing and auto-unboxing for primitive types.

Parameters:
other - - the type to assign to this type.
Returns:
true if the test condition passes.

isCompatible

boolean isCompatible(TypeInfo other)
This method returns true if one type is assignable to another. This implies that one type is convertible to another through reference widening or narrowing. For primitive type, this method can also return true if the two types can be promoted into a common type. This method should also handle auto-boxing and auto-unboxing for primitive types.

Parameters:
other - - the other type to compare with this type.
Returns:
true if the test condition passes.

isWideningTypeOf

boolean isWideningTypeOf(TypeInfo other)
This method returns true if one type can be widening to another. This typically checks using referencing widening where this type is a superclass of other type. For primitive type, this method can also return true if the other type can be promoted to this type using java primitive widening. This method should also handle auto-boxing and auto-unboxing for primitive types.

Parameters:
other - - the other type to compare with this type.
Returns:
true if the test condition passes.

getAccessibility

int getAccessibility()
Return the accessiblity code of this type.

Returns:
Return the value of AccessibilityPrivate, AccessibilityPublic, or AccessibilitySafe.

getField

FieldInfo getField(TypeRetriever retriever,
                   java.lang.String name)
Get the field belongs to this type.

Parameters:
retriever - - A TypeRetriever for retriever type information.
name - - the name of the field
Returns:
A FieldInfo object representing the field.

getMethodForName

MethodInfo getMethodForName(TypeRetriever retriever,
                            java.lang.String name,
                            java.util.List<java.lang.String> parameters,
                            boolean staticOnly)
Get the method belongs to this type.

Parameters:
retriever - - A TypeRetriever for retriever type information.
name - - the name of the method
parameters - - list of parameter type names
staticOnly - will be true when used in a class static context such as className.staticMethod(), will be false for non static usages e.g. instance.staticMethod() or instance.nonStaticMethod()
Returns:
A MethodInfo object representing the method.

getAllMethods

java.util.Set getAllMethods(TypeRetriever retriever)
Get all methods belong to this type.

Parameters:
retriever - - A TypeRetriever for retriever type information.
Returns:
A Set of MethodInfo objects representing all methods.

getPropertyResolver

PropertyResolver getPropertyResolver()
Create a PropertyResolver that can be used to resolve property name.

Returns:
A PropertyResovler


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.