Class AliasPreProcessor

java.lang.Object
org.aesh.readline.alias.AliasPreProcessor
All Implemented Interfaces:
Function<String, Optional<String>>

public class AliasPreProcessor extends Object implements Function<String, Optional<String>>
Pre-processor that expands alias names in input commands.
Author:
Ståle W. Pedersen
  • Constructor Details

    • AliasPreProcessor

      public AliasPreProcessor(AliasManager manager)
      Creates a new AliasPreProcessor with the specified alias manager.
      Parameters:
      manager - the alias manager used to look up and expand aliases
  • Method Details

    • apply

      public Optional<String> apply(String input)
      Applies alias expansion to the given input string. If the input matches an alias name, returns the expanded alias value.
      Specified by:
      apply in interface Function<String, Optional<String>>
      Parameters:
      input - the input string to process for alias expansion
      Returns:
      an Optional containing the expanded alias value if found, or empty if no alias matches