ariba.util.fieldtype
Class JavaTypeProvider.JavaTypeInfo

java.lang.Object
  extended by ariba.util.fieldtype.JavaTypeProvider.JavaTypeInfo
All Implemented Interfaces:
PropertyResolver, TypeInfo
Direct Known Subclasses:
ContainerTypeInfo
Enclosing class:
JavaTypeProvider

public static class JavaTypeProvider.JavaTypeInfo
extends java.lang.Object
implements TypeInfo, PropertyResolver

Subclass of TypeInfo for Java class.


Field Summary
 
Fields inherited from interface ariba.util.fieldtype.TypeInfo
AccessibilityPrivate, AccessibilityPublic, AccessibilitySafe
 
Method Summary
 JavaTypeProvider.JavaTypeInfo castToPseudoType(TypeInfo pseudoClass)
          For FMD classes, implementation would be FlexMasterData java type.
 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)
           
 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.
 java.lang.Class getProxiedClass()
           
 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.
 PropertyInfo resolvePropertyForName(TypeRetriever retriever, java.lang.String name)
           
 TypeInfo resolveTypeForName(TypeRetriever retriever, java.lang.String name)
           
 void setProxiedClass(java.lang.Class proxiedClass)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

castToPseudoType

public JavaTypeProvider.JavaTypeInfo castToPseudoType(TypeInfo pseudoClass)
For FMD classes, implementation would be FlexMasterData java type. However class type should be from classMeta e.g. vrealm.fmd.MYFMD. This method narrows the newly created JavaTypeInfo to the type passed in the argument.

Parameters:
pseudoClass - has TypeInfo for vrealm.fmd.MYFMD
Returns:

getName

public java.lang.String getName()
Description copied from interface: TypeInfo
Get the type name.

Specified by:
getName in interface TypeInfo
Returns:
the name of the type

getImplementationName

public java.lang.String getImplementationName()
Description copied from interface: TypeInfo
Get the implementation name.

Specified by:
getImplementationName in interface TypeInfo
Returns:
the implementation name of the type. It is typically the class name of the type.

getProxiedClass

public java.lang.Class getProxiedClass()

setProxiedClass

public void setProxiedClass(java.lang.Class proxiedClass)

getElementType

public TypeInfo getElementType()
Description copied from interface: TypeInfo
If this type is a collection of element type, this method returns the TypeInfo of the element type. Otherwise, this method return false.

Specified by:
getElementType in interface TypeInfo
Returns:
the TypeInfo of element type. Otherwise, return null.
See Also:
TypeInfo.getElementType()

isAssignableFrom

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

Specified by:
isAssignableFrom in interface TypeInfo
Parameters:
other - - the type to assign to this type.
Returns:
true if the test condition passes.

isCompatible

public boolean isCompatible(TypeInfo other)
Description copied from interface: TypeInfo
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.

Specified by:
isCompatible in interface TypeInfo
Parameters:
other - - the other type to compare with this type.
Returns:
true if the test condition passes.

isWideningTypeOf

public boolean isWideningTypeOf(TypeInfo other)
Description copied from interface: TypeInfo
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.

Specified by:
isWideningTypeOf in interface TypeInfo
Parameters:
other - - the other type to compare with this type.
Returns:
true if the test condition passes.

getField

public FieldInfo getField(TypeRetriever retriever,
                          java.lang.String name)
Description copied from interface: TypeInfo
Get the field belongs to this type.

Specified by:
getField in interface TypeInfo
Parameters:
retriever - - A TypeRetriever for retriever type information.
name - - the name of the field
Returns:
A FieldInfo object representing the field.

getMethodForName

public MethodInfo getMethodForName(TypeRetriever retriever,
                                   java.lang.String name,
                                   java.util.List<java.lang.String> parameters)

getMethodForName

public MethodInfo getMethodForName(TypeRetriever retriever,
                                   java.lang.String name,
                                   java.util.List<java.lang.String> parameters,
                                   boolean staticOnly)
Description copied from interface: TypeInfo
Get the method belongs to this type.

Specified by:
getMethodForName in interface TypeInfo
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

public java.util.Set getAllMethods(TypeRetriever retriever)
Description copied from interface: TypeInfo
Get all methods belong to this type.

Specified by:
getAllMethods in interface TypeInfo
Parameters:
retriever - - A TypeRetriever for retriever type information.
Returns:
A Set of MethodInfo objects representing all methods.

getAccessibility

public int getAccessibility()
Description copied from interface: TypeInfo
Return the accessiblity code of this type.

Specified by:
getAccessibility in interface TypeInfo
Returns:
Return the value of AccessibilityPrivate, AccessibilityPublic, or AccessibilitySafe.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getPropertyResolver

public PropertyResolver getPropertyResolver()
Description copied from interface: TypeInfo
Create a PropertyResolver that can be used to resolve property name.

Specified by:
getPropertyResolver in interface TypeInfo
Returns:
A PropertyResovler

resolveTypeForName

public TypeInfo resolveTypeForName(TypeRetriever retriever,
                                   java.lang.String name)
Specified by:
resolveTypeForName in interface PropertyResolver

resolvePropertyForName

public PropertyInfo resolvePropertyForName(TypeRetriever retriever,
                                           java.lang.String name)
Specified by:
resolvePropertyForName in interface PropertyResolver


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