Class PrintingContext


  • public class PrintingContext
    extends java.lang.Object
    • Constructor Detail

      • PrintingContext

        public PrintingContext()
    • Method Detail

      • isFirstForVariable

        public boolean isFirstForVariable()
        Returns:
        true if we are printing first variable declaration of CtFor statement
      • isNextForVariable

        public boolean isNextForVariable()
        Returns:
        true if we are printing second or next variable declaration of CtFor statement
      • ignoreGenerics

        public boolean ignoreGenerics()
      • skipArray

        public boolean skipArray()
      • ignoreStaticAccess

        public boolean ignoreStaticAccess()
      • ignoreEnclosingClass

        public boolean ignoreEnclosingClass()
      • forceWildcardGenerics

        public boolean forceWildcardGenerics()
      • isStatement

        public boolean isStatement​(CtStatement stmt)
        Returns:
        true if `stmt` has to be handled as statement in current printing context
      • getCurrentTypeReference

        public CtTypeReference<?> getCurrentTypeReference()
        Returns:
        top level type
      • pushCurrentThis

        public void pushCurrentThis​(CtType<?> type)
      • popCurrentThis

        public void popCurrentThis()
      • toString

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

        public boolean isInCurrentScope​(CtTypeReference<?> typeRef)
        Parameters:
        typeRef -
        Returns:
        true if typeRef is equal to current (actually printed) Type (currentThis)