Creates a method used to call all extensions' .interceptPropertyGet(...) method when needed (if the extension is implementing it)
@param {any} entity Reference to the parent entity instance
@param {any} properties Properties configuration
8754
function interceptPropertyGet(_ref7) {
  var _this2 = this;

  var entity = _ref7.entity,
      properties = _ref7.properties;

  // Create a proxy .interceptPropertyGet(...) methods, per property
  this.interceptPropertyGet = _lodash2.default.reduce(properties, function (interceptPropertyGet, propertyConfiguration, propertyName) {

    // Fetch extensions implementing .interceptPropertyGet(...) method for this property's interceptor functions
    var getterInterceptors = _lodash2.default.compact(_lodash2.default.map(_this2.extensions, function (extension) {
      // Check if implementing .interceptPropertyGet(...) method
      if (extension.implemented.interceptPropertyGet) {
        // Return the setter interceptor function (if returned for this property)
        return extension.interceptPropertyGet(propertyName, propertyConfiguration);
      }
    }));

    // Initialize a per-property setter intercepting function and returns the updated value
    interceptPropertyGet[propertyName] = function (currentValue, newValue) {

      // Initialize the EnTTExtValueEvent event
      var changes = [currentValue, newValue],
          event = new _enttext.EnTTExtValueEvent({
        changes: changes,
        currentValue: currentValue,
        value: newValue
      });

      // Cycle through all the setter interceptors
      _lodash2.default.forEach(getterInterceptors, function (getterInterceptor) {
        // Execute the extensino intercaptor
        getterInterceptor(entity, properties, event);
        // Update the changes array for the next interceptor
        changes.push(event.value);
      });

      // Return the updated value
      return event.value;
    };

    // Return composed interceptors
    return interceptPropertyGet;
  }, {});
}
189578
function (propertyName) {
      var value = this.client[propertyName];
      if (! _.isUndefined(this[propertyName])) {
        // pass, defer to resource manager prototype properties
      }
      else if (_.isFunction(value)) {
        // copy functions (including the error ctors) by direct reference
        this[propertyName] = value;
      }
      else if (_.contains(this.client.serviceCallParams, propertyName)) {
        // default service call params which are not function values are proxied
        // via getter functions
        this[propertyName] = function () { return this.client[propertyName]; };
      }
      // all other properties are assumed to be client configuration, and
      // should be accessed by referencing the ``client`` instance property.
    }
742213
function afterChangeProcessed(_ref5) {
  var entity = _ref5.entity,
      properties = _ref5.properties;


  // Fetch extensions implementing .afterChangeProcessed(...) method
  var extensions = _lodash2.default.filter(this.extensions, function (extension) {
    return extension.implemented.afterChangeProcessed;
  });

  // Create a proxy .afterChangeProcessed(...) method
  this.afterChangeProcessed = function (event) {
    // Execute all extensions' .afterChangeProcessed(...) method
    _lodash2.default.forEach(extensions, function (extension) {
      extension.afterChangeProcessed(entity, properties, event);
    });
  };
}
1124033
function onEntityInstantiate ({ entity, properties }) {

  // Fetch extensions implementing .onEntityInstantiate(...) method
  let extensions = _.filter(this.extensions, (extension) => {
    return extension.implemented.onEntityInstantiate;
  });

  // Create a proxy .onEntityInstantiate(...) method
  this.onEntityInstantiate =  () => {
    // Execute all extensions' .onEntityInstantiate(...) method
    _.forEach(extensions, (extension) => {
      extension.onEntityInstantiate(entity, properties);
    });
  };

}
41454
private MethodCallExpression createMethodCallExpression(PropertyExpression propertyExpression, Expression arguments) {
        MethodCallExpression methodCallExpression =
                new MethodCallExpression(
                        propertyExpression.getObjectExpression(),
                        propertyExpression.getProperty(),
                        arguments
                );

        methodCallExpression.setImplicitThis(false);
        methodCallExpression.setSafe(propertyExpression.isSafe());
        methodCallExpression.setSpreadSafe(propertyExpression.isSpreadSafe());

        // method call obj*.m(): "safe"(false) and "spreadSafe"(true)
        // property access obj*.p: "safe"(true) and "spreadSafe"(true)
        // so we have to reset safe here.
        if (propertyExpression.isSpreadSafe()) {
            methodCallExpression.setSafe(false);
        }

        // if the generics types meta data is not empty, it is a generic method call, e.g. obj.<Integer>a(1, 2)
        methodCallExpression.setGenericsTypes(
                propertyExpression.getNodeMetaData(PATH_EXPRESSION_BASE_EXPR_GENERICS_TYPES));

        return methodCallExpression;
    }
1193477
@Override
    public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
        return methodProxy.invokeSuper(o, objects);
    }
1162965
function Property(path, node, scope, getObjectRef, file) {
  if (!node.method && node.kind === "init") return;
  if (!t.isFunction(node.value)) return;

  var replaceSupers = new _helpersReplaceSupers2["default"]({
    getObjectRef: getObjectRef,
    methodNode: node,
    methodPath: path,
    isStatic: true,
    scope: scope,
    file: file
  });

  replaceSupers.replace();
}
304087
private MethodMetadata<?, ?> createPropertyMethodMetadata(AnnotatedType annotatedType, PropertyMethod propertyMethod) {
        MethodMetadata<?, ?> methodMetadata;
        Class<?> propertyType = propertyMethod.getType();
        if (Collection.class.isAssignableFrom(propertyType)) {
            Type genericType = propertyMethod.getGenericType();
            ParameterizedType type = (ParameterizedType) genericType;
            Class<?> elementType;
            Type typeArgument = type.getActualTypeArguments()[0];
            if (typeArgument instanceof Class) {
                elementType = (Class<?>) typeArgument;
            } else if (typeArgument instanceof ParameterizedType) {
                ParameterizedType parameterizedTypeArgument = (ParameterizedType) typeArgument;
                elementType = (Class<?>) parameterizedTypeArgument.getRawType();
            } else if (typeArgument instanceof TypeVariable<?>) {
                TypeVariable<?> typeVariable = (TypeVariable<?>) typeArgument;
                Type[] bounds = typeVariable.getBounds();
                if (bounds.length != 1) {
                    throw new XOException("Cannot determine boundary of " + typeVariable.getName() + " of collection property "
                            + propertyMethod.getAnnotatedElement().toGenericString());
                }
                elementType = (Class<?>) bounds[0];
            } else {
                throw new XOException("Cannot determine argument type of collection property " + propertyMethod.getAnnotatedElement().toGenericString());
            }
            AnnotatedType annotatedTypeArgument = new AnnotatedType(elementType);
            if (isEntityType(annotatedTypeArgument)) {
                Direction relationDirection = getRelationDirection(propertyMethod, Direction.FROM);
                com.buschmais.xo.spi.reflection.AnnotatedElement<?> relationElement = getRelationDefinitionElement(propertyMethod);
                RelationTypeMetadata relationshipType = new RelationTypeMetadata<>(metadataFactory.createRelationMetadata(relationElement, metadataByType));
                methodMetadata = new EntityCollectionPropertyMethodMetadata<>(propertyMethod, relationshipType, relationDirection,
                        metadataFactory.createCollectionPropertyMetadata(propertyMethod));
            } else if (isRelationType(annotatedTypeArgument)) {
                TypeMetadata relationTypeMetadata = getOrCreateTypeMetadata(elementType);
                RelationTypeMetadata<RelationMetadata> relationMetadata = (RelationTypeMetadata) relationTypeMetadata;
                Direction relationDirection = getRelationDirection(annotatedType, propertyMethod, relationTypeMetadata, relationMetadata);
                methodMetadata = new RelationCollectionPropertyMethodMetadata<>(propertyMethod, relationMetadata, relationDirection,
                        metadataFactory.createCollectionPropertyMetadata(propertyMethod));
            } else {
                throw new XOException("Unsupported type argument '" + elementType.getName() + "' for collection property: " + propertyType.getName());
            }
        } else if (annotatedMethods.containsKey(propertyType)) {
            AnnotatedType referencedType = new AnnotatedType(propertyType);
            Direction relationDirection;
            RelationTypeMetadata<RelationMetadata> relationMetadata;
            if (isEntityType(referencedType)) {
                relationDirection = getRelationDirection(propertyMethod, Direction.FROM);
                com.buschmais.xo.spi.reflection.AnnotatedElement<?> relationElement = getRelationDefinitionElement(propertyMethod);
                relationMetadata = new RelationTypeMetadata<>(metadataFactory.createRelationMetadata(relationElement, metadataByType));
                methodMetadata = new EntityReferencePropertyMethodMetadata<>(propertyMethod, relationMetadata, relationDirection,
                        metadataFactory.createReferencePropertyMetadata(propertyMethod));
            } else if (isRelationType(referencedType)) {
                TypeMetadata relationTypeMetadata = getOrCreateTypeMetadata(propertyType);
                relationMetadata = (RelationTypeMetadata) relationTypeMetadata;
                relationDirection = getRelationDirection(annotatedType, propertyMethod, relationTypeMetadata, relationMetadata);
                methodMetadata = new RelationReferencePropertyMethodMetadata<>(propertyMethod, relationMetadata, relationDirection,
                        metadataFactory.createReferencePropertyMetadata(propertyMethod));
            } else {
                throw new XOException("Unsupported type for reference property: " + propertyType.getName());
            }
        } else {
            methodMetadata = new PrimitivePropertyMethodMetadata<>(propertyMethod, metadataFactory.createPropertyMetadata(propertyMethod));
        }
        return methodMetadata;
    }
854009
@Override
    public void onCreateProperty(String reference, PropertyRecord prop) {
        closePropertyDialoge();

        String[] tokens = reference.split("_#_");

        ModelNode operation = new ModelNode();
        operation.get(ADDRESS).set(Baseadress.get());
        operation.get(ADDRESS).add("subsystem", "jgroups");
        operation.get(ADDRESS).add("stack", tokens[0]);
        operation.get(ADDRESS).add("protocol", tokens[1]);
        operation.get(OP).set("map-put");
        operation.get(NAME).set("properties");
        operation.get("key").set(prop.getKey());
        operation.get("value").set(prop.getValue());

        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {
            @Override
            public void onSuccess(DMRResponse result) {
                ModelNode response = result.get();

                if (response.isFailure()) {
                    Console.error(Console.MESSAGES.addingFailed("Protocol Property"), response.getFailureDescription());
                } else {
                    Console.info(Console.MESSAGES.added("Protocol Property"));

                    loadStacks(true);
                }
            }
        });
    }
1261429
function(properties) {
		// If a class-like object is passed as properties.extend, just call extend on it
		if (properties && properties.extend)
			return properties.extend.extend(properties);

		// Otherwise, just create a new class with the passed properties
		return PseudoClass.extend(properties);
	}
234263
function EntityMethods(models) {
      this.models = models;
      this.getByNameOrId = __bind(this.getByNameOrId, this);
      this.getByName = __bind(this.getByName, this);
      this.get = __bind(this.get, this);
      if (!this.models) {
        throw new Error("models parameter is required");
      }
    }
21803
protected function addMethodsFrom($property, $index = null)
    {
        $class = static::class;
        $extension = ($index !== null) ? $this->{$property}[$index] : $this->$property;

        if (!$extension) {
            throw new InvalidArgumentException(
                "Object->addMethodsFrom(): could not add methods from {$class}->{$property}[$index]"
            );
        }

        $methods = $this->findMethodsFromExtension($extension);
        if ($methods) {
            if ($extension instanceof Extension) {
                Deprecation::notice(
                    '5.0',
                    'Register custom methods from extensions with addCallbackMethod.'
                    . ' callSetOwnerFirst will be removed in 5.0'
                );
            }
            $methodInfo = array(
                'property' => $property,
                'index' => $index,
                'callSetOwnerFirst' => $extension instanceof Extension,
            );

            $newMethods = array_fill_keys($methods, $methodInfo);

            if (isset(self::$extra_methods[$class])) {
                self::$extra_methods[$class] =
                    array_merge(self::$extra_methods[$class], $newMethods);
            } else {
                self::$extra_methods[$class] = $newMethods;
            }
        }
    }
277165
function(name) {
    var CustomProperty = lib.method.createMethod(name,function() {});
    lib.inherits.inherits(CustomProperty,Property);
    lib.extend.extend(CustomProperty,{ name: name });
    return CustomProperty;
  }
1166316
function(properties) {
            this._super(properties);
            
            var entities = [];
            var entitiesByName = {};
            var entityPropertyList = properties.entry || [];
            for(var i = 0; i < entityPropertyList.length; i++) {
                var props = entityPropertyList[i];
                var entity = this.instantiateEntity(props);
                entity._load(props);
                entities.push(entity);
                
                if (entitiesByName.hasOwnProperty(entity.name)) {
                    entitiesByName[entity.name].push(entity);
                }
                else {
                    entitiesByName[entity.name] = [entity];
                }
            }
            this._entities       = entities;
            this._entitiesByName = entitiesByName;
            this._paging         = properties.paging    || {};
            this._links          = properties.links     || {};
            this._updated        = properties.updated   || null;
        }
360901
function(name, object, property) {
        var method = this.createMethod(name, property);
        object[method.name] = method.body;
    }
1085545
function checkPropertyAccess(node, objectName, propertyName) {
            if (propertyName === null) {
                return;
            }
            const matchedObject = restrictedProperties.get(objectName);
            const matchedObjectProperty = matchedObject ? matchedObject.get(propertyName) : globallyRestrictedObjects.get(objectName);
            const globalMatchedProperty = globallyRestrictedProperties.get(propertyName);

            if (matchedObjectProperty) {
                const message = matchedObjectProperty.message ? ` ${matchedObjectProperty.message}` : "";

                context.report({
                    node,
                    // eslint-disable-next-line eslint-plugin/report-message-format
                    message: "'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}",
                    data: {
                        objectName,
                        propertyName,
                        message
                    }
                });
            } else if (globalMatchedProperty) {
                const message = globalMatchedProperty.message ? ` ${globalMatchedProperty.message}` : "";

                context.report({
                    node,
                    // eslint-disable-next-line eslint-plugin/report-message-format
                    message: "'{{propertyName}}' is restricted from being used.{{message}}",
                    data: {
                        propertyName,
                        message
                    }
                });
            }
        }
1239513
private void setExtendedProperty(String property, Object value) {
        String dataType = extendedPropertiesDataType.get(property);
        String valueClass = value.getClass().getSimpleName();

        if (dataType.equals(valueClass) && !extendedMultiValuedProperties.contains(property)) {
            extendedPropertiesValue.put(property, value);
        } else if (dataType.equals(valueClass) && extendedMultiValuedProperties.contains(property)) {
            if (value instanceof List) {
                extendedPropertiesValue.put(property, value);
            } else {
                List<Object> values = (List<Object>) extendedPropertiesValue.get(property);
                if (values == null) {
                    values = new ArrayList<Object>();
                    extendedPropertiesValue.put(property, values);
                }
                values.add(value);
            }
        } else {
            String type = value == null ? "null" : value.getClass().getName();
            String msg = "Could not set extended property for Group property '" + property + "'. " + type + " is incompatible with " + dataType;
            throw new ClassCastException(msg);
        }
    }