Class PackageCustom

All Implemented Interfaces:
IApply

public class PackageCustom extends NestingBase implements IApply
Package customization information.
Author:
Dennis M. Sosnoski
  • Field Details

    • s_allowedAttributes

      public static final StringArray s_allowedAttributes
      Enumeration of allowed attribute names
    • ELEMENT_NAME

      public static final String ELEMENT_NAME
      Element name in XML customization file.
      See Also:
    • m_simpleName

      private String m_simpleName
    • m_fullName

      private String m_fullName
    • m_fixedNamespace

      private boolean m_fixedNamespace
    • m_classMap

      private Map m_classMap
  • Constructor Details

    • PackageCustom

      PackageCustom(String simple, String full, NestingBase parent)
      Constructor. This has package access so that it can be used from the GlobalCustom class.
      Parameters:
      simple - simple package name
      full - fully-qualified package name
      parent -
  • Method Details

    • preSet

      private void preSet(IUnmarshallingContext uctx)
      Make sure all attributes are defined.
      Parameters:
      uctx - unmarshalling context
    • getName

      public String getName()
      Get fully-qualified package name.
      Returns:
      package name (empty string if default package)
    • getClassCustomization

      public ClassCustom getClassCustomization(String name)
      Get existing information for class in this package.
      Parameters:
      name - simple class name (without package)
      Returns:
      class information (null if no existing information)
    • addClassCustomization

      ClassCustom addClassCustomization(String name)
      Add information for class in this package. This just creates the basic class information structure and returns it, without populating the class details.
      Parameters:
      name - simple class name (without package)
      Returns:
      class information (null if no existing information)
    • fixNamespace

      public void fixNamespace()
      Fix the namespace for this package. If there's a parent package and that package namespace has not yet been fixed, this first fixes the parent package namespace by means of a recursive call.
    • apply

      public void apply(IClassLocator loc)
      Apply customizations to default values. This fills in the information for classes in this package by deriving information for fields or properties in each class. This is intended to be used once, after customizations have been unmarshalled.
      Specified by:
      apply in interface IApply
      Parameters:
      loc - class locator