diff options
author | liamfallon <liam.fallon@ericsson.com> | 2018-06-06 13:34:03 +0100 |
---|---|---|
committer | liamfallon <liam.fallon@ericsson.com> | 2018-06-06 14:39:47 +0100 |
commit | 8dd87c465e6e22fe568fdd4a6b6d94cdbe0203a5 (patch) | |
tree | 5597dd9418a4881bb33bcd86d973b91fb15d5aba /model/utilities/src/main/antlr4/org | |
parent | 37d6fd9069eb30d88c4ad80b5f35099ed173cc13 (diff) |
Remove checkstyle errors from generated code
The generated code in the APEX model module creates checkstyle errors
in Eclipse becasue there is no license header on the generated Java code.
This change adds the copyright header to the code generation templates.
Also this change introduces teh latest version of ahtlr 4 for code generation
from a grammar.
Issue-ID: POLICY-716
Change-Id: Ib02cc4e1a6e815cf6d4b386c19f7eb2542f9ed00
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'model/utilities/src/main/antlr4/org')
-rw-r--r-- | model/utilities/src/main/antlr4/org/onap/policy/apex/model/utilities/typeutils/ParametrizedType.g4 | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/model/utilities/src/main/antlr4/org/onap/policy/apex/model/utilities/typeutils/ParametrizedType.g4 b/model/utilities/src/main/antlr4/org/onap/policy/apex/model/utilities/typeutils/ParametrizedType.g4 index 3a37d4043..384c37b0a 100644 --- a/model/utilities/src/main/antlr4/org/onap/policy/apex/model/utilities/typeutils/ParametrizedType.g4 +++ b/model/utilities/src/main/antlr4/org/onap/policy/apex/model/utilities/typeutils/ParametrizedType.g4 @@ -20,20 +20,26 @@ grammar ParametrizedType; -//For more information see: -// http://stackoverflow.com/questions/39401083/class-forname-equivalent-for-creating-parameterizedtypes-from-string -// https://github.com/KetothXupack/stackoverflow-answers/tree/master/q39401083 - -@parser::header { - //For more information see: - // http://stackoverflow.com/questions/39401083/class-forname-equivalent-for-creating-parameterizedtypes-from-string - // https://github.com/KetothXupack/stackoverflow-answers/tree/master/q39401083 - - - //Note: Unused Imports - //Since this is generated code compile warnings are to be expected and cannot always be suppressed - //See https://github.com/antlr/antlr4/issues/1192 - import org.onap.policy.apex.model.utilities.typeutils.ClassBuilder; +@header { +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * 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. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ } type returns[ClassBuilder value] |