Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbluehweis committed Jul 5, 2017
1 parent 6dbaa73 commit 016bcde
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*******************************************************************************
* Copyright (c) 2017 BestSolution.at 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:
* Martin Bluehweis <[email protected]> - initial API and implementation
*******************************************************************************/
package org.eclipse.fx.core.bindings.internal;

import java.lang.reflect.Type;

import org.eclipse.fx.core.TypeTypeProviderService;
import org.eclipse.fx.core.bindings.FXBindings;
import org.osgi.service.component.annotations.Component;

/**
* Type provider for @Inject @LocalInstance FXBindings.Instance loader
*/
@Component
public class FxBindingsInstanceTypeProvider implements TypeTypeProviderService<FXBindings.Instance> {

@Override
public Class<? extends FXBindings.Instance> getType(Type s) {
return FXBindings.Instance.class;
}

@Override
public boolean test(Type t) {
return FXBindings.Instance.class == t;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*******************************************************************************
* Copyright (c) 2017 BestSolution.at 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:
* Martin Bluehweis <[email protected]> - initial API and implementation
*******************************************************************************/
package org.eclipse.fx.core.observable.internal;

import java.lang.reflect.Type;

import org.eclipse.fx.core.TypeTypeProviderService;
import org.eclipse.fx.core.observable.FXObservableUtil;
import org.osgi.service.component.annotations.Component;

/**
* Type provider for @Inject @LocalInstance FXObservableUtil.Instance loader
*/
@Component
public class FxObservableUtilInstanceTypeProvider implements TypeTypeProviderService<FXObservableUtil.Instance> {

@Override
public Class<? extends FXObservableUtil.Instance> getType(Type s) {
return FXObservableUtil.Instance.class;
}

@Override
public boolean test(Type t) {
return FXObservableUtil.Instance.class == t;
}

}

0 comments on commit 016bcde

Please sign in to comment.