/*
////////////////////////////////////////////
Accessors:
////////////////////////////////////////////
185377
public String contentsAsString()
    {
        if (mResultString == null) {
            // Has array been requested? Can make a shortcut, if so:
            if (mResultArray != null) {
                mResultString = new String(mResultArray);
            } else {
                // Do we use shared array?
                if (mInputStart >= 0) {
                    if (mInputLen < 1) {
                        return (mResultString = "");
                    }
                    mResultString = new String(mInputBuffer, mInputStart, mInputLen);
                } else { // nope... need to copy
                    // But first, let's see if we have just one buffer
                    int segLen = mSegmentSize;
                    int currLen = mCurrentSize;
                    
                    if (segLen == 0) { // yup
                        mResultString = (currLen == 0) ? "" : new String(mCurrentSegment, 0, currLen);
                    } else { // no, need to combine
                        StringBuilder sb = new StringBuilder(segLen + currLen);
                        // First stored segments
                        if (mSegments != null) {
                            for (int i = 0, len = mSegments.size(); i < len; ++i) {
                                char[] curr = mSegments.get(i);
                                sb.append(curr, 0, curr.length);
                            }
                        }
                        // And finally, current segment:
                        sb.append(mCurrentSegment, 0, mCurrentSize);
                        mResultString = sb.toString();
                    }
                }
            }
        }
        return mResultString;
    }
657663
function getBindingAccessors(node, context) {
  var bindings = {},
    parser = new Parser(node, context, options.bindingGlobals),
    binding_string = this.getBindingsString(node);

  if (binding_string) {
    binding_string = this.preProcessBindings(binding_string);
    bindings = parser.parse(binding_string || '');
  }

  arrayForEach(this.otherProviders, function(p) {
    extend(bindings, p.getBindingAccessors(node, context, parser, bindings));
  });

  objectForEach(bindings, this.preProcessBindings.bind(this));

  return bindings;
}
410313
public boolean isNotEMPTYlist(int accessor) {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "isNotEMPTYlist", accessor);
    // The answer is true, unless an EMPTY is found.
    boolean isNotAnEMPTY = true;

    // The field can't be an EMPTY singleton unless the part is a JMFMessageData
    // as it is impossible for Encapsulations to hold an EMPTY.
    // Note the JMF call is the reverse - i.e. isEMPTY rather than isNot
    if (jmfPart instanceof JMFMessage) {
      isNotAnEMPTY = !((JMFMessage)jmfPart).isEMPTYlist(accessor);
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "isNotEMPTYlist",  isNotAnEMPTY);
    return isNotAnEMPTY;
  }
760573
function getStateMutatorsAndAccessors (state, action, isAsync) {
  var mutators = [
    'apply',
    'concat',
    'deepMerge',
    'push',
    'merge',
    'unset',
    'set',
    'splice',
    'unshift'
  ];

  var accessors = [
    'get',
    'exists'
  ];

  var methods = [];

  if (isAsync) {
    methods = methods.concat(accessors);
  } else {
    methods = methods.concat(mutators);
    methods = methods.concat(accessors);
  }

  return methods.reduce((stateMethods, methodName) => {
    var method = state[methodName].bind(state);

    stateMethods[methodName] = (...args) => {
      var path = [];
      var firstArg = args[0];

      if (Array.isArray(firstArg)) {
        path = args.shift();
      } else if (typeof firstArg === 'string') {
        path = [args.shift()];
      }

      if (args.length === 0) {
        return method.apply(null, [path.slice()]);
      }

      action.mutations.push({
        name: methodName,
        path: path.slice(),
        args: args
      });

      return method.apply(null, [path.slice()].concat(args));
    };

    return stateMethods;
  }, Object.create(null));
}
609615
int estimateFieldValueSize(int accessor) {
    int size = 0;
    try {
      if (jmfPart.isPresent(accessor)) {
        size = jmfPart.estimateUnassembledValueSize(accessor);
      }
    }
    catch (JMFException e) {
      FFDCFilter.processException(e, "estimateFieldValueSize", "221", this);
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "estimateFieldValueSize failed: " + e);
    }
    return size;
  }
70278
function readAccessor(walker) {
    var firstSeg = readIdent(walker);
    switch (firstSeg) {
        case 'true':
        case 'false':
            return {
                type: ExprType.BOOL,
                value: firstSeg === 'true'
            };
    }

    var result = createAccessor([
        {
            type: ExprType.STRING,
            value: firstSeg
        }
    ]);

    /* eslint-disable no-constant-condition */
    accessorLoop: while (1) {
    /* eslint-enable no-constant-condition */

        switch (walker.currentCode()) {
            case 46: // .
                walker.go(1);

                // ident as string
                result.paths.push({
                    type: ExprType.STRING,
                    value: readIdent(walker)
                });
                break;

            case 91: // [
                walker.go(1);
                result.paths.push(readTertiaryExpr(walker));
                walker.goUntil(93); // ]
                break;

            default:
                break accessorLoop;
        }
    }

    return result;
}
318501
@Override
    public int getModelID(int accessor) throws JMFUninitializedAccessException, JMFSchemaViolationException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            JmfTr.entry(this, tc, "getModelID", new Object[] { Integer.valueOf(accessor) });
        int ans;
        checkIndex(accessor);

        synchronized (getMessageLockArtefact()) {
            checkDynamic(accessor);

            if (cache[accessor] != null) {
                ans = ((JMFPart) cache[accessor]).getModelID();
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    JmfTr.exit(this, tc, "getModelID", Integer.valueOf(ans));
                return ans;
            }

            if (contents == null) {
                JMFUninitializedAccessException e = new JMFUninitializedAccessException("Dynamic value at accessor " + accessor + " is missing");
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    JmfTr.exit(this, tc, "getModelID", e);
                throw e;
            }

            // Get offset of the dynamic field
            int realOffset = getAbsoluteOffset(accessor);

            // Read model Id skipping over length
            ans = ArrayUtil.readInt(contents, realOffset + 4);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            JmfTr.exit(this, tc, "getModelID", Integer.valueOf(ans));
        return ans;
    }
1060433
function(source, target, key) {
		var desc = Object.getOwnPropertyDescriptor(source, key);
		desc = this._accessor(target, key, desc);
		Object.defineProperty(target, key, desc);
		return target;
	}
537725
protected function createAccessor(
        $accessor,
        string $name,
        $value,
        array $context = []
    ): AccessorInterface {
        if (is_array($accessor)) {
            //We are working with definition of composition.
            switch ($accessor[0]) {
                case self::ONE:
                    //Singular embedded document
                    return $this->odm->make($accessor[1], $value, false);
                case self::MANY:
                    return new DocumentCompositor($accessor[1], $value, $this->odm);
            }

            throw new AccessException("Invalid accessor definition for field '{$name}'");
        }

        //Field as a context
        return parent::createAccessor($accessor, $name, $value, $context + ['odm' => $this->odm]);
    }
575163
def define_accessors(field)
      # add the generated method
      self.generated_methods.module_eval do
        define_method(field) do
          @hash[field]
        end
        define_method("#{field}=") do |val|
          @hash[field] = val
        end
      end
    end
100132
def revoke_accessor(accessor, options = {})
      headers = extract_headers!(options)
      client.put("/v1/auth/token/revoke-accessor", JSON.fast_generate(
        accessor: accessor,
      ), headers)
      return true
    end
566600
static public Accessor[] getAccessors(Class<?> type, FieldFilter filter) {
		Class<?> nextClass = type;
		HashMap<String, Accessor> map = new HashMap<String, Accessor>();
		if (filter == null)
			filter = BasicFiledFilter.SINGLETON;
		while (nextClass != Object.class) {
			Field[] declaredFields = nextClass.getDeclaredFields();

			for (Field field : declaredFields) {
				String fn = field.getName();
				if (map.containsKey(fn))
					continue;
				Accessor acc = new Accessor(nextClass, field, filter);
				if (!acc.isUsable())
					continue;
				map.put(fn, acc);
			}
			nextClass = nextClass.getSuperclass();
		}
		return map.values().toArray(new Accessor[map.size()]);
	}
609255
public static int toJavacModifier(AccessLevel accessLevel) {
		switch (accessLevel) {
		case MODULE:
		case PACKAGE:
			return 0;
		default:
		case PUBLIC:
			return Flags.PUBLIC;
		case NONE:
		case PRIVATE:
			return Flags.PRIVATE;
		case PROTECTED:
			return Flags.PROTECTED;
		}
	}
1085105
protected function createAccessor(
        $accessor,
        string $name,
        $value,
        array $context = []
    ): AccessorInterface {
        //Giving ORM as context
        return parent::createAccessor($accessor, $name, $value, $context + ['orm' => $this->orm]);
    }
835464
public static Constructor<?>[] getAllConstructorsOfClass(final Class<?> clazz, boolean accessible) {
        if (clazz == null) {
            return null;
        }
        Constructor<?>[] constructors = clazz.getDeclaredConstructors();
        if (constructors != null && constructors.length > 0) {
            AccessibleObject.setAccessible(constructors, accessible);
        }
        return constructors;
    }
49498
function accessor (data) {
      // Behave like a setter if an argument is provided.
      if (arguments.length === 1) {
        var json = JSON.stringify(data)

        if (no(json)) {
          throw new Error('JSON do not serialize data:' + data)
        }

        graph.data[accessorName] = data
      }

      // Always behave also like a getter.
      return graph.data[accessorName]
    }
429052
private static AccessInfo getAccessInfo
        (Class desiredClass,
         int dataType, String dataTypeName, int columnSize, int decimalDigits)
    {
        if (!desiredClass.isPrimitive()) {
            TypeDesc desiredType = TypeDesc.forClass(desiredClass);
            if (desiredType.toPrimitiveType() != null) {
                desiredType = desiredType.toPrimitiveType();
                desiredClass = desiredType.toClass();
            }
        }

        if (desiredClass == Object.class) {
            return new AccessInfo("Object", Object.class);
        }

        Class actualClass;
        String suffix;

        switch (dataType) {
        default:
            return null;

        case BIT:
        case BOOLEAN:
            if (desiredClass == boolean.class) {
                actualClass = boolean.class;
                suffix = "Boolean";
            } else if (desiredClass == String.class) {
                actualClass = String.class;
                suffix = "String";
            } else {
                return null;
            }
            break;

        case TINYINT:
            if (desiredClass == byte.class) {
                actualClass = byte.class;
                suffix = "Byte";
            } else if (desiredClass == short.class) {
                actualClass = short.class;
                suffix = "Short";
            } else if (desiredClass == String.class) {
                actualClass = String.class;
                suffix = "String";
            } else {
                return null;
            }
            break;

        case SMALLINT:
            if (desiredClass == short.class) {
                actualClass = short.class;
                suffix = "Short";
            } else if (desiredClass == int.class) {
                actualClass = int.class;
                suffix = "Int";
            } else if (desiredClass == String.class) {
                actualClass = String.class;
                suffix = "String";
            } else {
                return null;
            }
            break;

        case INTEGER:
            if (desiredClass == int.class) {
                actualClass = int.class;
                suffix = "Int";
            } else if (desiredClass == long.class) {
                actualClass = long.class;
                suffix = "Long";
            } else if (desiredClass == String.class) {
                actualClass = String.class;
                suffix = "String";
            } else {
                return null;
            }
            break;

        case BIGINT:
            if (desiredClass == long.class) {
                actualClass = long.class;
                suffix = "Long";
            } else if (desiredClass == String.class) {
                actualClass = String.class;
                suffix = "String";
            } else {
                return null;
            }
            break;

        case REAL:
        case FLOAT:
        case DOUBLE:
            if (desiredClass == float.class) {
                actualClass = float.class;
                suffix = "Float";
            } else if (desiredClass == double.class) {
                actualClass = double.class;
                suffix = "Double";
            } else if (desiredClass == String.class) {
                actualClass = String.class;
                suffix = "String";
            } else {
                return null;
            }
            break;

        case NUMERIC:
        case DECIMAL:
            if (desiredClass == int.class) {
                if (decimalDigits <= 0) {
                    actualClass = int.class;
                    suffix = "Int";
                } else {
                    return null;
                }
            } else if (desiredClass == long.class) {
                if (decimalDigits <= 0) {
                    actualClass = long.class;
                    suffix = "Long";
                } else {
                    return null;
                }
            } else if (desiredClass == double.class) {
                actualClass = double.class;
                suffix = "Double";
            } else if (desiredClass == BigDecimal.class) {
                actualClass = BigDecimal.class;
                suffix = "BigDecimal";
            } else if (desiredClass == short.class) {
                if (decimalDigits <= 0) {
                    actualClass = short.class;
                    suffix = "Short";
                } else {
                    return null;
                }
            } else if (desiredClass == byte.class) {
                if (decimalDigits <= 0) {
                    actualClass = byte.class;
                    suffix = "Byte";
                } else {
                    return null;
                }
            } else if (desiredClass == String.class) {
                actualClass = String.class;
                suffix = "String";
            } else {
                return null;
            }
            break;

        case CHAR:
        case VARCHAR:
        case LONGVARCHAR:
            if (desiredClass == String.class) {
                actualClass = String.class;
                suffix = "String";
            } else if (desiredClass == char.class && columnSize == 1) {
                actualClass = String.class;
                suffix = "String";
            } else {
                return null;
            }
            break;

        case DATE:
            // Treat Date as a Timestamp since some databases make no
            // distinction.  The DateTimeAdapter can be used to provide
            // more control over the desired precision.
            if (desiredClass == java.sql.Date.class) {
                actualClass = java.sql.Timestamp.class;
                suffix = "Timestamp";
            } else {
                return null;
            }
            break;

        case TIME:
            if (desiredClass == java.sql.Time.class) {
                actualClass = java.sql.Time.class;
                suffix = "Time";
            } else {
                return null;
            }
            break;

        case TIMESTAMP:
            if (desiredClass == java.sql.Timestamp.class) {
                actualClass = java.sql.Timestamp.class;
                suffix = "Timestamp";
            } else {
                return null;
            }
            break;

        case BINARY:
        case VARBINARY:
        case LONGVARBINARY:
            if (desiredClass == byte[].class) {
                actualClass = byte[].class;
                suffix = "Bytes";
            } else {
                return null;
            }
            break;

        case BLOB:
            if (desiredClass == com.amazon.carbonado.lob.Blob.class) {
                actualClass = java.sql.Blob.class;
                suffix = "Blob";
            } else {
                return null;
            }
            break;

        case CLOB:
            if (desiredClass == com.amazon.carbonado.lob.Clob.class) {
                actualClass = java.sql.Clob.class;
                suffix = "Clob";
            } else {
                return null;
            }
            break;
        }

        return new AccessInfo(suffix, actualClass);
    }