com.anaptecs.jeaf.xfun.annotations.RuntimeInfo Maven / Gradle / Ivy
The newest version!
/**
* Copyright 2004 - 2019 anaptecs GmbH, Burgstr. 96, 72764 Reutlingen, Germany
*
* All rights reserved.
*/
package com.anaptecs.jeaf.xfun.annotations;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import com.anaptecs.jeaf.xfun.api.XFun;
import com.anaptecs.jeaf.xfun.api.info.InfoProvider;
import com.anaptecs.jeaf.xfun.api.info.RuntimeEnvironment;
/**
* Annotation defines the runtime environment in which an application is executed. This information is required in cases
* where behavior needs to be implemented depending on the current runtime environment.
*
* In order to make configuration even simpler JEAF's Maven Plugin can be used. The plugin analysis the projects
* classpath for classes with annotations and generates the required configuration files. There should be only one
* interface or class with this annotation in your classpath. If multiple usages are detected then the first one will be
* used according to the order of the classpath.
*
* There is no limit how many classes with this annotation are in your classpath. Usually classes with this annotation
* are generated by JEAF Generator based on XML files contains messages.
*/
@Retention(RUNTIME)
@Target(TYPE)
@Documented
public @interface RuntimeInfo {
/**
* Name of the resource that contains the name of the class with the @RuntimeInfo annotation.
*/
String RUNTIME_INFO_RESORUCE_NAME = "RuntimeInfo";
/**
* Path under which the configuration file is stored.
*/
public static final String RUNTIME_INFO_PATH = XFun.X_FUN_BASE_PATH + '/' + RUNTIME_INFO_RESORUCE_NAME;
/**
* Property defines the current runtime environment. By default we use JSE.
*
* {@link InfoProvider#getRuntimeEnvironment()}
*/
RuntimeEnvironment runtimeEnvironment() default RuntimeEnvironment.JSE;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy