Class PropertyVerifier

  • All Implemented Interfaces:
    java.io.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:
    Serialized Form
    • Field Detail

      • inputs

        private java.util.List<java.lang.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 java.util.Map<java.lang.String,​java.lang.reflect.Type> paramTypes
      • ctx

        private java.lang.Class ctx
    • Constructor Detail

      • PropertyVerifier

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

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

        public PropertyVerifier​(java.lang.String property,
                                ParserContext parserContext)
      • PropertyVerifier

        public PropertyVerifier​(java.lang.String property,
                                ParserContext parserContext,
                                java.lang.Class root)
    • Method Detail

      • getInputs

        public java.util.List<java.lang.String> getInputs()
      • setInputs

        public void setInputs​(java.util.List<java.lang.String> inputs)
      • analyze

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

        private void recordTypeParmsForProperty​(java.lang.String property)
      • getBeanProperty

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

        private java.lang.Class getReturnType​(java.lang.Class context,
                                              java.lang.reflect.Method m)
      • recordParametricReturnedType

        private void recordParametricReturnedType​(java.lang.reflect.Type parametricReturnType)
      • returnGenericType

        private java.lang.Class<?> returnGenericType​(java.lang.reflect.Method m)
      • getCollectionProperty

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

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

        private static java.lang.Class<?> type2Class​(java.lang.reflect.Type type)
      • getWithProperty

        private java.lang.Class getWithProperty​(java.lang.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 java.lang.Class getCtx()
      • setCtx

        public void setCtx​(java.lang.Class ctx)