Package Torello.Java

Class FriendClassError

  • All Implemented Interfaces:
    java.io.Serializable

    public class FriendClassError
    extends java.lang.Error
    An exception that may be used in conjunction with the Friend-Class / Access-Badge Construct This Exception-Class is nothing more than a Glorified Version of the java.util.Objects construct which is often used - requireNonNull(...).

    The Friend-Class Construct involves passing a Private-Class as an "Access Token" in order to ensure that methods and / or constructs are only accessible to classes
    See Also:
    Serialized Form


    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method
      static void CHECK_NULL​(Object accessBadgeAsObj)
      static void CHECK_NULL​(Object accessBadgeAsObj, String message)
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

        🡇     🗕  🗗  🗖
        protected static final long serialVersionUID
        This fulfils the SerialVersion UID requirement for all classes that implement Java's interface java.io.Serializable. Using the Serializable Implementation offered by java is very easy, and can make saving program state when debugging a lot easier. It can also be used in place of more complicated systems like "hibernate" to store data as well.

        Note that Java's java.lang.Exception and java.lang.Error classes implement the Serializable interface, and a warning-free build expects this field be defined here.
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
         protected static final long serialVersionUID = 1;
        
      • STANDARD_MESSAGE

        🡅  🡇     🗕  🗗  🗖
        public static final java.lang.String STANDARD_MESSAGE
        This is the message passed to this Error's Constructor
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
         public static final String STANDARD_MESSAGE =
                 "Friend Class Error, Access-Badge Token has been passed null.";
        
    • Constructor Detail

      • FriendClassError

        🡅  🡇     🗕  🗗  🗖
        public FriendClassError​(java.lang.String message)
        Constructs a new Instance of this Class, using the Default-Message, with a User-Provided Extra-Message appended to the end.
        Parameters:
        message - The "extra message" to append to the end of the Default-Message
    • Method Detail

      • CHECK_NULL

        🡅  🡇     🗕  🗗  🗖
        public static final void CHECK_NULL​(java.lang.Object accessBadgeAsObj)
        If a null Access-Token has been passed, then the FriendClassError throws.
        Parameters:
        accessBadgeAsObj - Intended to be the Access-Badge instance that was provided.
        Code:
        Exact Method Body:
         if (accessBadgeAsObj == null) throw new FriendClassError();
        
      • CHECK_NULL

        🡅     🗕  🗗  🗖
        public static final void CHECK_NULL​(java.lang.Object accessBadgeAsObj,
                                            java.lang.String message)
        If a null Access-Token has been passed, then the FriendClassError throws.
        Parameters:
        accessBadgeAsObj - Intended to be the Access-Badge instance that was provided.
        message - Requests that a Specialized Message be tacked onto the end of the Exception-Message
        Code:
        Exact Method Body:
         if (accessBadgeAsObj == null) throw new FriendClassError(message);