Class PropertyVerifier

All Implemented Interfaces:
Serializable, Parser

public class PropertyVerifier extends AbstractOptimizer
This verifier is used by the compiler to enforce rules such as type strictness. It is, as side-effect, also responsible for extracting type information.
See Also:
  • Field Details

    • DONE

      private static final int DONE
      See Also:
    • NORM

      private static final int NORM
      See Also:
    • METH

      private static final int METH
      See Also:
    • COL

      private static final int COL
      See Also:
    • WITH

      private static final int WITH
      See Also:
    • inputs

      private List<String> inputs
    • first

      private boolean first
    • classLiteral

      private boolean classLiteral
    • resolvedExternally

      private boolean resolvedExternally
    • methodCall

      private boolean methodCall
    • deepProperty

      private boolean deepProperty
    • fqcn

      private boolean fqcn
    • paramTypes

      private Map<String,Type> paramTypes
    • ctx

      private Class ctx
  • Constructor Details

    • PropertyVerifier

      public PropertyVerifier(char[] property, ParserContext parserContext)
    • PropertyVerifier

      public PropertyVerifier(char[] property, int start, int offset, ParserContext parserContext)
    • PropertyVerifier

      public PropertyVerifier(String property, ParserContext parserContext)
    • PropertyVerifier

      public PropertyVerifier(String property, ParserContext parserContext, Class root)
  • Method Details

    • getInputs

      public List<String> getInputs()
    • setInputs

      public void setInputs(List<String> inputs)
    • analyze

      public Class analyze()
      Analyze the statement and return the known egress type.
      Returns:
      known engress type
    • recordTypeParmsForProperty

      private void recordTypeParmsForProperty(String property)
    • getBeanProperty

      private Class getBeanProperty(Class ctx, String property)
      Process bean property
      Parameters:
      ctx - - the ingress type
      property - - the property component
      Returns:
      known egress type.
    • getReturnType

      private Class getReturnType(Class context, Method m)
    • recordParametricReturnedType

      private void recordParametricReturnedType(Type parametricReturnType)
    • returnGenericType

      private Class<?> returnGenericType(Method m)
    • getCollectionProperty

      private Class getCollectionProperty(Class ctx, String property)
      Process collection property
      Parameters:
      ctx - - the ingress type
      property - - the property component
      Returns:
      known egress type
    • getMethod

      private Class getMethod(Class ctx, String name)
      Process method
      Parameters:
      ctx - - the ingress type
      name - - the property component
      Returns:
      known egress type.
    • type2Class

      private static Class<?> type2Class(Type type)
    • getWithProperty

      private Class getWithProperty(Class ctx)
    • isResolvedExternally

      public boolean isResolvedExternally()
    • isClassLiteral

      public boolean isClassLiteral()
    • isDeepProperty

      public boolean isDeepProperty()
    • isInput

      public boolean isInput()
    • isMethodCall

      public boolean isMethodCall()
    • isFqcn

      public boolean isFqcn()
    • getCtx

      public Class getCtx()
    • setCtx

      public void setCtx(Class ctx)