Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright (c) OSGi Alliance (2011, 2013). All Rights Reserved.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.osgi.service.component.annotations;

Cardinality for the Reference annotation.

Specifies if the reference is optional and if the component implementation support a single bound service or multiple bound services.

Author(s):
$Id: f01a55c3ea006d931dd3f066605da80b78c8bd9e $
public enum ReferenceCardinality {
The reference is optional and unary. That is, the reference has a cardinality of 0..1.
	OPTIONAL("0..1"),

The reference is mandatory and unary. That is, the reference has a cardinality of 1..1.
	MANDATORY("1..1"),

The reference is optional and multiple. That is, the reference has a cardinality of 0..n.
	MULTIPLE("0..n"),

The reference is mandatory and multiple. That is, the reference has a cardinality of 1..n.
	AT_LEAST_ONE("1..n");
	private final String	value;
		this. = value;
	}
	public String toString() {
		return ;
	}
New to GrepCode? Check out our FAQ X