Class ConstructorDefinition

    • Field Detail

      • propagatedFrom

        public transient java.lang.Object propagatedFrom
        When this is a generated constructor, this stores the reference to the constructor from which it was generated
    • Constructor Detail

      • ConstructorDefinition

        public ConstructorDefinition()
    • Method Detail

      • findType

        public java.lang.Object findType​(java.lang.String typeName,
                                         java.lang.Object refType,
                                         TypeContext context)
        If you happen to refer to an object in the constructor it leads to an infinite loop which is a pain so here we flag that as an error and don't hook up the reference.
        findType in class AbstractMethodDefinition
      • getReturnType

        public java.lang.Object getReturnType​(boolean boundParams)
      • getTypeDeclaration

        public java.lang.Object getTypeDeclaration​(java.util.List<? extends ITypedObject> args,
                                                   boolean resolve)
      • getPropertyName

        public java.lang.String getPropertyName()
      • hasField

        public boolean hasField()
      • hasGetMethod

        public boolean hasGetMethod()
      • hasSetMethod

        public boolean hasSetMethod()
      • hasSetIndexMethod

        public boolean hasSetIndexMethod()
      • getGetMethodFromSet

        public java.lang.Object getGetMethodFromSet()
      • getSetMethodFromGet

        public java.lang.Object getSetMethodFromGet()
      • getFieldFromGetSetMethod

        public java.lang.Object getFieldFromGetSetMethod()
      • isGetMethod

        public boolean isGetMethod()
      • isSetMethod

        public boolean isSetMethod()
      • isGetIndexMethod

        public boolean isGetIndexMethod()
      • isSetIndexMethod

        public boolean isSetIndexMethod()
      • isConstructor

        public boolean isConstructor()
      • convertToMethod

        public MethodDefinition convertToMethod​(java.lang.String methName)
        When overriding constructors, we need to convert them to a method
      • getConstrArgs

        public Expression[] getConstrArgs()
        Returns the constructor args for any compiled types which we extends from. These constructorArgs needs to be compiled into the super call
        getConstrArgs in class AbstractMethodDefinition
      • isModifySuper

        public boolean isModifySuper()
      • getSuperExpresssion

        public IdentifierExpression getSuperExpresssion()
        Returns a real super() expression in the constructor - i.e. one that maps to an extended class. Used for dynamic stubs to determine if we need to use the original super expression in the method to preserve the compile time contract.
      • deepCopy

        public ConstructorDefinition deepCopy​(int options,
                                              java.util.IdentityHashMap<java.lang.Object,​java.lang.Object> oldNewMap)
        Description copied from interface: ISemanticNode
        Performs a deep copy of the semantic node tree. Subclasses should do their own copy implementation to decide what else to copy. Uses the copy options flags above. The default, with 0, just copies the semantic node information so you get a new tree like's it parsed but without parse node info. Use that mode only if you want to throw away the original source and regenerate it all from scratch. Otherwise, you can copy the parse tree as well. If you want to copy the semantic node's initial resolved state - including it's init/start, etc. and whatever the subclass adds to that copy, use CopyState or CopyNormal - for both parse nodes and state.
        Specified by:
        deepCopy in interface ISemanticNode
        deepCopy in class AbstractMethodDefinition