/** * Does this variable node need to construct a special definition this is * true for variables that have bindable metadata and no attributes, or are * "public" and inside of a ClassNode with bindable metadata with no * attributes. If it has [Bindable] metadata with an attribute, such as * [Bindable(event="MyEvent")], then no special handling is needed and we * can just construct a normal VariableDefinition * * @return true if this represents a Bindable variable that needs special * handling */ private boolean needsBindableDefinition() { if (hasEmptyBindableMetadata(getMetaTagsNode())) return true; INamespaceDecorationNode nsNode = getNamespaceNode(); if (nsNode != null && nsNode.getName() == INamespaceConstants.public_) { ClassNode cls = (ClassNode)getAncestorOfType(ClassNode.class); if (cls != null && hasEmptyBindableMetadata(cls.getMetaTags())) return true; } return false; }
/** * Does this variable node need to construct a special definition this is * true for variables that have bindable metadata and no attributes, or are * "public" and inside of a ClassNode with bindable metadata with no * attributes. If it has [Bindable] metadata with an attribute, such as * [Bindable(event="MyEvent")], then no special handling is needed and we * can just construct a normal VariableDefinition * * @return true if this represents a Bindable variable that needs special * handling */ private boolean needsBindableDefinition() { if (hasEmptyBindableMetadata(getMetaTagsNode())) return true; INamespaceDecorationNode nsNode = getNamespaceNode(); if (nsNode != null && nsNode.getName() == INamespaceConstants.public_) { ClassNode cls = (ClassNode)getAncestorOfType(ClassNode.class); if (cls != null && hasEmptyBindableMetadata(cls.getMetaTags())) return true; } return false; }