org.eclipse.osgi.internal.resolver.NativeCodeDescriptionImpl Maven / Gradle / Ivy
/*******************************************************************************
* Copyright (c) 2007, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
* Rob Harrop - SpringSource Inc. (bug 247522)
*******************************************************************************/
package org.eclipse.osgi.internal.resolver;
import java.util.*;
import org.eclipse.osgi.framework.internal.core.Constants;
import org.eclipse.osgi.framework.internal.core.FilterImpl;
import org.eclipse.osgi.service.resolver.*;
import org.eclipse.osgi.service.resolver.VersionRange;
import org.osgi.framework.*;
public class NativeCodeDescriptionImpl extends BaseDescriptionImpl implements NativeCodeDescription {
private static final VersionRange[] EMPTY_VERSIONRANGES = new VersionRange[0];
private volatile Filter filter;
private String[] languages;
private String[] nativePaths;
private String[] osNames;
private VersionRange[] osVersions;
private String[] processors;
private BundleDescription supplier;
private volatile boolean invalidNativePaths = false;
public Filter getFilter() {
return filter;
}
public String[] getLanguages() {
synchronized (this.monitor) {
if (languages == null)
return BundleDescriptionImpl.EMPTY_STRING;
return languages;
}
}
public String[] getNativePaths() {
synchronized (this.monitor) {
if (nativePaths == null)
return BundleDescriptionImpl.EMPTY_STRING;
return nativePaths;
}
}
public String[] getOSNames() {
synchronized (this.monitor) {
if (osNames == null)
return BundleDescriptionImpl.EMPTY_STRING;
return osNames;
}
}
public VersionRange[] getOSVersions() {
synchronized (this.monitor) {
if (osVersions == null)
return EMPTY_VERSIONRANGES;
return osVersions;
}
}
public String[] getProcessors() {
synchronized (this.monitor) {
if (processors == null)
return BundleDescriptionImpl.EMPTY_STRING;
return processors;
}
}
public BundleDescription getSupplier() {
return supplier;
}
public int compareTo(NativeCodeDescription otherDesc) {
State containingState = getSupplier().getContainingState();
if (containingState == null)
return 0;
Dictionary
© 2015 - 2025 Weber Informatics LLC | Privacy Policy