Class InterfaceMetaData

    • Constructor Detail

      • InterfaceMetaData

        public InterfaceMetaData​(PackageMetaData parent,
                                 String name)
        Constructor. Takes the basic string information found in the MetaData file.
        Parameters:
        parent - The package to which this class belongs
        name - Name of class
    • Method Detail

      • populate

        public void populate​(ClassLoaderResolver clr,
                             ClassLoader primary,
                             MetaDataManager mgr)
        Method to provide the details of the class being represented by this MetaData. This can be used to firstly provide defaults for attributes that aren't specified in the MetaData, and secondly to report any errors with attributes that have been specified that are inconsistent with the class being represented.

        One possible use of this method would be to take a basic ClassMetaData for a class and call this, passing in the users class. This would then add AbstractMemberMetaData for all fields in this class providing defaults for all of these.

        Specified by:
        populate in class AbstractClassMetaData
        Parameters:
        clr - ClassLoaderResolver to use in loading any classes
        primary - the primary ClassLoader to use (or null)
        mgr - MetaData manager
      • initialise

        public void initialise​(ClassLoaderResolver clr)
        Method to initialise the object, creating internal convenience arrays. Initialises all sub-objects. If populate() is going to be used it should be used BEFORE calling this method.
        Overrides:
        initialise in class MetaData
        Parameters:
        clr - ClassLoader resolver
      • newDefaultedProperty

        protected AbstractMemberMetaData newDefaultedProperty​(String name)
        Utility to add a defaulted PropertyMetaData to the class. Provided as a method since then any derived classes can override it.
        Overrides:
        newDefaultedProperty in class AbstractClassMetaData
        Parameters:
        name - name of field
        Returns:
        the new PropertyMetaData
      • populatePropertyMetaData

        protected void populatePropertyMetaData​(ClassLoaderResolver clr,
                                                Class cls,
                                                boolean pkFields,
                                                ClassLoader primary)
        Populate PropertyMetaData.
        Parameters:
        clr - The ClassLoader
        cls - This class
        pkFields - Process pk fields (or non-PK fields if false)
        primary - the primary ClassLoader to use (or null)
        Throws:
        InvalidMetaDataException - if the Class for a declared type in a field cannot be loaded by the clr
        InvalidMetaDataException - if a field declared in the MetaData does not exist in the Class
      • addMetaDataForMembersNotInMetaData

        protected void addMetaDataForMembersNotInMetaData​(Class cls)
        Add MetaData for properties of the interface not declared in MetaData.
        Parameters:
        cls - Class represented by this metadata