forked from redhat-developer/intellij-quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
74 additions
and
21 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
40 changes: 40 additions & 0 deletions
40
...n/java/com/redhat/microprofile/psi/internal/quarkus/core/properties/ConfigProperties.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,40 @@ | ||
package com.redhat.microprofile.psi.internal.quarkus.core.properties; | ||
|
||
import io.quarkus.runtime.util.StringUtil; | ||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
@Target({ElementType.TYPE}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface ConfigProperties { | ||
String UNSET_PREFIX = "<< unset >>"; | ||
|
||
String prefix() default "<< unset >>"; | ||
|
||
NamingStrategy namingStrategy() default ConfigProperties.NamingStrategy.FROM_CONFIG; | ||
|
||
public static enum NamingStrategy { | ||
FROM_CONFIG { | ||
public String getName(String name) { | ||
throw new IllegalStateException("The naming strategy needs to substituted with the configured naming strategy"); | ||
} | ||
}, | ||
VERBATIM { | ||
public String getName(String name) { | ||
return name; | ||
} | ||
}, | ||
KEBAB_CASE { | ||
public String getName(String name) { | ||
return StringUtil.hyphenate(name); | ||
} | ||
}; | ||
|
||
private NamingStrategy() { | ||
} | ||
|
||
public abstract String getName(String var1); | ||
} | ||
} |
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