Class TypeRewriter

  • All Implemented Interfaces:
    Rewriter<java.lang.String>

    public class TypeRewriter
    extends java.lang.Object
    implements Rewriter<java.lang.String>
    • Constructor Summary

      Constructors 
      Constructor Description
      TypeRewriter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String rewrite​(java.lang.String value)  
      protected java.lang.String rewriteUnwrappedType​(java.lang.String value)
      This is called by the default rewrite implementation with the unwrapped type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TypeRewriter

        public TypeRewriter()
    • Method Detail

      • rewrite

        @Nonnull
        public java.lang.String rewrite​(@Nonnull
                                        java.lang.String value)
        Specified by:
        rewrite in interface Rewriter<java.lang.String>
      • rewriteUnwrappedType

        @Nonnull
        protected java.lang.String rewriteUnwrappedType​(@Nonnull
                                                        java.lang.String value)
        This is called by the default rewrite implementation with the unwrapped type.

        For array types, the unwrapped type is the type with the array specifiers removed. And there is no difference for non-array types.

        Parameters:
        value - The unwrapped type
        Returns:
        The modified version of the unwrapped type. This will be re-array-ified if the original wrapped type was an array.