You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/11/19 16:19:42 UTC

[camel] 06/06: CAMEL-18718: camel-javascript

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch js
in repository https://gitbox.apache.org/repos/asf/camel.git

commit af7ad0b3e1fc9e65504d1608be36146bd6fd9509
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Nov 19 17:18:48 2022 +0100

    CAMEL-18718: camel-javascript
---
 .../org/apache/camel/language/js/JavaScript.java   | 36 ++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/components/camel-javascript/src/main/java/org/apache/camel/language/js/JavaScript.java b/components/camel-javascript/src/main/java/org/apache/camel/language/js/JavaScript.java
new file mode 100644
index 00000000000..43da2147f2a
--- /dev/null
+++ b/components/camel-javascript/src/main/java/org/apache/camel/language/js/JavaScript.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.camel.language.js;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.camel.support.language.LanguageAnnotation;
+
+/**
+ * An annotation for injection of JavaScript expressions into method parameters, fields or properties
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER })
+@LanguageAnnotation(language = "js")
+public @interface JavaScript {
+    String value();
+}