Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.jini.core.constraint
Interface MethodConstraints

All Known Implementing Classes:
  BasicMethodConstraints

public interface MethodConstraints

Defines an immutable mapping from `Method` to `InvocationConstraints`, used to specify per-method constraints.

An instance of this interface must implement `Object.equals` to return `true` when passed a mapping that is equivalent in trust, content, and function, and to return `false` otherwise. That is, the `equals` method must be a sufficient substitute for `TrustEquivalence.checkTrustEquivalence`.

Since:
  2.0

Method Summary
`InvocationConstraints` | `getConstraints(Method method)` Returns the constraints for the specified method as a non-`null` value.
`Iterator` | `possibleConstraints()` Returns an iterator that yields all of the possible distinct constraints that can be returned by `getConstraints`, in arbitrary order and with duplicates permitted.

Method Detail

### getConstraints

    public InvocationConstraints getConstraints(Method method)

  Returns the constraints for the specified method as a non-`null` value. The same constraints are always returned for any given `Method` instance and for any equivalent `Method` instance. Note that no exception is thrown for "unknown" methods; a constraints instance is always returned.

  Parameters:
    `method` - the method
  Returns:
    the constraints for the specified method as a non-`null` value
  Throws:
    `NullPointerException` - if the argument is `null`

### possibleConstraints

    public Iterator possibleConstraints()

  Returns an iterator that yields all of the possible distinct constraints that can be returned by `getConstraints`, in arbitrary order and with duplicates permitted. The iterator throws an `UnsupportedOperationException` on any attempt to remove an element.

  Returns:
    an iterator that yields all of the possible distinct constraints that can be returned by `getConstraints`, in arbitrary order and with duplicates permitted

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Sun Microsystems, Inc. All rights reserved