-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from treblereel/generators_refactoring
Generators refactoring
- Loading branch information
Showing
489 changed files
with
5,167 additions
and
17,452 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
core/src/main/java/io/crysknife/client/internal/managed/InstanceContextualTypeProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright © 2023 Treblereel | ||
* | ||
* 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 io.crysknife.client.internal.managed; | ||
|
||
import io.crysknife.client.BeanManager; | ||
import io.crysknife.client.internal.InstanceImpl; | ||
import io.crysknife.client.ioc.ContextualTypeProvider; | ||
import io.crysknife.client.ioc.IOCProvider; | ||
import jakarta.enterprise.inject.Instance; | ||
import jakarta.inject.Inject; | ||
|
||
import java.lang.annotation.Annotation; | ||
|
||
@IOCProvider | ||
public class InstanceContextualTypeProvider implements ContextualTypeProvider<Instance> { | ||
|
||
private final BeanManager manager; | ||
|
||
@Inject | ||
public InstanceContextualTypeProvider(BeanManager manager) { | ||
this.manager = manager; | ||
} | ||
|
||
@Override | ||
public Instance provide(Class<?>[] typeargs, Annotation[] qualifiers) { | ||
Class clazz = typeargs[0]; | ||
if (qualifiers.length > 0) { | ||
return new InstanceImpl(manager.lookupBean(clazz, qualifiers)); | ||
} | ||
return new InstanceImpl(manager.lookupBean(clazz)); | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
...main/java/io/crysknife/client/internal/managed/ManagedInstanceContextualTypeProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright © 2023 Treblereel | ||
* | ||
* 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 io.crysknife.client.internal.managed; | ||
|
||
import io.crysknife.client.BeanManager; | ||
import io.crysknife.client.ManagedInstance; | ||
import io.crysknife.client.internal.ManagedInstanceImpl; | ||
import io.crysknife.client.ioc.ContextualTypeProvider; | ||
import io.crysknife.client.ioc.IOCProvider; | ||
import jakarta.inject.Inject; | ||
|
||
import java.lang.annotation.Annotation; | ||
|
||
@IOCProvider | ||
public class ManagedInstanceContextualTypeProvider | ||
implements ContextualTypeProvider<ManagedInstance> { | ||
|
||
private final BeanManager manager; | ||
|
||
@Inject | ||
public ManagedInstanceContextualTypeProvider(BeanManager manager) { | ||
this.manager = manager; | ||
} | ||
|
||
@Override | ||
public ManagedInstance provide(Class<?>[] typeargs, Annotation[] qualifiers) { | ||
Class clazz = typeargs[0]; | ||
return new ManagedInstanceImpl(manager, clazz, qualifiers); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (C) 2011 Red Hat, Inc. and/or its affiliates. | ||
* Copyright © 2023 Treblereel | ||
* | ||
* 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 | ||
|
@@ -12,20 +12,14 @@ | |
* the License. | ||
*/ | ||
|
||
package io.crysknife.ui.databinding.client.api; | ||
package io.crysknife.client.internal.step; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* Indicates that instances of the annotated class are bindable to UI components. | ||
* | ||
* @author Christian Sadilek <[email protected]> | ||
*/ | ||
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target({ElementType.TYPE}) | ||
public @interface Bindable { | ||
|
||
public @interface AfterBurnFactoryStep { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (C) 2011 Red Hat, Inc. and/or its affiliates. | ||
* Copyright © 2023 Treblereel | ||
* | ||
* 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 | ||
|
@@ -12,21 +12,14 @@ | |
* the License. | ||
*/ | ||
|
||
package io.crysknife.ui.databinding.client.api; | ||
package io.crysknife.client.internal.step; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* Indicates that an implementation of {@link Converter} is to be used as a global default for | ||
* converting between the specified model value and widget value type. | ||
* | ||
* @author Christian Sadilek <[email protected]> | ||
*/ | ||
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target({ElementType.TYPE}) | ||
public @interface DefaultConverter { | ||
|
||
public @interface BeanManagerStep { | ||
} |
File renamed without changes.
File renamed without changes.
48 changes: 0 additions & 48 deletions
48
demo/src/main/java/io/crysknife/demo/client/qualifiers/Qualifiers2.java
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.