Class MappingToolMappingLoader

java.lang.Object
org.exolab.castor.tools.MappingToolMappingLoader

public final class MappingToolMappingLoader extends Object
Extend mapping loader to give us access to the findAccessor method.
  • Constructor Details

    • MappingToolMappingLoader

      public MappingToolMappingLoader(JavaNaming javaNaming)
      A MappingToolMappingLoader needs a javaNaming to be set.
      Parameters:
      javaNaming - the JavaNaming implementation to use
  • Method Details

    • returnsArray

      public boolean returnsArray(Class clazz, String fieldName, Class type)
      Returns true if the get method returns an array. This method is used for greater compatability with generated descriptors.
      Parameters:
      clazz - the Class to find an accessor in
      fieldName - the field for which an accessor is sought
      type - the returning type of the accessor
      Returns:
      if get method returns an array.
    • canFindAccessors

      public boolean canFindAccessors(Class clazz, String fieldName, Class type)
      Checks if any accessor for a certain field exists.
      Parameters:
      clazz - the Class to search in
      fieldName - the field to search an accessor for
      type - the return type the accessor should have
      Returns:
      true if a matching accessor could be found