Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright (c) OSGi Alliance (2008, 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.blueprint.container;

A Blueprint exception indicating that a component does not exist in a Blueprint Container. This exception is thrown when an attempt is made to create a component instance or lookup Component Metadata using a component id that does not exist in the Blueprint Container.

Author(s):
$Id: fa3a70ecbd0eba6cdd30229b2f3f57c72c908f29 $
public class NoSuchComponentException extends RuntimeException {
	private static final long	serialVersionUID	= 1L;
The requested component id that generated the exception.
	private final String		componentId;

Create a No Such Component Exception for a non-existent component.

Parameters:
msg The associated message.
id The id of the non-existent component.
	public NoSuchComponentException(String msgString id) {
		super(msg);
		this. = id;
	}

Create a No Such Component Exception for a non-existent component.

Parameters:
id The id of the non-existent component.
		super("No component with id '" + (id == null ? "<null>" : id) + "' could be found");
		this. = id;
	}

Returns the id of the non-existent component.

Returns:
The id of the non-existent component.
	public String getComponentId() {
		return ;
	}
New to GrepCode? Check out our FAQ X