Class ProcessorHandler

  • All Implemented Interfaces:
    java.lang.reflect.InvocationHandler

    class ProcessorHandler
    extends java.lang.Object
    implements java.lang.reflect.InvocationHandler
    Handles a proxy on a Processor's properties. In contrast with the Converter, this handler always returns an instance when the return type is a Syntax interface even if this instruction is not set. This makes it easier to work with defaults. To find out if an instruction is actually set, use an Optional.
    • Constructor Detail

      • ProcessorHandler

        public ProcessorHandler​(Processor processor)
    • Method Detail

      • invoke

        public java.lang.Object invoke​(java.lang.Object proxy,
                                       java.lang.reflect.Method method,
                                       java.lang.Object[] args)
                                throws java.lang.Throwable
        Specified by:
        invoke in interface java.lang.reflect.InvocationHandler
        Throws:
        java.lang.Throwable
      • getInstructions

        public static <T> T getInstructions​(Processor processor,
                                            java.lang.Class<T> type)
      • toString

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