Class AbstractDeclaredStatement.WithoutArgument

    • Constructor Detail

      • WithoutArgument

        public WithoutArgument()
    • Method Detail

      • argument

        public final Void argument()
        Description copied from interface: ModelStatement
        Returns statement argument.
        Returns:
        statement argument or null if statement does not have argument.
      • rawArgument

        public final String rawArgument()
        Description copied from interface: DeclaredStatement
        Returns statement argument as was present in original source.
        Returns:
        statement argument as was present in original source or null, if statement does not take argument.
      • maskList

        protected static final @NonNull Object maskList​(ImmutableList<?> list)
        Utility method for squashing singleton lists into single objects. This is a CPU/mem trade-off, which we are usually willing to make: for the cost of an instanceof check we can save one object and re-create it when needed. The inverse operation is #unmaskSubstatements(Object)}.
        Parameters:
        list - list to mask
        Returns:
        Masked list
        Throws:
        NullPointerException - if list is null
      • unmaskSet

        protected static final <T> @NonNull ImmutableSet<? extends T> unmaskSet​(@NonNull Object masked,
                                                                                @NonNull Class<T> type)