From 7128b051390d6ff3d8602b35aa260401c877704e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=88=E7=A7=91=E6=96=AF=EF=BC=88NexIoT=EF=BC=89?= <16120872+nexiot@user.noreply.gitee.com> Date: Wed, 24 Sep 2025 11:23:03 +0800 Subject: [PATCH 1/2] fix:format --- .../universal/core/engine/MagicResourceLoader.java | 12 +----------- .../java/cn/universal/core/engine/MagicScript.java | 12 +----------- .../cn/universal/core/engine/MagicScriptContext.java | 12 +----------- .../core/engine/MagicScriptDebugContext.java | 12 +----------- .../cn/universal/core/engine/MagicScriptEngine.java | 12 +----------- .../core/engine/MagicScriptEngineFactory.java | 12 +----------- .../cn/universal/core/engine/MagicScriptError.java | 12 +----------- .../java/cn/universal/core/engine/ScriptClass.java | 12 +----------- .../cn/universal/core/engine/annotation/Comment.java | 12 +----------- .../universal/core/engine/annotation/Function.java | 12 +----------- .../universal/core/engine/asm/AnnotationVisitor.java | 12 +----------- .../universal/core/engine/asm/AnnotationWriter.java | 12 +----------- .../java/cn/universal/core/engine/asm/Attribute.java | 12 +----------- .../cn/universal/core/engine/asm/ByteVector.java | 12 +----------- .../cn/universal/core/engine/asm/ClassReader.java | 12 +----------- .../core/engine/asm/ClassTooLargeException.java | 12 +----------- .../cn/universal/core/engine/asm/ClassVisitor.java | 12 +----------- .../cn/universal/core/engine/asm/ClassWriter.java | 12 +----------- .../universal/core/engine/asm/ConstantDynamic.java | 12 +----------- .../java/cn/universal/core/engine/asm/Constants.java | 12 +----------- .../java/cn/universal/core/engine/asm/Context.java | 12 +----------- .../cn/universal/core/engine/asm/CurrentFrame.java | 12 +----------- .../main/java/cn/universal/core/engine/asm/Edge.java | 12 +----------- .../cn/universal/core/engine/asm/FieldVisitor.java | 12 +----------- .../cn/universal/core/engine/asm/FieldWriter.java | 12 +----------- .../java/cn/universal/core/engine/asm/Frame.java | 12 +----------- .../java/cn/universal/core/engine/asm/Handle.java | 12 +----------- .../java/cn/universal/core/engine/asm/Handler.java | 12 +----------- .../java/cn/universal/core/engine/asm/Label.java | 12 +----------- .../core/engine/asm/MethodTooLargeException.java | 12 +----------- .../cn/universal/core/engine/asm/MethodVisitor.java | 12 +----------- .../cn/universal/core/engine/asm/MethodWriter.java | 12 +----------- .../cn/universal/core/engine/asm/ModuleVisitor.java | 12 +----------- .../cn/universal/core/engine/asm/ModuleWriter.java | 12 +----------- .../java/cn/universal/core/engine/asm/Opcodes.java | 12 +----------- .../core/engine/asm/RecordComponentVisitor.java | 12 +----------- .../core/engine/asm/RecordComponentWriter.java | 12 +----------- .../java/cn/universal/core/engine/asm/Symbol.java | 12 +----------- .../cn/universal/core/engine/asm/SymbolTable.java | 12 +----------- .../main/java/cn/universal/core/engine/asm/Type.java | 12 +----------- .../java/cn/universal/core/engine/asm/TypePath.java | 12 +----------- .../cn/universal/core/engine/asm/TypeReference.java | 12 +----------- .../core/engine/asm/signature/SignatureReader.java | 12 +----------- .../core/engine/asm/signature/SignatureVisitor.java | 12 +----------- .../core/engine/asm/signature/SignatureWriter.java | 12 +----------- .../universal/core/engine/compile/CompileCache.java | 12 +----------- .../cn/universal/core/engine/compile/Descriptor.java | 12 +----------- .../engine/compile/MagicScriptCompileException.java | 12 +----------- .../core/engine/compile/MagicScriptCompiler.java | 12 +----------- .../cn/universal/core/engine/constant/SafeRule.java | 12 +----------- .../core/engine/convert/BooleanImplicitConvert.java | 12 +----------- .../core/engine/convert/ClassImplicitConvert.java | 12 +----------- .../engine/convert/CollectionImplicitConvert.java | 12 +----------- .../engine/convert/FunctionalImplicitConvert.java | 12 +----------- .../core/engine/convert/MapImplicitConvert.java | 12 +----------- .../core/engine/exception/DebugTimeoutException.java | 12 +----------- .../core/engine/exception/ExceptionUtils.java | 12 +----------- .../core/engine/exception/MagicExitException.java | 12 +----------- .../engine/exception/MagicScriptAssertException.java | 12 +----------- .../core/engine/exception/MagicScriptException.java | 12 +----------- .../exception/MagicScriptRuntimeException.java | 12 +----------- .../engine/exception/RegexpLiteralException.java | 12 +----------- .../engine/exception/ResourceNotFoundException.java | 12 +----------- .../engine/exception/StringLiteralException.java | 12 +----------- .../core/engine/functions/ArrayFunctions.java | 12 +----------- .../core/engine/functions/ClassExtension.java | 12 +----------- .../core/engine/functions/CollectionFunctions.java | 12 +----------- .../core/engine/functions/DateExtension.java | 12 +----------- .../core/engine/functions/DynamicAttribute.java | 12 +----------- .../core/engine/functions/DynamicMethod.java | 12 +----------- .../core/engine/functions/DynamicModuleImport.java | 12 +----------- .../core/engine/functions/ExtensionMethod.java | 12 +----------- .../core/engine/functions/MagicScriptFunctions.java | 12 +----------- .../core/engine/functions/MapExtension.java | 12 +----------- .../core/engine/functions/NumberExtension.java | 12 +----------- .../engine/functions/ObjectConvertExtension.java | 12 +----------- .../functions/ObjectTypeConditionExtension.java | 12 +----------- .../core/engine/functions/PatternExtension.java | 12 +----------- .../core/engine/functions/StreamExtension.java | 12 +----------- .../core/engine/functions/StringExtension.java | 12 +----------- .../core/engine/functions/StringFunctions.java | 12 +----------- .../engine/functions/TemporalAccessorExtension.java | 12 +----------- .../engine/functions/linq/AggregationFunctions.java | 12 +----------- .../core/engine/functions/linq/LinqFunctions.java | 12 +----------- .../core/engine/functions/linq/MathFunctions.java | 12 +----------- .../core/engine/parsing/CharacterStream.java | 12 +----------- .../core/engine/parsing/GenericTokenParser.java | 12 +----------- .../universal/core/engine/parsing/LiteralToken.java | 12 +----------- .../cn/universal/core/engine/parsing/Parser.java | 12 +----------- .../universal/core/engine/parsing/RegexpToken.java | 12 +----------- .../java/cn/universal/core/engine/parsing/Span.java | 12 +----------- .../java/cn/universal/core/engine/parsing/Token.java | 12 +----------- .../universal/core/engine/parsing/TokenStream.java | 12 +----------- .../cn/universal/core/engine/parsing/TokenType.java | 12 +----------- .../cn/universal/core/engine/parsing/Tokenizer.java | 12 +----------- .../cn/universal/core/engine/parsing/VarIndex.java | 12 +----------- .../cn/universal/core/engine/parsing/VarScope.java | 12 +----------- .../core/engine/parsing/ast/BinaryOperation.java | 12 +----------- .../core/engine/parsing/ast/Expression.java | 12 +----------- .../core/engine/parsing/ast/LanguageExpression.java | 12 +----------- .../universal/core/engine/parsing/ast/Literal.java | 12 +----------- .../cn/universal/core/engine/parsing/ast/Node.java | 12 +----------- .../core/engine/parsing/ast/TernaryOperation.java | 12 +----------- .../core/engine/parsing/ast/UnaryOperation.java | 12 +----------- .../core/engine/parsing/ast/VariableSetter.java | 12 +----------- .../core/engine/parsing/ast/binary/AddOperation.java | 12 +----------- .../core/engine/parsing/ast/binary/AndOperation.java | 12 +----------- .../parsing/ast/binary/AssigmentOperation.java | 12 +----------- .../engine/parsing/ast/binary/BitAndOperation.java | 12 +----------- .../engine/parsing/ast/binary/BitOrOperation.java | 12 +----------- .../engine/parsing/ast/binary/DivisionOperation.java | 12 +----------- .../engine/parsing/ast/binary/EqualOperation.java | 12 +----------- .../parsing/ast/binary/GreaterEqualOperation.java | 12 +----------- .../engine/parsing/ast/binary/GreaterOperation.java | 12 +----------- .../parsing/ast/binary/InstanceofOperation.java | 12 +----------- .../engine/parsing/ast/binary/LShiftOperation.java | 12 +----------- .../parsing/ast/binary/LessEqualOperation.java | 12 +----------- .../engine/parsing/ast/binary/LessOperation.java | 12 +----------- .../engine/parsing/ast/binary/ModuloOperation.java | 12 +----------- .../parsing/ast/binary/MultiplicationOperation.java | 12 +----------- .../engine/parsing/ast/binary/NotEqualOperation.java | 12 +----------- .../core/engine/parsing/ast/binary/OrOperation.java | 12 +----------- .../engine/parsing/ast/binary/RShift2Operation.java | 12 +----------- .../engine/parsing/ast/binary/RShiftOperation.java | 12 +----------- .../parsing/ast/binary/SubtractionOperation.java | 12 +----------- .../core/engine/parsing/ast/binary/XorOperation.java | 12 +----------- .../core/engine/parsing/ast/linq/LinqExpression.java | 12 +----------- .../core/engine/parsing/ast/linq/LinqField.java | 12 +----------- .../core/engine/parsing/ast/linq/LinqJoin.java | 12 +----------- .../core/engine/parsing/ast/linq/LinqOrder.java | 12 +----------- .../core/engine/parsing/ast/linq/LinqSelect.java | 12 +----------- .../core/engine/parsing/ast/linq/WholeLiteral.java | 12 +----------- .../parsing/ast/literal/BigDecimalLiteral.java | 12 +----------- .../engine/parsing/ast/literal/BooleanLiteral.java | 12 +----------- .../core/engine/parsing/ast/literal/ByteLiteral.java | 12 +----------- .../engine/parsing/ast/literal/DoubleLiteral.java | 12 +----------- .../engine/parsing/ast/literal/FloatLiteral.java | 12 +----------- .../engine/parsing/ast/literal/IntegerLiteral.java | 12 +----------- .../core/engine/parsing/ast/literal/ListLiteral.java | 12 +----------- .../core/engine/parsing/ast/literal/LongLiteral.java | 12 +----------- .../core/engine/parsing/ast/literal/MapLiteral.java | 12 +----------- .../core/engine/parsing/ast/literal/NullLiteral.java | 12 +----------- .../engine/parsing/ast/literal/RegexpLiteral.java | 12 +----------- .../engine/parsing/ast/literal/ShortLiteral.java | 12 +----------- .../engine/parsing/ast/literal/StringLiteral.java | 12 +----------- .../core/engine/parsing/ast/statement/Assert.java | 12 +----------- .../core/engine/parsing/ast/statement/AsyncCall.java | 12 +----------- .../core/engine/parsing/ast/statement/Break.java | 12 +----------- .../engine/parsing/ast/statement/ClassConverter.java | 12 +----------- .../core/engine/parsing/ast/statement/Continue.java | 12 +----------- .../core/engine/parsing/ast/statement/Exit.java | 12 +----------- .../engine/parsing/ast/statement/ForStatement.java | 12 +----------- .../engine/parsing/ast/statement/FunctionCall.java | 12 +----------- .../engine/parsing/ast/statement/IfStatement.java | 12 +----------- .../core/engine/parsing/ast/statement/Import.java | 12 +----------- .../engine/parsing/ast/statement/LambdaFunction.java | 12 +----------- .../parsing/ast/statement/MapOrArrayAccess.java | 12 +----------- .../engine/parsing/ast/statement/MemberAccess.java | 12 +----------- .../engine/parsing/ast/statement/MethodCall.java | 12 +----------- .../engine/parsing/ast/statement/NewStatement.java | 12 +----------- .../core/engine/parsing/ast/statement/Return.java | 12 +----------- .../core/engine/parsing/ast/statement/Spread.java | 12 +----------- .../core/engine/parsing/ast/statement/Throw.java | 12 +----------- .../engine/parsing/ast/statement/TryStatement.java | 12 +----------- .../engine/parsing/ast/statement/VariableAccess.java | 12 +----------- .../engine/parsing/ast/statement/VariableDefine.java | 12 +----------- .../ast/statement/VariableDestructuringDefine.java | 12 +----------- .../engine/parsing/ast/statement/WhileStatement.java | 12 +----------- .../core/engine/reflection/ConstructorInvoker.java | 12 +----------- .../core/engine/reflection/JavaInvoker.java | 12 +----------- .../core/engine/reflection/JavaReflection.java | 12 +----------- .../core/engine/reflection/MethodInvoker.java | 12 +----------- .../cn/universal/core/engine/runtime/ExitValue.java | 12 +----------- .../core/engine/runtime/MagicScriptClassLoader.java | 12 +----------- .../core/engine/runtime/MagicScriptRuntime.java | 12 +----------- .../runtime/MagicScriptVariableAccessRuntime.java | 12 +----------- .../core/engine/runtime/RuntimeContext.java | 12 +----------- .../universal/core/engine/runtime/SpreadValue.java | 12 +----------- .../cn/universal/core/engine/runtime/Variables.java | 12 +----------- .../runtime/function/MagicScriptLambdaFunction.java | 12 +----------- .../function/MagicScriptLanguageFunction.java | 12 +----------- .../core/engine/runtime/handle/ArithmeticHandle.java | 12 +----------- .../core/engine/runtime/handle/BitHandle.java | 12 +----------- .../engine/runtime/handle/FunctionCallHandle.java | 12 +----------- .../core/engine/runtime/handle/MethodCallSite.java | 12 +----------- .../core/engine/runtime/handle/OperatorHandle.java | 12 +----------- .../engine/runtime/lang/ArrayKeyValueIterator.java | 12 +----------- .../core/engine/runtime/lang/ArrayValueIterator.java | 12 +----------- .../core/engine/runtime/lang/KeyIterator.java | 12 +----------- .../core/engine/runtime/lang/KeyValueIterator.java | 12 +----------- .../engine/runtime/lang/MapKeyValueIterator.java | 12 +----------- .../core/engine/runtime/linq/JoinValue.java | 12 +----------- .../core/engine/runtime/linq/LinQBuilder.java | 12 +----------- .../core/engine/runtime/linq/LinQJoinValue.java | 12 +----------- .../core/engine/runtime/linq/LinQOrder.java | 12 +----------- .../core/engine/runtime/linq/OrderValue.java | 12 +----------- .../universal/core/engine/runtime/linq/Record.java | 12 +----------- .../core/engine/runtime/linq/SelectField.java | 12 +----------- .../core/engine/runtime/linq/SelectValue.java | 12 +----------- 199 files changed, 199 insertions(+), 2189 deletions(-) diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicResourceLoader.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicResourceLoader.java index dc443527..b1784c19 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicResourceLoader.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicResourceLoader.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScript.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScript.java index 996910d5..98a88d11 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScript.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScript.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptContext.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptContext.java index e809eca1..4791dfb2 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptContext.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptContext.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptDebugContext.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptDebugContext.java index a4255f9d..997eb51a 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptDebugContext.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptDebugContext.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptEngine.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptEngine.java index 762675f9..7646be9e 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptEngine.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptEngine.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptEngineFactory.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptEngineFactory.java index c77039ca..2f65a665 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptEngineFactory.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptEngineFactory.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptError.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptError.java index b5db8006..69037810 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptError.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptError.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/ScriptClass.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/ScriptClass.java index d46e5a10..7fb2b148 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/ScriptClass.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/ScriptClass.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/annotation/Comment.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/annotation/Comment.java index 37932b7e..217a5378 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/annotation/Comment.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/annotation/Comment.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.annotation; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/annotation/Function.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/annotation/Function.java index ea30ec8a..8a0b31d4 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/annotation/Function.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/annotation/Function.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.annotation; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/AnnotationVisitor.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/AnnotationVisitor.java index dc221a91..4a6c4ad2 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/AnnotationVisitor.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/AnnotationVisitor.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/AnnotationWriter.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/AnnotationWriter.java index 8d6c7f65..8f9742d2 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/AnnotationWriter.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/AnnotationWriter.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Attribute.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Attribute.java index 4828c412..63c1d21c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Attribute.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Attribute.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ByteVector.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ByteVector.java index d61b4eeb..779d68c2 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ByteVector.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ByteVector.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassReader.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassReader.java index bb240c1b..94b85013 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassReader.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassReader.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassTooLargeException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassTooLargeException.java index 68a077d4..4bbfbabc 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassTooLargeException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassTooLargeException.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassVisitor.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassVisitor.java index 239e612d..7809beb7 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassVisitor.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassVisitor.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassWriter.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassWriter.java index 056c01a7..12d379e7 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassWriter.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassWriter.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ConstantDynamic.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ConstantDynamic.java index 9fc08f8e..a64eebed 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ConstantDynamic.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ConstantDynamic.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Constants.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Constants.java index f2e42107..9c869b2d 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Constants.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Constants.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Context.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Context.java index 8e313a05..62a40f43 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Context.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Context.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/CurrentFrame.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/CurrentFrame.java index 23eabc71..b4f796e0 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/CurrentFrame.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/CurrentFrame.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Edge.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Edge.java index 35bb7a9e..652b2cd2 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Edge.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Edge.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/FieldVisitor.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/FieldVisitor.java index 8b2723b2..528720ff 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/FieldVisitor.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/FieldVisitor.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/FieldWriter.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/FieldWriter.java index 9826f5ed..2da79454 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/FieldWriter.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/FieldWriter.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Frame.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Frame.java index e693b917..ae704782 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Frame.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Frame.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Handle.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Handle.java index 75c92612..338e0d36 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Handle.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Handle.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Handler.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Handler.java index a9c04e71..bfbb9560 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Handler.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Handler.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Label.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Label.java index 5837d403..2129d768 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Label.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Label.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodTooLargeException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodTooLargeException.java index 00b56ab6..a62c2112 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodTooLargeException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodTooLargeException.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodVisitor.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodVisitor.java index 34df99a6..ad78e851 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodVisitor.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodVisitor.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodWriter.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodWriter.java index c9327957..bdc02cdc 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodWriter.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodWriter.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ModuleVisitor.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ModuleVisitor.java index ad318616..84d70395 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ModuleVisitor.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ModuleVisitor.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ModuleWriter.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ModuleWriter.java index c3bf2953..a900660d 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ModuleWriter.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ModuleWriter.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Opcodes.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Opcodes.java index 31f0c413..e522392c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Opcodes.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Opcodes.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/RecordComponentVisitor.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/RecordComponentVisitor.java index 8d6ea794..6d9027af 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/RecordComponentVisitor.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/RecordComponentVisitor.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/RecordComponentWriter.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/RecordComponentWriter.java index 71acc4f5..a28289a5 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/RecordComponentWriter.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/RecordComponentWriter.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Symbol.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Symbol.java index 06768d18..18d382bb 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Symbol.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Symbol.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/SymbolTable.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/SymbolTable.java index 71066106..56b53e88 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/SymbolTable.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/SymbolTable.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Type.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Type.java index 9882a711..4ee985dc 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Type.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Type.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/TypePath.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/TypePath.java index 0ece5327..f3e1c769 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/TypePath.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/TypePath.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/TypeReference.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/TypeReference.java index 73c93d0b..791bf6a4 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/TypeReference.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/TypeReference.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureReader.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureReader.java index 0bacfec6..cf3b0775 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureReader.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureReader.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm.signature; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureVisitor.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureVisitor.java index 7e20a3e5..c675dd41 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureVisitor.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureVisitor.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm.signature; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureWriter.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureWriter.java index cb1d6539..cd5545da 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureWriter.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureWriter.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.asm.signature; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/CompileCache.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/CompileCache.java index 5aeb545c..b4cfcc39 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/CompileCache.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/CompileCache.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.compile; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/Descriptor.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/Descriptor.java index 0008d646..25267b53 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/Descriptor.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/Descriptor.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.compile; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/MagicScriptCompileException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/MagicScriptCompileException.java index 3ada139f..ccb3f688 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/MagicScriptCompileException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/MagicScriptCompileException.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.compile; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/MagicScriptCompiler.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/MagicScriptCompiler.java index 8e5374e3..e994288c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/MagicScriptCompiler.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/MagicScriptCompiler.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.compile; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/constant/SafeRule.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/constant/SafeRule.java index 471d1bdb..243b34fe 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/constant/SafeRule.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/constant/SafeRule.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.constant; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/BooleanImplicitConvert.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/BooleanImplicitConvert.java index a0a71cd4..b367dcd7 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/BooleanImplicitConvert.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/BooleanImplicitConvert.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.convert; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/ClassImplicitConvert.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/ClassImplicitConvert.java index 639b08c0..081eefc4 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/ClassImplicitConvert.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/ClassImplicitConvert.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.convert; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/CollectionImplicitConvert.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/CollectionImplicitConvert.java index 8dcd98b6..479f1583 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/CollectionImplicitConvert.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/CollectionImplicitConvert.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.convert; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/FunctionalImplicitConvert.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/FunctionalImplicitConvert.java index e9c4cd3c..e3f76b76 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/FunctionalImplicitConvert.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/FunctionalImplicitConvert.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.convert; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/MapImplicitConvert.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/MapImplicitConvert.java index 49bf9848..509634b4 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/MapImplicitConvert.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/MapImplicitConvert.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.convert; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/DebugTimeoutException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/DebugTimeoutException.java index edf2e7b4..176516c1 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/DebugTimeoutException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/DebugTimeoutException.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.exception; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/ExceptionUtils.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/ExceptionUtils.java index 3fc674bb..cb4a8b3b 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/ExceptionUtils.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/ExceptionUtils.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.exception; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicExitException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicExitException.java index 3824b381..e3090f12 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicExitException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicExitException.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.exception; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptAssertException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptAssertException.java index 46bdb6b8..fd2af786 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptAssertException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptAssertException.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.exception; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptException.java index 7944d704..e299302d 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptException.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.exception; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptRuntimeException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptRuntimeException.java index 1824e465..e310f1e1 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptRuntimeException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptRuntimeException.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.exception; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/RegexpLiteralException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/RegexpLiteralException.java index 17089a97..7c7c81ad 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/RegexpLiteralException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/RegexpLiteralException.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.exception; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/ResourceNotFoundException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/ResourceNotFoundException.java index 86c11614..020ba27a 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/ResourceNotFoundException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/ResourceNotFoundException.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.exception; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/StringLiteralException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/StringLiteralException.java index b70213a3..a208dbaa 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/StringLiteralException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/StringLiteralException.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.exception; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ArrayFunctions.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ArrayFunctions.java index ae8db434..fc383119 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ArrayFunctions.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ArrayFunctions.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ClassExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ClassExtension.java index 64967e9d..67bcd5a8 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ClassExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ClassExtension.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/CollectionFunctions.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/CollectionFunctions.java index 69164a53..acb396b0 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/CollectionFunctions.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/CollectionFunctions.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DateExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DateExtension.java index 5d961ce9..4f2967e4 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DateExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DateExtension.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicAttribute.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicAttribute.java index 2df5082f..0fba4cc3 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicAttribute.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicAttribute.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicMethod.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicMethod.java index a9d3130f..416060a9 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicMethod.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicMethod.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicModuleImport.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicModuleImport.java index e1f12852..4b5cca1f 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicModuleImport.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicModuleImport.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ExtensionMethod.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ExtensionMethod.java index 622399a9..82c1ff8d 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ExtensionMethod.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ExtensionMethod.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/MagicScriptFunctions.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/MagicScriptFunctions.java index 1663aa65..e06895c7 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/MagicScriptFunctions.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/MagicScriptFunctions.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/MapExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/MapExtension.java index 4dad209a..839adb9b 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/MapExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/MapExtension.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/NumberExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/NumberExtension.java index 9d4dbe3f..7e25c0dc 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/NumberExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/NumberExtension.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ObjectConvertExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ObjectConvertExtension.java index eca6806c..3f1404df 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ObjectConvertExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ObjectConvertExtension.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ObjectTypeConditionExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ObjectTypeConditionExtension.java index 7e529f67..032409d7 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ObjectTypeConditionExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ObjectTypeConditionExtension.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/PatternExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/PatternExtension.java index 41683bfe..095e0a37 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/PatternExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/PatternExtension.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StreamExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StreamExtension.java index 4e9cc2da..c5873714 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StreamExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StreamExtension.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StringExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StringExtension.java index e720b22b..6a327604 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StringExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StringExtension.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StringFunctions.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StringFunctions.java index 5b6535a2..a4644578 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StringFunctions.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StringFunctions.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/TemporalAccessorExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/TemporalAccessorExtension.java index 33c3f50a..787a40fc 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/TemporalAccessorExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/TemporalAccessorExtension.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/AggregationFunctions.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/AggregationFunctions.java index 66ba3115..2690d1ef 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/AggregationFunctions.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/AggregationFunctions.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions.linq; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/LinqFunctions.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/LinqFunctions.java index e15cb1bb..87cf1b6a 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/LinqFunctions.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/LinqFunctions.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions.linq; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/MathFunctions.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/MathFunctions.java index 999e76ab..3de5e4f6 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/MathFunctions.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/MathFunctions.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.functions.linq; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/CharacterStream.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/CharacterStream.java index dbcc78bf..e6affef2 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/CharacterStream.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/CharacterStream.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/GenericTokenParser.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/GenericTokenParser.java index 3d0bd153..825cb591 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/GenericTokenParser.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/GenericTokenParser.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/LiteralToken.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/LiteralToken.java index dbeb9577..3bab9822 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/LiteralToken.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/LiteralToken.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Parser.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Parser.java index a41dd556..fb053d77 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Parser.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Parser.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/RegexpToken.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/RegexpToken.java index a41c30ea..cf81c781 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/RegexpToken.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/RegexpToken.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Span.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Span.java index 01b90c42..fab91047 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Span.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Span.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Token.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Token.java index 21eb01c3..538094c5 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Token.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Token.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/TokenStream.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/TokenStream.java index 454adc5f..1a0a476e 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/TokenStream.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/TokenStream.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/TokenType.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/TokenType.java index 94418f95..a6403186 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/TokenType.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/TokenType.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Tokenizer.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Tokenizer.java index 54e3c579..ec489e17 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Tokenizer.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Tokenizer.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/VarIndex.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/VarIndex.java index fe3bb387..b695b6d6 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/VarIndex.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/VarIndex.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/VarScope.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/VarScope.java index dd26bde3..faaef8ff 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/VarScope.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/VarScope.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/BinaryOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/BinaryOperation.java index 0523525b..874ca051 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/BinaryOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/BinaryOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Expression.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Expression.java index df8a087d..a630272a 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Expression.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Expression.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/LanguageExpression.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/LanguageExpression.java index 6acfd34f..4652d133 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/LanguageExpression.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/LanguageExpression.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Literal.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Literal.java index ae1ac05a..967f66e3 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Literal.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Literal.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Node.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Node.java index 46749210..f0c77f84 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Node.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Node.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/TernaryOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/TernaryOperation.java index 066b225b..7afca909 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/TernaryOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/TernaryOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/UnaryOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/UnaryOperation.java index 0dbb4175..e3e520b3 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/UnaryOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/UnaryOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/VariableSetter.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/VariableSetter.java index 98405e52..5dacb539 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/VariableSetter.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/VariableSetter.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AddOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AddOperation.java index 6c796b31..184054c0 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AddOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AddOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AndOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AndOperation.java index 1438d5d7..1cbed993 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AndOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AndOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AssigmentOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AssigmentOperation.java index a508420d..33ffce52 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AssigmentOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AssigmentOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/BitAndOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/BitAndOperation.java index 8927db3d..c61140c4 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/BitAndOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/BitAndOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/BitOrOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/BitOrOperation.java index b378819a..aa430bd5 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/BitOrOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/BitOrOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/DivisionOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/DivisionOperation.java index 009bc26d..64de5263 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/DivisionOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/DivisionOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/EqualOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/EqualOperation.java index b2bf3ded..ee785806 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/EqualOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/EqualOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/GreaterEqualOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/GreaterEqualOperation.java index 3b207705..5f63bdd2 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/GreaterEqualOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/GreaterEqualOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/GreaterOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/GreaterOperation.java index 4cf76c8a..21da91f0 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/GreaterOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/GreaterOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/InstanceofOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/InstanceofOperation.java index 748d055f..a87476cc 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/InstanceofOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/InstanceofOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LShiftOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LShiftOperation.java index bc0ccfb9..0fdde7e1 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LShiftOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LShiftOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LessEqualOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LessEqualOperation.java index be69b7a0..63b05003 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LessEqualOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LessEqualOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LessOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LessOperation.java index 730bcabe..556f61ca 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LessOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LessOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/ModuloOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/ModuloOperation.java index 50f243f6..11aff1ca 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/ModuloOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/ModuloOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/MultiplicationOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/MultiplicationOperation.java index ddc4ec48..d04c9202 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/MultiplicationOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/MultiplicationOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/NotEqualOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/NotEqualOperation.java index 0e8ab64a..6181b124 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/NotEqualOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/NotEqualOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/OrOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/OrOperation.java index 3b6b67ab..af7730b6 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/OrOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/OrOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/RShift2Operation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/RShift2Operation.java index a6aff96d..d280331f 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/RShift2Operation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/RShift2Operation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/RShiftOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/RShiftOperation.java index 190d12be..1326faa6 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/RShiftOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/RShiftOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/SubtractionOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/SubtractionOperation.java index 1a45a5e5..db5a01ed 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/SubtractionOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/SubtractionOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/XorOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/XorOperation.java index f475dca1..66944484 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/XorOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/XorOperation.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.binary; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqExpression.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqExpression.java index e98915ba..15773c40 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqExpression.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqExpression.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.linq; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqField.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqField.java index 0096f4cd..ee0a3a50 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqField.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqField.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.linq; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqJoin.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqJoin.java index f4ab7987..404419c6 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqJoin.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqJoin.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.linq; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqOrder.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqOrder.java index 69c7ce67..0ebfa9dc 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqOrder.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqOrder.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.linq; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqSelect.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqSelect.java index 2a511d07..b6af07cb 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqSelect.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqSelect.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.linq; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/WholeLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/WholeLiteral.java index 44717feb..e686a5b0 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/WholeLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/WholeLiteral.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.linq; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/BigDecimalLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/BigDecimalLiteral.java index da316e26..fbb89f40 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/BigDecimalLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/BigDecimalLiteral.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.literal; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/BooleanLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/BooleanLiteral.java index 492b887f..88327a62 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/BooleanLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/BooleanLiteral.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.literal; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ByteLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ByteLiteral.java index 1b93aae8..2f110367 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ByteLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ByteLiteral.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.literal; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/DoubleLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/DoubleLiteral.java index c2d9a484..5a84d549 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/DoubleLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/DoubleLiteral.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.literal; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/FloatLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/FloatLiteral.java index 8fee9f7c..2820903c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/FloatLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/FloatLiteral.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.literal; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/IntegerLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/IntegerLiteral.java index 1d5e2290..33019afc 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/IntegerLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/IntegerLiteral.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.literal; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ListLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ListLiteral.java index edde25ce..92badb14 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ListLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ListLiteral.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.literal; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/LongLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/LongLiteral.java index 296a8ad0..c68aeab8 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/LongLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/LongLiteral.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.literal; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/MapLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/MapLiteral.java index 5e91afb6..57b44e3c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/MapLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/MapLiteral.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.literal; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/NullLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/NullLiteral.java index 1c99c958..da6d9028 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/NullLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/NullLiteral.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.literal; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/RegexpLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/RegexpLiteral.java index 9418a1ff..f130ff70 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/RegexpLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/RegexpLiteral.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.literal; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ShortLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ShortLiteral.java index 4a13bee1..efb31c4e 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ShortLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ShortLiteral.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.literal; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/StringLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/StringLiteral.java index 5eff5afc..e3da8fe5 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/StringLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/StringLiteral.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.literal; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Assert.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Assert.java index a603946e..f1e5602b 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Assert.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Assert.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/AsyncCall.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/AsyncCall.java index 4cac49fd..6a6b760c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/AsyncCall.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/AsyncCall.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Break.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Break.java index 969c97c4..983bcdbd 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Break.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Break.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/ClassConverter.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/ClassConverter.java index 4f4d2015..c52bd5db 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/ClassConverter.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/ClassConverter.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Continue.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Continue.java index 4293d3f4..a51f1a8c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Continue.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Continue.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Exit.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Exit.java index 44064ea0..7098355d 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Exit.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Exit.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/ForStatement.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/ForStatement.java index abd533b1..c885b1b2 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/ForStatement.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/ForStatement.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/FunctionCall.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/FunctionCall.java index 9a6f5e06..aa7fbc62 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/FunctionCall.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/FunctionCall.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/IfStatement.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/IfStatement.java index 8a63b10b..d10d071a 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/IfStatement.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/IfStatement.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Import.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Import.java index 7a527009..a8b6d64d 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Import.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Import.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/LambdaFunction.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/LambdaFunction.java index c4d91ac9..884ba217 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/LambdaFunction.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/LambdaFunction.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MapOrArrayAccess.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MapOrArrayAccess.java index 3e898c53..ed7e9277 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MapOrArrayAccess.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MapOrArrayAccess.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MemberAccess.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MemberAccess.java index 76493a13..f76a753e 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MemberAccess.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MemberAccess.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MethodCall.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MethodCall.java index 4631c833..d1d587ef 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MethodCall.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MethodCall.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/NewStatement.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/NewStatement.java index bb10a81a..47deac6c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/NewStatement.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/NewStatement.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Return.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Return.java index 569d7fee..5ed07f96 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Return.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Return.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Spread.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Spread.java index 383f5dae..2c2f378e 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Spread.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Spread.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Throw.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Throw.java index 5fcfe678..502f1669 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Throw.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Throw.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/TryStatement.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/TryStatement.java index b67f4583..afc5fbde 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/TryStatement.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/TryStatement.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableAccess.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableAccess.java index 5a4ac539..d91b1498 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableAccess.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableAccess.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableDefine.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableDefine.java index 0dffdd52..8c101330 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableDefine.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableDefine.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableDestructuringDefine.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableDestructuringDefine.java index 851f37c8..d3f95cc2 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableDestructuringDefine.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableDestructuringDefine.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/WhileStatement.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/WhileStatement.java index 24b15db1..8d6a66cc 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/WhileStatement.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/WhileStatement.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.parsing.ast.statement; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/ConstructorInvoker.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/ConstructorInvoker.java index ff436466..ea5ee66d 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/ConstructorInvoker.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/ConstructorInvoker.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.reflection; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/JavaInvoker.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/JavaInvoker.java index 7fd6460d..d7ac5606 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/JavaInvoker.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/JavaInvoker.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.reflection; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/JavaReflection.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/JavaReflection.java index c392b346..934fbdf4 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/JavaReflection.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/JavaReflection.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.reflection; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/MethodInvoker.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/MethodInvoker.java index 2ac7d6eb..8dd52c5c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/MethodInvoker.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/MethodInvoker.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.reflection; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/ExitValue.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/ExitValue.java index 44c28ced..06373eed 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/ExitValue.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/ExitValue.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptClassLoader.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptClassLoader.java index 11c68056..a71c70c9 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptClassLoader.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptClassLoader.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptRuntime.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptRuntime.java index d11e21b1..092ea149 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptRuntime.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptRuntime.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptVariableAccessRuntime.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptVariableAccessRuntime.java index 8268479e..3bd2a4ca 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptVariableAccessRuntime.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptVariableAccessRuntime.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/RuntimeContext.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/RuntimeContext.java index 75518994..118b06ab 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/RuntimeContext.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/RuntimeContext.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/SpreadValue.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/SpreadValue.java index 8de04ec2..2f1d4b6d 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/SpreadValue.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/SpreadValue.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/Variables.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/Variables.java index 2595fbc8..b10dbe24 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/Variables.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/Variables.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/function/MagicScriptLambdaFunction.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/function/MagicScriptLambdaFunction.java index bd374ebe..dad28a1d 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/function/MagicScriptLambdaFunction.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/function/MagicScriptLambdaFunction.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.function; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/function/MagicScriptLanguageFunction.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/function/MagicScriptLanguageFunction.java index 62fc3ca7..dc7a0fdc 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/function/MagicScriptLanguageFunction.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/function/MagicScriptLanguageFunction.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.function; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/ArithmeticHandle.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/ArithmeticHandle.java index eb8f51a0..ffcfe676 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/ArithmeticHandle.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/ArithmeticHandle.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.handle; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/BitHandle.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/BitHandle.java index 2ab24c1b..6fea171e 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/BitHandle.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/BitHandle.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.handle; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/FunctionCallHandle.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/FunctionCallHandle.java index 59036e93..c071763a 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/FunctionCallHandle.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/FunctionCallHandle.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.handle; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/MethodCallSite.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/MethodCallSite.java index 5152b832..c849a4eb 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/MethodCallSite.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/MethodCallSite.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.handle; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/OperatorHandle.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/OperatorHandle.java index d45f6b45..3885393d 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/OperatorHandle.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/OperatorHandle.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.handle; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/ArrayKeyValueIterator.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/ArrayKeyValueIterator.java index e26c547e..cdc11008 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/ArrayKeyValueIterator.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/ArrayKeyValueIterator.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.lang; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/ArrayValueIterator.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/ArrayValueIterator.java index 5f111fbc..9ecf21ed 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/ArrayValueIterator.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/ArrayValueIterator.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.lang; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/KeyIterator.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/KeyIterator.java index b45e6480..b8d2d4b2 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/KeyIterator.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/KeyIterator.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.lang; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/KeyValueIterator.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/KeyValueIterator.java index b7521d16..bbe970eb 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/KeyValueIterator.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/KeyValueIterator.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.lang; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/MapKeyValueIterator.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/MapKeyValueIterator.java index 5b704e16..78cb17f3 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/MapKeyValueIterator.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/MapKeyValueIterator.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.lang; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/JoinValue.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/JoinValue.java index 75ce9a03..7a6bc293 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/JoinValue.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/JoinValue.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.linq; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQBuilder.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQBuilder.java index ca5e5a60..9f38255c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQBuilder.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQBuilder.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.linq; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQJoinValue.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQJoinValue.java index 3d54a7fd..4ea7de9f 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQJoinValue.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQJoinValue.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.linq; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQOrder.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQOrder.java index f984f993..523c1f91 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQOrder.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQOrder.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.linq; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/OrderValue.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/OrderValue.java index d98b2cbc..9dad6754 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/OrderValue.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/OrderValue.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.linq; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/Record.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/Record.java index 60a2b367..015364a6 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/Record.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/Record.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.linq; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/SelectField.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/SelectField.java index 656c399f..7ba561a2 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/SelectField.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/SelectField.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.linq; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/SelectValue.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/SelectValue.java index 5947829e..816eb202 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/SelectValue.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/SelectValue.java @@ -1,14 +1,4 @@ -/* - * - * Copyright (c) 2025, IoT-Universal. All Rights Reserved. - * - * @Description: 本文件由 Aleo 开发并拥有版权,未经授权严禁擅自商用、复制或传播。 - * @Author: Aleo - * @Email: wo8335224@gmail.com - * @Wechat: outlookFil - * - * - */ + package cn.universal.core.engine.runtime.linq; -- Gitee From cee8a547b336c3836a88d8e6f92dfd6ecd1561a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=88=E7=A7=91=E6=96=AF=EF=BC=88NexIoT=EF=BC=89?= <16120872+nexiot@user.noreply.gitee.com> Date: Wed, 24 Sep 2025 11:24:03 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/engine/MagicResourceLoader.java | 48 +- .../cn/universal/core/engine/MagicScript.java | 30 +- .../core/engine/MagicScriptContext.java | 34 +- .../core/engine/MagicScriptDebugContext.java | 4 +- .../core/engine/MagicScriptEngine.java | 4 +- .../core/engine/MagicScriptEngineFactory.java | 2 - .../core/engine/MagicScriptError.java | 6 +- .../cn/universal/core/engine/ScriptClass.java | 2 - .../core/engine/annotation/Comment.java | 10 +- .../core/engine/annotation/Function.java | 10 +- .../core/engine/asm/AnnotationVisitor.java | 62 +- .../core/engine/asm/AnnotationWriter.java | 163 +++-- .../universal/core/engine/asm/Attribute.java | 128 ++-- .../universal/core/engine/asm/ByteVector.java | 32 +- .../core/engine/asm/ClassReader.java | 529 +++++++------- .../engine/asm/ClassTooLargeException.java | 4 +- .../core/engine/asm/ClassVisitor.java | 167 ++--- .../core/engine/asm/ClassWriter.java | 212 +++--- .../core/engine/asm/ConstantDynamic.java | 33 +- .../universal/core/engine/asm/Constants.java | 9 +- .../cn/universal/core/engine/asm/Context.java | 67 +- .../core/engine/asm/CurrentFrame.java | 2 - .../cn/universal/core/engine/asm/Edge.java | 18 +- .../core/engine/asm/FieldVisitor.java | 48 +- .../core/engine/asm/FieldWriter.java | 36 +- .../cn/universal/core/engine/asm/Frame.java | 133 ++-- .../cn/universal/core/engine/asm/Handle.java | 78 ++- .../cn/universal/core/engine/asm/Handler.java | 27 +- .../cn/universal/core/engine/asm/Label.java | 81 ++- .../engine/asm/MethodTooLargeException.java | 6 +- .../core/engine/asm/MethodVisitor.java | 390 ++++++----- .../core/engine/asm/MethodWriter.java | 661 ++++++++++-------- .../core/engine/asm/ModuleVisitor.java | 42 +- .../core/engine/asm/ModuleWriter.java | 76 +- .../cn/universal/core/engine/asm/Opcodes.java | 13 +- .../engine/asm/RecordComponentVisitor.java | 39 +- .../engine/asm/RecordComponentWriter.java | 20 +- .../cn/universal/core/engine/asm/Symbol.java | 117 ++-- .../core/engine/asm/SymbolTable.java | 217 +++--- .../cn/universal/core/engine/asm/Type.java | 164 +++-- .../universal/core/engine/asm/TypePath.java | 42 +- .../core/engine/asm/TypeReference.java | 116 +-- .../engine/asm/signature/SignatureReader.java | 16 +- .../asm/signature/SignatureVisitor.java | 52 +- .../engine/asm/signature/SignatureWriter.java | 28 +- .../core/engine/compile/CompileCache.java | 2 - .../core/engine/compile/Descriptor.java | 2 - .../compile/MagicScriptCompileException.java | 2 - .../engine/compile/MagicScriptCompiler.java | 178 +++-- .../core/engine/constant/SafeRule.java | 3 - .../convert/BooleanImplicitConvert.java | 6 +- .../engine/convert/ClassImplicitConvert.java | 14 +- .../convert/CollectionImplicitConvert.java | 18 +- .../convert/FunctionalImplicitConvert.java | 10 +- .../engine/convert/MapImplicitConvert.java | 6 +- .../exception/DebugTimeoutException.java | 2 - .../core/engine/exception/ExceptionUtils.java | 2 - .../engine/exception/MagicExitException.java | 2 - .../exception/MagicScriptAssertException.java | 2 - .../exception/MagicScriptException.java | 2 - .../MagicScriptRuntimeException.java | 5 +- .../exception/RegexpLiteralException.java | 6 +- .../exception/ResourceNotFoundException.java | 2 - .../exception/StringLiteralException.java | 2 - .../core/engine/functions/ArrayFunctions.java | 2 - .../core/engine/functions/ClassExtension.java | 2 - .../engine/functions/CollectionFunctions.java | 6 +- .../core/engine/functions/DateExtension.java | 6 +- .../engine/functions/DynamicAttribute.java | 2 - .../core/engine/functions/DynamicMethod.java | 2 - .../engine/functions/DynamicModuleImport.java | 2 - .../engine/functions/ExtensionMethod.java | 2 - .../functions/MagicScriptFunctions.java | 6 +- .../core/engine/functions/MapExtension.java | 20 +- .../engine/functions/NumberExtension.java | 12 +- .../functions/ObjectConvertExtension.java | 68 +- .../ObjectTypeConditionExtension.java | 75 +- .../engine/functions/PatternExtension.java | 9 +- .../engine/functions/StreamExtension.java | 104 +-- .../engine/functions/StringExtension.java | 9 +- .../engine/functions/StringFunctions.java | 2 - .../functions/TemporalAccessorExtension.java | 2 - .../functions/linq/AggregationFunctions.java | 6 +- .../engine/functions/linq/LinqFunctions.java | 6 +- .../engine/functions/linq/MathFunctions.java | 2 - .../core/engine/parsing/CharacterStream.java | 64 +- .../engine/parsing/GenericTokenParser.java | 2 - .../core/engine/parsing/LiteralToken.java | 2 - .../universal/core/engine/parsing/Parser.java | 117 ++-- .../core/engine/parsing/RegexpToken.java | 2 - .../universal/core/engine/parsing/Span.java | 38 +- .../universal/core/engine/parsing/Token.java | 2 - .../core/engine/parsing/TokenStream.java | 67 +- .../core/engine/parsing/TokenType.java | 6 +- .../core/engine/parsing/Tokenizer.java | 32 +- .../core/engine/parsing/VarIndex.java | 2 - .../core/engine/parsing/VarScope.java | 5 +- .../engine/parsing/ast/BinaryOperation.java | 9 +- .../core/engine/parsing/ast/Expression.java | 6 +- .../parsing/ast/LanguageExpression.java | 2 - .../core/engine/parsing/ast/Literal.java | 6 +- .../core/engine/parsing/ast/Node.java | 17 +- .../engine/parsing/ast/TernaryOperation.java | 2 - .../engine/parsing/ast/UnaryOperation.java | 30 +- .../engine/parsing/ast/VariableSetter.java | 2 - .../parsing/ast/binary/AddOperation.java | 6 +- .../parsing/ast/binary/AndOperation.java | 6 +- .../ast/binary/AssigmentOperation.java | 6 +- .../parsing/ast/binary/BitAndOperation.java | 6 +- .../parsing/ast/binary/BitOrOperation.java | 6 +- .../parsing/ast/binary/DivisionOperation.java | 6 +- .../parsing/ast/binary/EqualOperation.java | 6 +- .../ast/binary/GreaterEqualOperation.java | 6 +- .../parsing/ast/binary/GreaterOperation.java | 6 +- .../ast/binary/InstanceofOperation.java | 6 +- .../parsing/ast/binary/LShiftOperation.java | 6 +- .../ast/binary/LessEqualOperation.java | 6 +- .../parsing/ast/binary/LessOperation.java | 6 +- .../parsing/ast/binary/ModuloOperation.java | 6 +- .../ast/binary/MultiplicationOperation.java | 6 +- .../parsing/ast/binary/NotEqualOperation.java | 6 +- .../parsing/ast/binary/OrOperation.java | 6 +- .../parsing/ast/binary/RShift2Operation.java | 6 +- .../parsing/ast/binary/RShiftOperation.java | 6 +- .../ast/binary/SubtractionOperation.java | 6 +- .../parsing/ast/binary/XorOperation.java | 6 +- .../parsing/ast/linq/LinqExpression.java | 4 +- .../engine/parsing/ast/linq/LinqField.java | 2 - .../engine/parsing/ast/linq/LinqJoin.java | 2 - .../engine/parsing/ast/linq/LinqOrder.java | 6 +- .../engine/parsing/ast/linq/LinqSelect.java | 2 - .../engine/parsing/ast/linq/WholeLiteral.java | 2 - .../ast/literal/BigDecimalLiteral.java | 6 +- .../parsing/ast/literal/BooleanLiteral.java | 6 +- .../parsing/ast/literal/ByteLiteral.java | 6 +- .../parsing/ast/literal/DoubleLiteral.java | 6 +- .../parsing/ast/literal/FloatLiteral.java | 6 +- .../parsing/ast/literal/IntegerLiteral.java | 6 +- .../parsing/ast/literal/ListLiteral.java | 6 +- .../parsing/ast/literal/LongLiteral.java | 6 +- .../parsing/ast/literal/MapLiteral.java | 6 +- .../parsing/ast/literal/NullLiteral.java | 6 +- .../parsing/ast/literal/RegexpLiteral.java | 6 +- .../parsing/ast/literal/ShortLiteral.java | 6 +- .../parsing/ast/literal/StringLiteral.java | 6 +- .../engine/parsing/ast/statement/Assert.java | 6 +- .../parsing/ast/statement/AsyncCall.java | 10 +- .../engine/parsing/ast/statement/Break.java | 6 +- .../parsing/ast/statement/ClassConverter.java | 2 - .../parsing/ast/statement/Continue.java | 6 +- .../engine/parsing/ast/statement/Exit.java | 2 - .../parsing/ast/statement/ForStatement.java | 2 - .../parsing/ast/statement/FunctionCall.java | 2 - .../parsing/ast/statement/IfStatement.java | 2 - .../engine/parsing/ast/statement/Import.java | 2 - .../parsing/ast/statement/LambdaFunction.java | 6 +- .../ast/statement/MapOrArrayAccess.java | 2 - .../parsing/ast/statement/MemberAccess.java | 2 - .../parsing/ast/statement/MethodCall.java | 2 - .../parsing/ast/statement/NewStatement.java | 2 - .../engine/parsing/ast/statement/Return.java | 2 - .../engine/parsing/ast/statement/Spread.java | 6 +- .../engine/parsing/ast/statement/Throw.java | 2 - .../parsing/ast/statement/TryStatement.java | 2 - .../parsing/ast/statement/VariableAccess.java | 2 - .../parsing/ast/statement/VariableDefine.java | 2 - .../VariableDestructuringDefine.java | 2 - .../parsing/ast/statement/WhileStatement.java | 2 - .../engine/reflection/ConstructorInvoker.java | 2 - .../core/engine/reflection/JavaInvoker.java | 8 +- .../engine/reflection/JavaReflection.java | 40 +- .../core/engine/reflection/MethodInvoker.java | 2 - .../core/engine/runtime/ExitValue.java | 2 - .../runtime/MagicScriptClassLoader.java | 2 - .../engine/runtime/MagicScriptRuntime.java | 2 - .../MagicScriptVariableAccessRuntime.java | 2 - .../core/engine/runtime/RuntimeContext.java | 2 - .../core/engine/runtime/SpreadValue.java | 2 - .../core/engine/runtime/Variables.java | 2 - .../function/MagicScriptLambdaFunction.java | 2 - .../function/MagicScriptLanguageFunction.java | 2 - .../runtime/handle/ArithmeticHandle.java | 2 - .../core/engine/runtime/handle/BitHandle.java | 5 +- .../runtime/handle/FunctionCallHandle.java | 15 +- .../engine/runtime/handle/MethodCallSite.java | 2 - .../engine/runtime/handle/OperatorHandle.java | 5 +- .../runtime/lang/ArrayKeyValueIterator.java | 2 - .../runtime/lang/ArrayValueIterator.java | 2 - .../core/engine/runtime/lang/KeyIterator.java | 2 - .../engine/runtime/lang/KeyValueIterator.java | 2 - .../runtime/lang/MapKeyValueIterator.java | 2 - .../core/engine/runtime/linq/JoinValue.java | 2 - .../core/engine/runtime/linq/LinQBuilder.java | 2 - .../engine/runtime/linq/LinQJoinValue.java | 2 - .../core/engine/runtime/linq/LinQOrder.java | 2 - .../core/engine/runtime/linq/OrderValue.java | 2 - .../core/engine/runtime/linq/Record.java | 2 - .../core/engine/runtime/linq/SelectField.java | 2 - .../core/engine/runtime/linq/SelectValue.java | 2 - 199 files changed, 2996 insertions(+), 2427 deletions(-) diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicResourceLoader.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicResourceLoader.java index b1784c19..f37c9bba 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicResourceLoader.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicResourceLoader.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine; import cn.universal.core.engine.exception.ResourceNotFoundException; @@ -14,24 +12,36 @@ import java.util.function.BiFunction; import java.util.function.Function; import java.util.stream.Collectors; -/** 资源加载器 */ +/** + * 资源加载器 + */ public class MagicResourceLoader { - /** 保存自动导入的包路径 */ + /** + * 保存自动导入的包路径 + */ private static final Set PACKAGES = new HashSet<>(); - /** 函数加载器 */ + /** + * 函数加载器 + */ private static final List> FUNCTION_LOADERS = new ArrayList<>(); - /** JSR223 脚本函数加载器 */ + /** + * JSR223 脚本函数加载器 + */ private static final List, String, Object>>> SCRIPT_LANGUAGE_LOADERS = new ArrayList<>(); - /** 保存已注册的模块 */ + /** + * 保存已注册的模块 + */ private static final Map MODULES = new ConcurrentHashMap<>(); - /** 默认的类加载器 */ + /** + * 默认的类加载器 + */ private static Function classLoader = (className) -> { try { @@ -47,7 +57,9 @@ public class MagicResourceLoader { addPackage("java.lang.*"); } - /** 获取已注册的模块信息,此方法主要用于代码提示 */ + /** + * 获取已注册的模块信息,此方法主要用于代码提示 + */ public static Map getModules() { return MODULES.entrySet().stream() .collect( @@ -70,13 +82,17 @@ public class MagicResourceLoader { })); } - /** 添加函数加载器 */ + /** + * 添加函数加载器 + */ public static void addFunctionLoader( BiFunction functionLoader) { FUNCTION_LOADERS.add(functionLoader); } - /** 设置类加载器 */ + /** + * 设置类加载器 + */ public static void setClassLoader(Function classLoader) { MagicResourceLoader.classLoader = classLoader; } @@ -85,7 +101,7 @@ public class MagicResourceLoader { * 添加模块 * * @param moduleName 模块名称 - * @param target 模块,可以是对象实例,也可以是Class类型的,此时只能使用类中的静态方法 + * @param target 模块,可以是对象实例,也可以是Class类型的,此时只能使用类中的静态方法 */ public static void addModule(String moduleName, Object target) { MODULES.put(moduleName, target); @@ -122,7 +138,9 @@ public class MagicResourceLoader { return classLoader.apply(className); } - /** 获取可用的模块列表 */ + /** + * 获取可用的模块列表 + */ public static Set getModuleNames() { return MODULES.keySet(); } @@ -151,7 +169,9 @@ public class MagicResourceLoader { return null; } - /** 添加JSR223 脚本函数加载器 */ + /** + * 添加JSR223 脚本函数加载器 + */ public static void addScriptLanguageLoader( Function, String, Object>> loader) { SCRIPT_LANGUAGE_LOADERS.add(loader); diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScript.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScript.java index 98a88d11..6c792edc 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScript.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScript.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine; import cn.universal.core.engine.compile.CompileCache; @@ -35,18 +33,26 @@ public class MagicScript extends CompiledScript { public static final String DEBUG_MARK = "!# DEBUG\r\n"; - /** 所有语句 */ + /** + * 所有语句 + */ private final List nodes; private final ScriptEngine scriptEngine; - /** 存放所有变量定义 */ + /** + * 存放所有变量定义 + */ private final Set varIndices; - /** 编译后的类 */ + /** + * 编译后的类 + */ private MagicScriptVariableAccessRuntime accessRuntime; - /** 构造函数 */ + /** + * 构造函数 + */ private Constructor constructor; private final boolean debug; @@ -69,12 +75,16 @@ public class MagicScript extends CompiledScript { compileCache = new CompileCache(capacity); } - /** 创建MagicScript */ + /** + * 创建MagicScript + */ public static MagicScript create(String source, ScriptEngine scriptEngine) { return create(false, source, scriptEngine); } - /** 创建MagicScript */ + /** + * 创建MagicScript + */ public static MagicScript create(boolean expression, String source, ScriptEngine scriptEngine) { if (compileCache == null) { compileCache = new CompileCache(500); @@ -115,7 +125,9 @@ public class MagicScript extends CompiledScript { return null; } - /** 编译 */ + /** + * 编译 + */ public MagicScriptRuntime compile() throws MagicScriptCompileException { if (this.accessRuntime != null) { return this.accessRuntime; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptContext.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptContext.java index 4791dfb2..cf78048b 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptContext.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptContext.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine; import cn.universal.core.engine.exception.MagicScriptException; @@ -12,13 +10,19 @@ import java.util.List; import java.util.Map; import java.util.Objects; -/** 脚本环境上下文 编译后的类每个方法的第一个参数都是本类。 此类主要用于辅助读写变量以及设置/读取/ */ +/** + * 脚本环境上下文 编译后的类每个方法的第一个参数都是本类。 此类主要用于辅助读写变量以及设置/读取/ + */ public class MagicScriptContext { - /** 保存手动设置的环境变量 */ + /** + * 保存手动设置的环境变量 + */ private final Map rootVariables = new LinkedHashMap<>(); - /** 代码执行时,存放 import "xx.xx.xx.*" 的包 */ + /** + * 代码执行时,存放 import "xx.xx.xx.*" 的包 + */ private final List importPackages = new ArrayList<>(); private MagicScriptRuntime runtime; @@ -27,7 +31,8 @@ public class MagicScriptContext { private String scriptName; - public MagicScriptContext() {} + public MagicScriptContext() { + } public MagicScriptContext(Map variables) { putMapIntoContext(variables); @@ -83,7 +88,7 @@ public class MagicScriptContext { /** * 设置环境变量 * - * @param name 变量名 + * @param name 变量名 * @param value 变量值 */ public MagicScriptContext set(String name, Object value) { @@ -95,7 +100,7 @@ public class MagicScriptContext { * 创建变量 * * @param runtime 脚本实例 - * @param size 数组大小(变量个数) + * @param size 数组大小(变量个数) */ public Variables createVariables(MagicScriptRuntime runtime, int size) { this.runtime = runtime; @@ -110,7 +115,7 @@ public class MagicScriptContext { * 从当前上下文中动态执行脚本 * * @param runtimeContext - * @param script 脚本内容 + * @param script 脚本内容 */ public Object eval(RuntimeContext runtimeContext, String script) { Map varMap = @@ -145,12 +150,16 @@ public class MagicScriptContext { return runtime.getVarNames(); } - /** 获取调用时传入的变量信息 */ + /** + * 获取调用时传入的变量信息 + */ public Map getRootVariables() { return rootVariables; } - /** 批量设置环境变量 */ + /** + * 批量设置环境变量 + */ public void putMapIntoContext(Map map) { if (map != null && !map.isEmpty()) { rootVariables.putAll(map); @@ -169,5 +178,6 @@ public class MagicScriptContext { } public void pause(int startRow, int startCol, int endRow, int endCol, Variables variables) - throws InterruptedException {} + throws InterruptedException { + } } diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptDebugContext.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptDebugContext.java index 997eb51a..2cf0ee59 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptDebugContext.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptDebugContext.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine; import cn.universal.core.engine.runtime.Variables; @@ -51,7 +49,7 @@ public class MagicScriptDebugContext extends MagicScriptContext { int startRow, int startCol, int endRow, int endCol, Variables variables) throws InterruptedException { if (stepInto || breakpoints.contains(startRow)) { - this.line = new int[] {startRow, startCol, endRow, endCol}; + this.line = new int[]{startRow, startCol, endRow, endCol}; consumer.offer(this.id); Map varMap = new LinkedHashMap<>(getRootVariables()); varMap.putAll(variables.getVariables(this)); diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptEngine.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptEngine.java index 7646be9e..5a20321a 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptEngine.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptEngine.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine; import cn.universal.core.engine.ScriptClass.ScriptAttribute; @@ -147,7 +145,7 @@ public class MagicScriptEngine extends AbstractScriptEngine implements ScriptEng String methodName = method.getName(); if (method.getParameters().isEmpty() && ((methodName.startsWith("get") && methodName.length() > 3) - || (methodName.startsWith("is") && methodName.length() > 2))) { + || (methodName.startsWith("is") && methodName.length() > 2))) { String attributeName = method.getName().substring(3); attributeName = attributeName.substring(0, 1).toLowerCase() + attributeName.substring(1); diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptEngineFactory.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptEngineFactory.java index 2f65a665..7890a378 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptEngineFactory.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptEngineFactory.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine; import java.util.Arrays; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptError.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptError.java index 69037810..2343ebde 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptError.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/MagicScriptError.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine; import cn.universal.core.engine.exception.MagicExitException; @@ -10,7 +8,9 @@ import cn.universal.core.engine.runtime.MagicScriptRuntime; import java.util.ArrayList; import java.util.List; -/** All errors reported by the library go through the static functions of this class. */ +/** + * All errors reported by the library go through the static functions of this class. + */ public class MagicScriptError { /** diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/ScriptClass.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/ScriptClass.java index 7fb2b148..cf476392 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/ScriptClass.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/ScriptClass.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine; import cn.universal.core.engine.annotation.Comment; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/annotation/Comment.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/annotation/Comment.java index 217a5378..61258c13 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/annotation/Comment.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/annotation/Comment.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.annotation; import java.lang.annotation.Documented; @@ -8,7 +6,9 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -/** 方法、字段、参数注释 */ +/** + * 方法、字段、参数注释 + */ @Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) @Documented @@ -18,6 +18,8 @@ public @interface Comment { String name() default ""; - /** 是否返回原类型 */ + /** + * 是否返回原类型 + */ boolean origin() default false; } diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/annotation/Function.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/annotation/Function.java index 8a0b31d4..2a1dd022 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/annotation/Function.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/annotation/Function.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.annotation; import java.lang.annotation.Documented; @@ -8,8 +6,12 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -/** 标识是个函数 */ +/** + * 标识是个函数 + */ @Target({ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Documented -public @interface Function {} +public @interface Function { + +} diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/AnnotationVisitor.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/AnnotationVisitor.java index 4a6c4ad2..a0075d2e 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/AnnotationVisitor.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/AnnotationVisitor.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -10,22 +8,23 @@ package cn.universal.core.engine.asm; public abstract class AnnotationVisitor { /** - * The ASM API version implemented by this visitor. The value of this field must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. + * The ASM API version implemented by this visitor. The value of this field must be one of + * {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ protected final int api; /** - * The annotation visitor to which this visitor must delegate method calls. May be {@literal - * null}. + * The annotation visitor to which this visitor must delegate method calls. May be + * {@literal null}. */ protected AnnotationVisitor av; /** * Constructs a new {@link AnnotationVisitor}. * - * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. + * @param api the ASM API version implemented by this visitor. Must be one of + * {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or + * {@link Opcodes#ASM7}. */ public AnnotationVisitor(final int api) { this(api, null); @@ -34,10 +33,11 @@ public abstract class AnnotationVisitor { /** * Constructs a new {@link AnnotationVisitor}. * - * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. + * @param api the ASM API version implemented by this visitor. Must be one of + * {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or + * {@link Opcodes#ASM7}. * @param annotationVisitor the annotation visitor to which this visitor must delegate method - * calls. May be {@literal null}. + * calls. May be {@literal null}. */ public AnnotationVisitor(final int api, final AnnotationVisitor annotationVisitor) { if (api != Opcodes.ASM9 @@ -59,13 +59,14 @@ public abstract class AnnotationVisitor { /** * Visits a primitive value of the annotation. * - * @param name the value name. - * @param value the actual value, whose type must be {@link Byte}, {@link Boolean}, {@link - * Character}, {@link Short}, {@link Integer} , {@link Long}, {@link Float}, {@link Double}, - * {@link String} or {@link Type} of {@link Type#OBJECT} or {@link Type#ARRAY} sort. This - * value can also be an array of byte, boolean, short, char, int, long, float or double values - * (this is equivalent to using {@link #visitArray} and visiting each array element in turn, - * but is more convenient). + * @param name the value name. + * @param value the actual value, whose type must be {@link Byte}, {@link Boolean}, + * {@link Character}, {@link Short}, {@link Integer} , {@link Long}, {@link Float}, + * {@link Double}, {@link String} or {@link Type} of {@link Type#OBJECT} or + * {@link Type#ARRAY} sort. This value can also be an array of byte, boolean, short, + * char, int, long, float or double values (this is equivalent to using + * {@link #visitArray} and visiting each array element in turn, but is more + * convenient). */ public void visit(final String name, final Object value) { if (av != null) { @@ -76,9 +77,9 @@ public abstract class AnnotationVisitor { /** * Visits an enumeration value of the annotation. * - * @param name the value name. + * @param name the value name. * @param descriptor the class descriptor of the enumeration class. - * @param value the actual enumeration value. + * @param value the actual enumeration value. */ public void visitEnum(final String name, final String descriptor, final String value) { if (av != null) { @@ -89,11 +90,11 @@ public abstract class AnnotationVisitor { /** * Visits a nested annotation value of the annotation. * - * @param name the value name. + * @param name the value name. * @param descriptor the class descriptor of the nested annotation class. * @return a visitor to visit the actual nested annotation value, or {@literal null} if this - * visitor is not interested in visiting this nested annotation. The nested annotation - * value must be fully visited before calling other methods on this annotation visitor. + * visitor is not interested in visiting this nested annotation. The nested annotation value + * must be fully visited before calling other methods on this annotation visitor. */ public AnnotationVisitor visitAnnotation(final String name, final String descriptor) { if (av != null) { @@ -104,14 +105,15 @@ public abstract class AnnotationVisitor { /** * Visits an array value of the annotation. Note that arrays of primitive values (such as byte, - * boolean, short, char, int, long, float or double) can be passed as value to {@link #visit - * visit}. This is what {@link ClassReader} does for non empty arrays of primitive values. + * boolean, short, char, int, long, float or double) can be passed as value to + * {@link #visit visit}. This is what {@link ClassReader} does for non empty arrays of primitive + * values. * * @param name the value name. * @return a visitor to visit the actual array value elements, or {@literal null} if this visitor - * is not interested in visiting these values. The 'name' parameters passed to the methods of - * this visitor are ignored. All the array values must be visited before calling other - * methods on this annotation visitor. + * is not interested in visiting these values. The 'name' parameters passed to the methods of this + * visitor are ignored. All the array values must be visited before calling other methods on + * this annotation visitor. */ public AnnotationVisitor visitArray(final String name) { if (av != null) { @@ -120,7 +122,9 @@ public abstract class AnnotationVisitor { return null; } - /** Visits the end of the annotation. */ + /** + * Visits the end of the annotation. + */ public void visitEnd() { if (av != null) { av.visitEnd(); diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/AnnotationWriter.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/AnnotationWriter.java index 8f9742d2..30303b6b 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/AnnotationWriter.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/AnnotationWriter.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -11,13 +9,15 @@ package cn.universal.core.engine.asm; * Bruneton @Author Eugene Kuleshov * * @see JVMS - * 4.7.16 + * 4.7.16 * @see JVMS - * 4.7.20 + * 4.7.20 */ final class AnnotationWriter extends AnnotationVisitor { - /** Where the constants used in this AnnotationWriter must be stored. */ + /** + * Where the constants used in this AnnotationWriter must be stored. + */ private final SymbolTable symbolTable; /** @@ -31,9 +31,9 @@ final class AnnotationWriter extends AnnotationVisitor { * The 'annotation' or 'type_annotation' JVMS structure corresponding to the annotation values * visited so far. All the fields of these structures, except the last one - the * element_value_pairs array, must be set before this ByteVector is passed to the constructor - * (num_element_value_pairs can be set to 0, it is reset to the correct value in {@link - * #visitEnd()}). The element_value_pairs array is filled incrementally in the various visit() - * methods. + * (num_element_value_pairs can be set to 0, it is reset to the correct value in + * {@link #visitEnd()}). The element_value_pairs array is filled incrementally in the various + * visit() methods. * *

Note: as an exception to the above rules, for AnnotationDefault attributes (which contain a * single element_value by definition), this ByteVector is initially empty when passed to the @@ -47,7 +47,9 @@ final class AnnotationWriter extends AnnotationVisitor { */ private final int numElementValuePairsOffset; - /** The number of element value pairs visited so far. */ + /** + * The number of element value pairs visited so far. + */ private int numElementValuePairs; /** @@ -71,15 +73,17 @@ final class AnnotationWriter extends AnnotationVisitor { /** * Constructs a new {@link AnnotationWriter}. * - * @param symbolTable where the constants used in this AnnotationWriter must be stored. - * @param useNamedValues whether values are named or not. AnnotationDefault and annotation arrays - * use unnamed values. - * @param annotation where the 'annotation' or 'type_annotation' JVMS structure corresponding to - * the visited content must be stored. This ByteVector must already contain all the fields of - * the structure except the last one (the element_value_pairs array). + * @param symbolTable where the constants used in this AnnotationWriter must be stored. + * @param useNamedValues whether values are named or not. AnnotationDefault and annotation + * arrays use unnamed values. + * @param annotation where the 'annotation' or 'type_annotation' JVMS structure + * corresponding to the visited content must be stored. This ByteVector + * must already contain all the fields of the structure except the last + * one (the element_value_pairs array). * @param previousAnnotation the previously visited annotation of the - * Runtime[In]Visible[Type]Annotations attribute to which this annotation belongs, or - * {@literal null} in other cases (e.g. nested or array annotations). + * Runtime[In]Visible[Type]Annotations attribute to which this + * annotation belongs, or {@literal null} in other cases (e.g. nested or + * array annotations). */ AnnotationWriter( final SymbolTable symbolTable, @@ -101,11 +105,12 @@ final class AnnotationWriter extends AnnotationVisitor { /** * Creates a new {@link AnnotationWriter} using named values. * - * @param symbolTable where the constants used in this AnnotationWriter must be stored. - * @param descriptor the class descriptor of the annotation class. + * @param symbolTable where the constants used in this AnnotationWriter must be stored. + * @param descriptor the class descriptor of the annotation class. * @param previousAnnotation the previously visited annotation of the - * Runtime[In]Visible[Type]Annotations attribute to which this annotation belongs, or - * {@literal null} in other cases (e.g. nested or array annotations). + * Runtime[In]Visible[Type]Annotations attribute to which this + * annotation belongs, or {@literal null} in other cases (e.g. nested or + * array annotations). * @return a new {@link AnnotationWriter} for the given annotation descriptor. */ static AnnotationWriter create( @@ -124,18 +129,19 @@ final class AnnotationWriter extends AnnotationVisitor { /** * Creates a new {@link AnnotationWriter} using named values. * - * @param symbolTable where the constants used in this AnnotationWriter must be stored. - * @param typeRef a reference to the annotated type. The sort of this type reference must be - * {@link TypeReference#CLASS_TYPE_PARAMETER}, {@link - * TypeReference#CLASS_TYPE_PARAMETER_BOUND} or {@link TypeReference#CLASS_EXTENDS}. See - * {@link TypeReference}. - * @param typePath the path to the annotated type argument, wildcard bound, array element type, or - * static inner type within 'typeRef'. May be {@literal null} if the annotation targets - * 'typeRef' as a whole. - * @param descriptor the class descriptor of the annotation class. + * @param symbolTable where the constants used in this AnnotationWriter must be stored. + * @param typeRef a reference to the annotated type. The sort of this type reference + * must be {@link TypeReference#CLASS_TYPE_PARAMETER}, + * {@link TypeReference#CLASS_TYPE_PARAMETER_BOUND} or + * {@link TypeReference#CLASS_EXTENDS}. See {@link TypeReference}. + * @param typePath the path to the annotated type argument, wildcard bound, array + * element type, or static inner type within 'typeRef'. May be + * {@literal null} if the annotation targets 'typeRef' as a whole. + * @param descriptor the class descriptor of the annotation class. * @param previousAnnotation the previously visited annotation of the - * Runtime[In]Visible[Type]Annotations attribute to which this annotation belongs, or - * {@literal null} in other cases (e.g. nested or array annotations). + * Runtime[In]Visible[Type]Annotations attribute to which this + * annotation belongs, or {@literal null} in other cases (e.g. nested or + * array annotations). * @return a new {@link AnnotationWriter} for the given type annotation reference and descriptor. */ static AnnotationWriter create( @@ -300,8 +306,8 @@ final class AnnotationWriter extends AnnotationVisitor { * * @param attributeName one of "Runtime[In]Visible[Type]Annotations", or {@literal null}. * @return the size in bytes of a Runtime[In]Visible[Type]Annotations attribute containing this - * annotation and all its predecessors. This includes the size of the attribute_name_index and - * attribute_length fields. + * annotation and all its predecessors. This includes the size of the attribute_name_index and + * attribute_length fields. */ int computeAnnotationsSize(final String attributeName) { if (attributeName != null) { @@ -322,21 +328,25 @@ final class AnnotationWriter extends AnnotationVisitor { * annotations and all their predecessors (see {@link #previousAnnotation}. Also adds the * attribute names to the constant pool of the class (if not null). * - * @param lastRuntimeVisibleAnnotation The last runtime visible annotation of a field, method or - * class. The previous ones can be accessed with the {@link #previousAnnotation} field. May be - * {@literal null}. - * @param lastRuntimeInvisibleAnnotation The last runtime invisible annotation of this a field, - * method or class. The previous ones can be accessed with the {@link #previousAnnotation} - * field. May be {@literal null}. - * @param lastRuntimeVisibleTypeAnnotation The last runtime visible type annotation of this a - * field, method or class. The previous ones can be accessed with the {@link - * #previousAnnotation} field. May be {@literal null}. + * @param lastRuntimeVisibleAnnotation The last runtime visible annotation of a field, + * method or class. The previous ones can be accessed + * with the {@link #previousAnnotation} field. May be + * {@literal null}. + * @param lastRuntimeInvisibleAnnotation The last runtime invisible annotation of this a + * field, method or class. The previous ones can be + * accessed with the {@link #previousAnnotation} field. + * May be {@literal null}. + * @param lastRuntimeVisibleTypeAnnotation The last runtime visible type annotation of this a + * field, method or class. The previous ones can be + * accessed with the {@link #previousAnnotation} field. + * May be {@literal null}. * @param lastRuntimeInvisibleTypeAnnotation The last runtime invisible type annotation of a - * field, method or class field. The previous ones can be accessed with the {@link - * #previousAnnotation} field. May be {@literal null}. + * field, method or class field. The previous ones can + * be accessed with the {@link #previousAnnotation} + * field. May be {@literal null}. * @return the size in bytes of a Runtime[In]Visible[Type]Annotations attribute containing the - * given annotations and all their predecessors. This includes the size of the - * attribute_name_index and attribute_length fields. + * given annotations and all their predecessors. This includes the size of the + * attribute_name_index and attribute_length fields. */ static int computeAnnotationsSize( final AnnotationWriter lastRuntimeVisibleAnnotation, @@ -373,8 +383,8 @@ final class AnnotationWriter extends AnnotationVisitor { * put in the same order they have been visited. * * @param attributeNameIndex the constant pool index of the attribute name (one of - * "Runtime[In]Visible[Type]Annotations"). - * @param output where the attribute must be put. + * "Runtime[In]Visible[Type]Annotations"). + * @param output where the attribute must be put. */ void putAnnotations(final int attributeNameIndex, final ByteVector output) { int attributeLength = 2; // For num_annotations. @@ -404,20 +414,25 @@ final class AnnotationWriter extends AnnotationVisitor { * all their predecessors (see {@link #previousAnnotation} in the given ByteVector. * Annotations are put in the same order they have been visited. * - * @param symbolTable where the constants used in the AnnotationWriter instances are stored. - * @param lastRuntimeVisibleAnnotation The last runtime visible annotation of a field, method or - * class. The previous ones can be accessed with the {@link #previousAnnotation} field. May be - * {@literal null}. - * @param lastRuntimeInvisibleAnnotation The last runtime invisible annotation of this a field, - * method or class. The previous ones can be accessed with the {@link #previousAnnotation} - * field. May be {@literal null}. - * @param lastRuntimeVisibleTypeAnnotation The last runtime visible type annotation of this a - * field, method or class. The previous ones can be accessed with the {@link - * #previousAnnotation} field. May be {@literal null}. + * @param symbolTable where the constants used in the AnnotationWriter + * instances are stored. + * @param lastRuntimeVisibleAnnotation The last runtime visible annotation of a field, + * method or class. The previous ones can be accessed + * with the {@link #previousAnnotation} field. May be + * {@literal null}. + * @param lastRuntimeInvisibleAnnotation The last runtime invisible annotation of this a + * field, method or class. The previous ones can be + * accessed with the {@link #previousAnnotation} field. + * May be {@literal null}. + * @param lastRuntimeVisibleTypeAnnotation The last runtime visible type annotation of this a + * field, method or class. The previous ones can be + * accessed with the {@link #previousAnnotation} field. + * May be {@literal null}. * @param lastRuntimeInvisibleTypeAnnotation The last runtime invisible type annotation of a - * field, method or class field. The previous ones can be accessed with the {@link - * #previousAnnotation} field. May be {@literal null}. - * @param output where the attributes must be put. + * field, method or class field. The previous ones can + * be accessed with the {@link #previousAnnotation} + * field. May be {@literal null}. + * @param output where the attributes must be put. */ static void putAnnotations( final SymbolTable symbolTable, @@ -449,14 +464,14 @@ final class AnnotationWriter extends AnnotationVisitor { * annotation lists from the given AnnotationWriter sub-array. Also adds the attribute name to the * constant pool of the class. * - * @param attributeName one of "Runtime[In]VisibleParameterAnnotations". - * @param annotationWriters an array of AnnotationWriter lists (designated by their last - * element). + * @param attributeName one of "Runtime[In]VisibleParameterAnnotations". + * @param annotationWriters an array of AnnotationWriter lists (designated by their + * last element). * @param annotableParameterCount the number of elements in annotationWriters to take into account - * (elements [0..annotableParameterCount[ are taken into account). + * (elements [0..annotableParameterCount[ are taken into account). * @return the size in bytes of a Runtime[In]VisibleParameterAnnotations attribute corresponding - * to the given sub-array of AnnotationWriter lists. This includes the size of the - * attribute_name_index and attribute_length fields. + * to the given sub-array of AnnotationWriter lists. This includes the size of the + * attribute_name_index and attribute_length fields. */ static int computeParameterAnnotationsSize( final String attributeName, @@ -480,13 +495,13 @@ final class AnnotationWriter extends AnnotationVisitor { * Puts a Runtime[In]VisibleParameterAnnotations attribute containing all the annotation lists * from the given AnnotationWriter sub-array in the given ByteVector. * - * @param attributeNameIndex constant pool index of the attribute name (one of - * Runtime[In]VisibleParameterAnnotations). - * @param annotationWriters an array of AnnotationWriter lists (designated by their last - * element). + * @param attributeNameIndex constant pool index of the attribute name (one of + * Runtime[In]VisibleParameterAnnotations). + * @param annotationWriters an array of AnnotationWriter lists (designated by their + * last element). * @param annotableParameterCount the number of elements in annotationWriters to put (elements - * [0..annotableParameterCount[ are put). - * @param output where the attribute must be put. + * [0..annotableParameterCount[ are put). + * @param output where the attribute must be put. */ static void putParameterAnnotations( final int attributeNameIndex, diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Attribute.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Attribute.java index 63c1d21c..7a7cea40 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Attribute.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Attribute.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -7,13 +5,15 @@ package cn.universal.core.engine.asm; * Specification (JVMS). @Author Eric Bruneton @Author Eugene Kuleshov * * @see JVMS - * 4.7 + * 4.7 * @see JVMS - * 4.7.3 + * 4.7.3 */ public class Attribute { - /** The type of this attribute, also called its name in the JVMS. */ + /** + * The type of this attribute, also called its name in the JVMS. + */ public final String type; /** @@ -44,7 +44,8 @@ public class Attribute { * attribute content is read as an opaque byte array, and written back as is. This can lead to * invalid attributes, if the content actually contains constant pool references, labels, or other * symbolic references that need to be updated when there are changes to the constant pool, the - * method bytecode, etc. The default implementation of this method always returns {@literal true}. + * method bytecode, etc. The default implementation of this method always returns + * {@literal true}. * * @return {@literal true} if this type of attribute is unknown. */ @@ -65,7 +66,7 @@ public class Attribute { * Returns the labels corresponding to this attribute. * * @return the labels corresponding to this attribute, or {@literal null} if this attribute is not - * a Code attribute that contains labels. + * a Code attribute that contains labels. */ protected Label[] getLabels() { return new Label[0]; @@ -76,19 +77,21 @@ public class Attribute { * of type {@link #type}, corresponding to the 'length' bytes starting at 'offset', in the given * ClassReader. * - * @param classReader the class that contains the attribute to be read. - * @param offset index of the first byte of the attribute's content in {@link ClassReader}. The 6 - * attribute header bytes (attribute_name_index and attribute_length) are not taken into - * account here. - * @param length the length of the attribute's content (excluding the 6 attribute header bytes). - * @param charBuffer the buffer to be used to call the ClassReader methods requiring a - * 'charBuffer' parameter. + * @param classReader the class that contains the attribute to be read. + * @param offset index of the first byte of the attribute's content in + * {@link ClassReader}. The 6 attribute header bytes + * (attribute_name_index and attribute_length) are not taken into + * account here. + * @param length the length of the attribute's content (excluding the 6 attribute + * header bytes). + * @param charBuffer the buffer to be used to call the ClassReader methods requiring a + * 'charBuffer' parameter. * @param codeAttributeOffset index of the first byte of content of the enclosing Code attribute - * in {@link ClassReader}, or -1 if the attribute to be read is not a Code attribute. The 6 - * attribute header bytes (attribute_name_index and attribute_length) are not taken into - * account here. - * @param labels the labels of the method's code, or {@literal null} if the attribute to be read - * is not a Code attribute. + * in {@link ClassReader}, or -1 if the attribute to be read is not a + * Code attribute. The 6 attribute header bytes (attribute_name_index + * and attribute_length) are not taken into account here. + * @param labels the labels of the method's code, or {@literal null} if the attribute + * to be read is not a Code attribute. * @return a new {@link Attribute} object corresponding to the specified bytes. */ protected Attribute read( @@ -110,17 +113,18 @@ public class Attribute { * ByteVector. * * @param classWriter the class to which this attribute must be added. This parameter can be used - * to add the items that corresponds to this attribute to the constant pool of this class. - * @param code the bytecode of the method corresponding to this Code attribute, or {@literal null} - * if this attribute is not a Code attribute. Corresponds to the 'code' field of the Code - * attribute. - * @param codeLength the length of the bytecode of the method corresponding to this code - * attribute, or 0 if this attribute is not a Code attribute. Corresponds to the 'code_length' - * field of the Code attribute. - * @param maxStack the maximum stack size of the method corresponding to this Code attribute, or - * -1 if this attribute is not a Code attribute. - * @param maxLocals the maximum number of local variables of the method corresponding to this code - * attribute, or -1 if this attribute is not a Code attribute. + * to add the items that corresponds to this attribute to the constant pool of + * this class. + * @param code the bytecode of the method corresponding to this Code attribute, or + * {@literal null} if this attribute is not a Code attribute. Corresponds to + * the 'code' field of the Code attribute. + * @param codeLength the length of the bytecode of the method corresponding to this code + * attribute, or 0 if this attribute is not a Code attribute. Corresponds to + * the 'code_length' field of the Code attribute. + * @param maxStack the maximum stack size of the method corresponding to this Code attribute, + * or -1 if this attribute is not a Code attribute. + * @param maxLocals the maximum number of local variables of the method corresponding to this + * code attribute, or -1 if this attribute is not a Code attribute. * @return the byte array form of this attribute. */ protected ByteVector write( @@ -154,7 +158,7 @@ public class Attribute { * * @param symbolTable where the constants used in the attributes must be stored. * @return the size of all the attributes in this attribute list. This size includes the size of - * the attribute headers. + * the attribute headers. */ final int computeAttributesSize(final SymbolTable symbolTable) { final byte[] code = null; @@ -170,18 +174,18 @@ public class Attribute { * attribute_length) per attribute. Also adds the attribute type names to the constant pool. * * @param symbolTable where the constants used in the attributes must be stored. - * @param code the bytecode of the method corresponding to these Code attributes, or {@literal - * null} if they are not Code attributes. Corresponds to the 'code' field of the Code - * attribute. - * @param codeLength the length of the bytecode of the method corresponding to these code - * attributes, or 0 if they are not Code attributes. Corresponds to the 'code_length' field of - * the Code attribute. - * @param maxStack the maximum stack size of the method corresponding to these Code attributes, or - * -1 if they are not Code attributes. - * @param maxLocals the maximum number of local variables of the method corresponding to these - * Code attributes, or -1 if they are not Code attribute. + * @param code the bytecode of the method corresponding to these Code attributes, or + * {@literal null} if they are not Code attributes. Corresponds to the 'code' + * field of the Code attribute. + * @param codeLength the length of the bytecode of the method corresponding to these code + * attributes, or 0 if they are not Code attributes. Corresponds to the + * 'code_length' field of the Code attribute. + * @param maxStack the maximum stack size of the method corresponding to these Code attributes, + * or -1 if they are not Code attributes. + * @param maxLocals the maximum number of local variables of the method corresponding to these + * Code attributes, or -1 if they are not Code attribute. * @return the size of all the attributes in this attribute list. This size includes the size of - * the attribute headers. + * the attribute headers. */ final int computeAttributesSize( final SymbolTable symbolTable, @@ -206,11 +210,11 @@ public class Attribute { * (attribute_name_index and attribute_length) per attribute. Also adds the attribute type names * to the constant pool. * - * @param symbolTable where the constants used in the attributes must be stored. - * @param accessFlags some field, method or class access flags. + * @param symbolTable where the constants used in the attributes must be stored. + * @param accessFlags some field, method or class access flags. * @param signatureIndex the constant pool index of a field, method of class signature. * @return the size of all the attributes in bytes. This size includes the size of the attribute - * headers. + * headers. */ static int computeAttributesSize( final SymbolTable symbolTable, final int accessFlags, final int signatureIndex) { @@ -242,7 +246,7 @@ public class Attribute { * attribute. * * @param symbolTable where the constants used in the attributes must be stored. - * @param output where the attributes must be written. + * @param output where the attributes must be written. */ final void putAttributes(final SymbolTable symbolTable, final ByteVector output) { final byte[] code = null; @@ -258,17 +262,17 @@ public class Attribute { * attribute. * * @param symbolTable where the constants used in the attributes must be stored. - * @param code the bytecode of the method corresponding to these Code attributes, or {@literal - * null} if they are not Code attributes. Corresponds to the 'code' field of the Code - * attribute. - * @param codeLength the length of the bytecode of the method corresponding to these code - * attributes, or 0 if they are not Code attributes. Corresponds to the 'code_length' field of - * the Code attribute. - * @param maxStack the maximum stack size of the method corresponding to these Code attributes, or - * -1 if they are not Code attributes. - * @param maxLocals the maximum number of local variables of the method corresponding to these - * Code attributes, or -1 if they are not Code attribute. - * @param output where the attributes must be written. + * @param code the bytecode of the method corresponding to these Code attributes, or + * {@literal null} if they are not Code attributes. Corresponds to the 'code' + * field of the Code attribute. + * @param codeLength the length of the bytecode of the method corresponding to these code + * attributes, or 0 if they are not Code attributes. Corresponds to the + * 'code_length' field of the Code attribute. + * @param maxStack the maximum stack size of the method corresponding to these Code attributes, + * or -1 if they are not Code attributes. + * @param maxLocals the maximum number of local variables of the method corresponding to these + * Code attributes, or -1 if they are not Code attribute. + * @param output where the attributes must be written. */ final void putAttributes( final SymbolTable symbolTable, @@ -294,10 +298,10 @@ public class Attribute { * signature, in the given byte vector. This includes the 6 header bytes (attribute_name_index and * attribute_length) per attribute. * - * @param symbolTable where the constants used in the attributes must be stored. - * @param accessFlags some field, method or class access flags. + * @param symbolTable where the constants used in the attributes must be stored. + * @param accessFlags some field, method or class access flags. * @param signatureIndex the constant pool index of a field, method of class signature. - * @param output where the attributes must be written. + * @param output where the attributes must be written. */ static void putAttributes( final SymbolTable symbolTable, @@ -320,7 +324,9 @@ public class Attribute { } } - /** A set of attribute prototypes (attributes with the same type are considered equal). */ + /** + * A set of attribute prototypes (attributes with the same type are considered equal). + */ static final class Set { private static final int SIZE_INCREMENT = 6; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ByteVector.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ByteVector.java index 779d68c2..72dc99f1 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ByteVector.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ByteVector.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -8,13 +6,19 @@ package cn.universal.core.engine.asm; */ public class ByteVector { - /** The content of this vector. Only the first {@link #length} bytes contain real data. */ + /** + * The content of this vector. Only the first {@link #length} bytes contain real data. + */ byte[] data; - /** The actual number of bytes in this vector. */ + /** + * The actual number of bytes in this vector. + */ int length; - /** Constructs a new {@link ByteVector} with a default initial capacity. */ + /** + * Constructs a new {@link ByteVector} with a default initial capacity. + */ public ByteVector() { data = new byte[64]; } @@ -95,7 +99,7 @@ public class ByteVector { * Puts a byte and a short into this byte vector. The byte vector is automatically enlarged if * necessary. * - * @param byteValue a byte. + * @param byteValue a byte. * @param shortValue a short. * @return this byte vector. */ @@ -159,7 +163,7 @@ public class ByteVector { * Puts one byte and two shorts into this byte vector. The byte vector is automatically enlarged * if necessary. * - * @param byteValue a byte. + * @param byteValue a byte. * @param shortValue1 a short. * @param shortValue2 another short. * @return this byte vector. @@ -247,11 +251,11 @@ public class ByteVector { * necessary. The string length is encoded in two bytes before the encoded characters, if there is * space for that (i.e. if this.length - offset - 2 >= 0). * - * @param stringValue the String to encode. - * @param offset the index of the first character to encode. The previous characters are supposed - * to have already been encoded, using only one byte per character. + * @param stringValue the String to encode. + * @param offset the index of the first character to encode. The previous characters are + * supposed to have already been encoded, using only one byte per character. * @param maxByteLength the maximum byte length of the encoded string, including the already - * encoded characters. + * encoded characters. * @return this byte vector. */ final ByteVector encodeUtf8(final String stringValue, final int offset, final int maxByteLength) { @@ -302,9 +306,9 @@ public class ByteVector { * necessary. * * @param byteArrayValue an array of bytes. May be {@literal null} to put {@code byteLength} null - * bytes into this byte vector. - * @param byteOffset index of the first byte of byteArrayValue that must be copied. - * @param byteLength number of bytes of byteArrayValue that must be copied. + * bytes into this byte vector. + * @param byteOffset index of the first byte of byteArrayValue that must be copied. + * @param byteLength number of bytes of byteArrayValue that must be copied. * @return this byte vector. */ public ByteVector putByteArray( diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassReader.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassReader.java index 94b85013..fa39fa6e 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassReader.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassReader.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; import java.io.ByteArrayOutputStream; @@ -25,9 +23,9 @@ public class ClassReader { /** * A flag to skip the SourceFile, SourceDebugExtension, LocalVariableTable, * LocalVariableTypeTable, LineNumberTable and MethodParameters attributes. If this flag is set - * these attributes are neither parsed nor visited (i.e. {@link ClassVisitor#visitSource}, {@link - * MethodVisitor#visitLocalVariable}, {@link MethodVisitor#visitLineNumber} and {@link - * MethodVisitor#visitParameter} are not called). + * these attributes are neither parsed nor visited (i.e. {@link ClassVisitor#visitSource}, + * {@link MethodVisitor#visitLocalVariable}, {@link MethodVisitor#visitLineNumber} and + * {@link MethodVisitor#visitParameter} are not called). */ public static final int SKIP_DEBUG = 2; @@ -61,23 +59,29 @@ public class ClassReader { */ static final int EXPAND_ASM_INSNS = 256; - /** The maximum size of array to allocate. */ + /** + * The maximum size of array to allocate. + */ private static final int MAX_BUFFER_SIZE = 1024 * 1024; - /** The size of the temporary byte array used to read class input streams chunk by chunk. */ + /** + * The size of the temporary byte array used to read class input streams chunk by chunk. + */ private static final int INPUT_STREAM_DATA_CHUNK_SIZE = 4096; /** * A byte array containing the JVMS ClassFile structure to be parsed. * * @deprecated Use {@link #readByte(int)} and the other read methods instead. This field will - * eventually be deleted. + * eventually be deleted. */ @Deprecated // DontCheck(MemberName): can't be renamed (for backward binary compatibility). public final byte[] b; - /** The offset in bytes of the ClassFile's access_flags field. */ + /** + * The offset in bytes of the ClassFile's access_flags field. + */ public final int header; /** @@ -116,7 +120,7 @@ public class ClassReader { * (in the BootstrapMethods attribute). * * @see JVMS - * 4.7.23 + * 4.7.23 */ private final int[] bootstrapMethodOffsets; @@ -157,8 +161,9 @@ public class ClassReader { * Constructs a new {@link ClassReader} object. This internal constructor must not be exposed * as a public API. * - * @param classFileBuffer a byte array containing the JVMS ClassFile structure to be read. - * @param classFileOffset the offset in byteBuffer of the first byte of the ClassFile to be read. + * @param classFileBuffer a byte array containing the JVMS ClassFile structure to be read. + * @param classFileOffset the offset in byteBuffer of the first byte of the ClassFile to be + * read. * @param checkClassVersion whether to check the class version or not. */ ClassReader( @@ -252,8 +257,8 @@ public class ClassReader { * Constructs a new {@link ClassReader} object. * * @param inputStream an input stream of the JVMS ClassFile structure to be read. This input - * stream must contain nothing more than the ClassFile structure itself. It is read from its - * current position to its end. + * stream must contain nothing more than the ClassFile structure itself. It is + * read from its current position to its end. * @throws IOException if a problem occurs during reading. */ public ClassReader(final InputStream inputStream) throws IOException { @@ -264,7 +269,8 @@ public class ClassReader { * Constructs a new {@link ClassReader} object. * * @param className the fully qualified name of the class to be read. The ClassFile structure is - * retrieved with the current class loader's {@link ClassLoader#getSystemResourceAsStream}. + * retrieved with the current class loader's + * {@link ClassLoader#getSystemResourceAsStream}. * @throws IOException if an exception occurs during reading. */ public ClassReader(final String className) throws IOException { @@ -277,7 +283,7 @@ public class ClassReader { * Reads the given input stream and returns its content as a byte array. * * @param inputStream an input stream. - * @param close true to close the input stream after reading. + * @param close true to close the input stream after reading. * @return the content of the given input stream. * @throws IOException if a problem occurs during reading. */ @@ -363,7 +369,7 @@ public class ClassReader { * Returns the internal names of the implemented interfaces (see {@link Type#getInternalName()}). * * @return the internal names of the directly implemented interfaces. Inherited implemented - * interfaces are not returned. + * interfaces are not returned. * @see ClassVisitor#visit(int, int, String, String, String, String[]) */ public String[] getInterfaces() { @@ -389,9 +395,10 @@ public class ClassReader { * Makes the given visitor visit the JVMS ClassFile structure passed to the constructor of this * {@link ClassReader}. * - * @param classVisitor the visitor that must visit this class. - * @param parsingOptions the options to use to parse this class. One or more of {@link - * #SKIP_CODE}, {@link #SKIP_DEBUG}, {@link #SKIP_FRAMES} or {@link #EXPAND_FRAMES}. + * @param classVisitor the visitor that must visit this class. + * @param parsingOptions the options to use to parse this class. One or more of + * {@link #SKIP_CODE}, {@link #SKIP_DEBUG}, {@link #SKIP_FRAMES} or + * {@link #EXPAND_FRAMES}. */ public void accept(final ClassVisitor classVisitor, final int parsingOptions) { accept(classVisitor, new Attribute[0], parsingOptions); @@ -401,15 +408,17 @@ public class ClassReader { * Makes the given visitor visit the JVMS ClassFile structure passed to the constructor of this * {@link ClassReader}. * - * @param classVisitor the visitor that must visit this class. + * @param classVisitor the visitor that must visit this class. * @param attributePrototypes prototypes of the attributes that must be parsed during the visit of - * the class. Any attribute whose type is not equal to the type of one the prototypes will not - * be parsed: its byte array value will be passed unchanged to the ClassWriter. This may - * corrupt it if this value contains references to the constant pool, or has syntactic or - * semantic links with a class element that has been transformed by a class adapter between - * the reader and the writer. - * @param parsingOptions the options to use to parse this class. One or more of {@link - * #SKIP_CODE}, {@link #SKIP_DEBUG}, {@link #SKIP_FRAMES} or {@link #EXPAND_FRAMES}. + * the class. Any attribute whose type is not equal to the type of one + * the prototypes will not be parsed: its byte array value will be + * passed unchanged to the ClassWriter. This may corrupt it if this + * value contains references to the constant pool, or has syntactic or + * semantic links with a class element that has been transformed by a + * class adapter between the reader and the writer. + * @param parsingOptions the options to use to parse this class. One or more of + * {@link #SKIP_CODE}, {@link #SKIP_DEBUG}, {@link #SKIP_FRAMES} or + * {@link #EXPAND_FRAMES}. */ public void accept( final ClassVisitor classVisitor, @@ -728,14 +737,15 @@ public class ClassReader { /** * Reads the Module, ModulePackages and ModuleMainClass attributes and visit them. * - * @param classVisitor the current class visitor - * @param context information about the class being parsed. - * @param moduleOffset the offset of the Module attribute (excluding the attribute_info's - * attribute_name_index and attribute_length fields). + * @param classVisitor the current class visitor + * @param context information about the class being parsed. + * @param moduleOffset the offset of the Module attribute (excluding the attribute_info's + * attribute_name_index and attribute_length fields). * @param modulePackagesOffset the offset of the ModulePackages attribute (excluding the - * attribute_info's attribute_name_index and attribute_length fields), or 0. - * @param moduleMainClass the string corresponding to the ModuleMainClass attribute, or {@literal - * null}. + * attribute_info's attribute_name_index and attribute_length fields), + * or 0. + * @param moduleMainClass the string corresponding to the ModuleMainClass attribute, or + * {@literal null}. */ private void readModuleAttributes( final ClassVisitor classVisitor, @@ -855,8 +865,8 @@ public class ClassReader { /** * Reads a record component and visit it. * - * @param classVisitor the current class visitor - * @param context information about the class being parsed. + * @param classVisitor the current class visitor + * @param context information about the class being parsed. * @param recordComponentOffset the offset of the current record component. * @return the offset of the first byte following the record component. */ @@ -1029,8 +1039,8 @@ public class ClassReader { /** * Reads a JVMS field_info structure and makes the given visitor visit it. * - * @param classVisitor the visitor that must visit the field. - * @param context information about the class being parsed. + * @param classVisitor the visitor that must visit the field. + * @param context information about the class being parsed. * @param fieldInfoOffset the start offset of the field_info structure. * @return the offset of the first byte following the field_info structure. */ @@ -1213,8 +1223,8 @@ public class ClassReader { /** * Reads a JVMS method_info structure and makes the given visitor visit it. * - * @param classVisitor the visitor that must visit the method. - * @param context information about the class being parsed. + * @param classVisitor the visitor that must visit the method. + * @param context information about the class being parsed. * @param methodInfoOffset the start offset of the method_info structure. * @return the offset of the first byte following the method_info structure. */ @@ -1497,9 +1507,9 @@ public class ClassReader { * Reads a JVMS 'Code' attribute and makes the given visitor visit it. * * @param methodVisitor the visitor that must visit the Code attribute. - * @param context information about the class being parsed. - * @param codeOffset the start offset in {@link #classFileBuffer} of the Code attribute, excluding - * its attribute_name_index and attribute_length fields. + * @param context information about the class being parsed. + * @param codeOffset the start offset in {@link #classFileBuffer} of the Code attribute, + * excluding its attribute_name_index and attribute_length fields. */ private void readCode( final MethodVisitor methodVisitor, final Context context, final int codeOffset) { @@ -1976,7 +1986,7 @@ public class ClassReader { if (potentialBytecodeOffset >= 0 && potentialBytecodeOffset < codeLength && (classBuffer[bytecodeStartOffset + potentialBytecodeOffset] & 0xFF) - == Opcodes.NEW) { + == Opcodes.NEW) { createLabel(potentialBytecodeOffset, labels); } } @@ -2030,7 +2040,7 @@ public class ClassReader { // Visit the stack map frame for this bytecode offset, if any. while (stackMapFrameOffset != 0 && (context.currentFrameOffset == currentBytecodeOffset - || context.currentFrameOffset == -1)) { + || context.currentFrameOffset == -1)) { // If there is a stack map frame for this offset, make methodVisitor visit it, and read the // next stack map frame if there is one. if (context.currentFrameOffset != -1) { @@ -2277,37 +2287,36 @@ public class ClassReader { case Constants.ASM_GOTO: case Constants.ASM_JSR: case Constants.ASM_IFNULL: - case Constants.ASM_IFNONNULL: - { - // A forward jump with an offset > 32767. In this case we automatically replace ASM_GOTO - // with GOTO_W, ASM_JSR with JSR_W and ASM_IFxxx with IFNOTxxx GOTO_W L:..., - // where IFNOTxxx is the "opposite" opcode of ASMS_IFxxx (e.g. IFNE for ASM_IFEQ) and - // where designates the instruction just after the GOTO_W. - // First, change the ASM specific opcodes ASM_IFEQ ... ASM_JSR, ASM_IFNULL and - // ASM_IFNONNULL to IFEQ ... JSR, IFNULL and IFNONNULL. - opcode = - opcode < Constants.ASM_IFNULL - ? opcode - Constants.ASM_OPCODE_DELTA - : opcode - Constants.ASM_IFNULL_OPCODE_DELTA; - Label target = labels[currentBytecodeOffset + readUnsignedShort(currentOffset + 1)]; - if (opcode == Opcodes.GOTO || opcode == Opcodes.JSR) { - // Replace GOTO with GOTO_W and JSR with JSR_W. - methodVisitor.visitJumpInsn(opcode + Constants.WIDE_JUMP_OPCODE_DELTA, target); - } else { - // Compute the "opposite" of opcode. This can be done by flipping the least - // significant bit for IFNULL and IFNONNULL, and similarly for IFEQ ... IF_ACMPEQ - // (with a pre and post offset by 1). - opcode = opcode < Opcodes.GOTO ? ((opcode + 1) ^ 1) - 1 : opcode ^ 1; - Label endif = createLabel(currentBytecodeOffset + 3, labels); - methodVisitor.visitJumpInsn(opcode, endif); - methodVisitor.visitJumpInsn(Constants.GOTO_W, target); - // endif designates the instruction just after GOTO_W, and is visited as part of the - // next instruction. Since it is a jump target, we need to insert a frame here. - insertFrame = true; - } - currentOffset += 3; - break; + case Constants.ASM_IFNONNULL: { + // A forward jump with an offset > 32767. In this case we automatically replace ASM_GOTO + // with GOTO_W, ASM_JSR with JSR_W and ASM_IFxxx with IFNOTxxx GOTO_W L:..., + // where IFNOTxxx is the "opposite" opcode of ASMS_IFxxx (e.g. IFNE for ASM_IFEQ) and + // where designates the instruction just after the GOTO_W. + // First, change the ASM specific opcodes ASM_IFEQ ... ASM_JSR, ASM_IFNULL and + // ASM_IFNONNULL to IFEQ ... JSR, IFNULL and IFNONNULL. + opcode = + opcode < Constants.ASM_IFNULL + ? opcode - Constants.ASM_OPCODE_DELTA + : opcode - Constants.ASM_IFNULL_OPCODE_DELTA; + Label target = labels[currentBytecodeOffset + readUnsignedShort(currentOffset + 1)]; + if (opcode == Opcodes.GOTO || opcode == Opcodes.JSR) { + // Replace GOTO with GOTO_W and JSR with JSR_W. + methodVisitor.visitJumpInsn(opcode + Constants.WIDE_JUMP_OPCODE_DELTA, target); + } else { + // Compute the "opposite" of opcode. This can be done by flipping the least + // significant bit for IFNULL and IFNONNULL, and similarly for IFEQ ... IF_ACMPEQ + // (with a pre and post offset by 1). + opcode = opcode < Opcodes.GOTO ? ((opcode + 1) ^ 1) - 1 : opcode ^ 1; + Label endif = createLabel(currentBytecodeOffset + 3, labels); + methodVisitor.visitJumpInsn(opcode, endif); + methodVisitor.visitJumpInsn(Constants.GOTO_W, target); + // endif designates the instruction just after GOTO_W, and is visited as part of the + // next instruction. Since it is a jump target, we need to insert a frame here. + insertFrame = true; } + currentOffset += 3; + break; + } case Constants.ASM_GOTO_W: // Replace ASM_GOTO_W with GOTO_W. methodVisitor.visitJumpInsn( @@ -2329,41 +2338,39 @@ public class ClassReader { currentOffset += 4; } break; - case Opcodes.TABLESWITCH: - { - // Skip 0 to 3 padding bytes. - currentOffset += 4 - (currentBytecodeOffset & 3); - // Read the instruction. - Label defaultLabel = labels[currentBytecodeOffset + readInt(currentOffset)]; - int low = readInt(currentOffset + 4); - int high = readInt(currentOffset + 8); - currentOffset += 12; - Label[] table = new Label[high - low + 1]; - for (int i = 0; i < table.length; ++i) { - table[i] = labels[currentBytecodeOffset + readInt(currentOffset)]; - currentOffset += 4; - } - methodVisitor.visitTableSwitchInsn(low, high, defaultLabel, table); - break; + case Opcodes.TABLESWITCH: { + // Skip 0 to 3 padding bytes. + currentOffset += 4 - (currentBytecodeOffset & 3); + // Read the instruction. + Label defaultLabel = labels[currentBytecodeOffset + readInt(currentOffset)]; + int low = readInt(currentOffset + 4); + int high = readInt(currentOffset + 8); + currentOffset += 12; + Label[] table = new Label[high - low + 1]; + for (int i = 0; i < table.length; ++i) { + table[i] = labels[currentBytecodeOffset + readInt(currentOffset)]; + currentOffset += 4; } - case Opcodes.LOOKUPSWITCH: - { - // Skip 0 to 3 padding bytes. - currentOffset += 4 - (currentBytecodeOffset & 3); - // Read the instruction. - Label defaultLabel = labels[currentBytecodeOffset + readInt(currentOffset)]; - int numPairs = readInt(currentOffset + 4); + methodVisitor.visitTableSwitchInsn(low, high, defaultLabel, table); + break; + } + case Opcodes.LOOKUPSWITCH: { + // Skip 0 to 3 padding bytes. + currentOffset += 4 - (currentBytecodeOffset & 3); + // Read the instruction. + Label defaultLabel = labels[currentBytecodeOffset + readInt(currentOffset)]; + int numPairs = readInt(currentOffset + 4); + currentOffset += 8; + int[] keys = new int[numPairs]; + Label[] values = new Label[numPairs]; + for (int i = 0; i < numPairs; ++i) { + keys[i] = readInt(currentOffset); + values[i] = labels[currentBytecodeOffset + readInt(currentOffset + 4)]; currentOffset += 8; - int[] keys = new int[numPairs]; - Label[] values = new Label[numPairs]; - for (int i = 0; i < numPairs; ++i) { - keys[i] = readInt(currentOffset); - values[i] = labels[currentBytecodeOffset + readInt(currentOffset + 4)]; - currentOffset += 8; - } - methodVisitor.visitLookupSwitchInsn(defaultLabel, keys, values); - break; } + methodVisitor.visitLookupSwitchInsn(defaultLabel, keys, values); + break; + } case Opcodes.ILOAD: case Opcodes.LLOAD: case Opcodes.FLOAD: @@ -2403,49 +2410,47 @@ public class ClassReader { case Opcodes.INVOKEVIRTUAL: case Opcodes.INVOKESPECIAL: case Opcodes.INVOKESTATIC: - case Opcodes.INVOKEINTERFACE: - { - int cpInfoOffset = cpInfoOffsets[readUnsignedShort(currentOffset + 1)]; - int nameAndTypeCpInfoOffset = cpInfoOffsets[readUnsignedShort(cpInfoOffset + 2)]; - String owner = readClass(cpInfoOffset, charBuffer); - String name = readUTF8(nameAndTypeCpInfoOffset, charBuffer); - String descriptor = readUTF8(nameAndTypeCpInfoOffset + 2, charBuffer); - if (opcode < Opcodes.INVOKEVIRTUAL) { - methodVisitor.visitFieldInsn(opcode, owner, name, descriptor); - } else { - boolean isInterface = - classBuffer[cpInfoOffset - 1] == Symbol.CONSTANT_INTERFACE_METHODREF_TAG; - methodVisitor.visitMethodInsn(opcode, owner, name, descriptor, isInterface); - } - if (opcode == Opcodes.INVOKEINTERFACE) { - currentOffset += 5; - } else { - currentOffset += 3; - } - break; + case Opcodes.INVOKEINTERFACE: { + int cpInfoOffset = cpInfoOffsets[readUnsignedShort(currentOffset + 1)]; + int nameAndTypeCpInfoOffset = cpInfoOffsets[readUnsignedShort(cpInfoOffset + 2)]; + String owner = readClass(cpInfoOffset, charBuffer); + String name = readUTF8(nameAndTypeCpInfoOffset, charBuffer); + String descriptor = readUTF8(nameAndTypeCpInfoOffset + 2, charBuffer); + if (opcode < Opcodes.INVOKEVIRTUAL) { + methodVisitor.visitFieldInsn(opcode, owner, name, descriptor); + } else { + boolean isInterface = + classBuffer[cpInfoOffset - 1] == Symbol.CONSTANT_INTERFACE_METHODREF_TAG; + methodVisitor.visitMethodInsn(opcode, owner, name, descriptor, isInterface); } - case Opcodes.INVOKEDYNAMIC: - { - int cpInfoOffset = cpInfoOffsets[readUnsignedShort(currentOffset + 1)]; - int nameAndTypeCpInfoOffset = cpInfoOffsets[readUnsignedShort(cpInfoOffset + 2)]; - String name = readUTF8(nameAndTypeCpInfoOffset, charBuffer); - String descriptor = readUTF8(nameAndTypeCpInfoOffset + 2, charBuffer); - int bootstrapMethodOffset = bootstrapMethodOffsets[readUnsignedShort(cpInfoOffset)]; - Handle handle = - (Handle) readConst(readUnsignedShort(bootstrapMethodOffset), charBuffer); - Object[] bootstrapMethodArguments = - new Object[readUnsignedShort(bootstrapMethodOffset + 2)]; - bootstrapMethodOffset += 4; - for (int i = 0; i < bootstrapMethodArguments.length; i++) { - bootstrapMethodArguments[i] = - readConst(readUnsignedShort(bootstrapMethodOffset), charBuffer); - bootstrapMethodOffset += 2; - } - methodVisitor.visitInvokeDynamicInsn( - name, descriptor, handle, bootstrapMethodArguments); + if (opcode == Opcodes.INVOKEINTERFACE) { currentOffset += 5; - break; + } else { + currentOffset += 3; } + break; + } + case Opcodes.INVOKEDYNAMIC: { + int cpInfoOffset = cpInfoOffsets[readUnsignedShort(currentOffset + 1)]; + int nameAndTypeCpInfoOffset = cpInfoOffsets[readUnsignedShort(cpInfoOffset + 2)]; + String name = readUTF8(nameAndTypeCpInfoOffset, charBuffer); + String descriptor = readUTF8(nameAndTypeCpInfoOffset + 2, charBuffer); + int bootstrapMethodOffset = bootstrapMethodOffsets[readUnsignedShort(cpInfoOffset)]; + Handle handle = + (Handle) readConst(readUnsignedShort(bootstrapMethodOffset), charBuffer); + Object[] bootstrapMethodArguments = + new Object[readUnsignedShort(bootstrapMethodOffset + 2)]; + bootstrapMethodOffset += 4; + for (int i = 0; i < bootstrapMethodArguments.length; i++) { + bootstrapMethodArguments[i] = + readConst(readUnsignedShort(bootstrapMethodOffset), charBuffer); + bootstrapMethodOffset += 2; + } + methodVisitor.visitInvokeDynamicInsn( + name, descriptor, handle, bootstrapMethodArguments); + currentOffset += 5; + break; + } case Opcodes.NEW: case Opcodes.ANEWARRAY: case Opcodes.CHECKCAST: @@ -2640,9 +2645,9 @@ public class ClassReader { * this method creates a label for the given offset if it has not been already created. * * @param bytecodeOffset a bytecode offset in a method. - * @param labels the already created labels, indexed by their offset. If a label already exists - * for bytecodeOffset this method must not create a new one. Otherwise it must store the new - * label in this array. + * @param labels the already created labels, indexed by their offset. If a label already + * exists for bytecodeOffset this method must not create a new one. + * Otherwise it must store the new label in this array. * @return a non null Label, which must be equal to labels[bytecodeOffset]. */ protected Label readLabel(final int bytecodeOffset, final Label[] labels) { @@ -2654,11 +2659,11 @@ public class ClassReader { /** * Creates a label without the {@link Label#FLAG_DEBUG_ONLY} flag set, for the given bytecode - * offset. The label is created with a call to {@link #readLabel} and its {@link - * Label#FLAG_DEBUG_ONLY} flag is cleared. + * offset. The label is created with a call to {@link #readLabel} and its + * {@link Label#FLAG_DEBUG_ONLY} flag is cleared. * * @param bytecodeOffset a bytecode offset in a method. - * @param labels the already created labels, indexed by their offset. + * @param labels the already created labels, indexed by their offset. * @return a Label without the {@link Label#FLAG_DEBUG_ONLY} flag set. */ private Label createLabel(final int bytecodeOffset, final Label[] labels) { @@ -2673,7 +2678,7 @@ public class ClassReader { * with a call to {@link #readLabel}. * * @param bytecodeOffset a bytecode offset in a method. - * @param labels the already created labels, indexed by their offset. + * @param labels the already created labels, indexed by their offset. */ private void createDebugLabel(final int bytecodeOffset, final Label[] labels) { if (labels[bytecodeOffset] == null) { @@ -2690,14 +2695,17 @@ public class ClassReader { * entry it contains, to find the corresponding labels, and to visit the try catch block * annotations. * - * @param methodVisitor the method visitor to be used to visit the try catch block annotations. - * @param context information about the class being parsed. + * @param methodVisitor the method visitor to be used to visit the try catch block + * annotations. + * @param context information about the class being parsed. * @param runtimeTypeAnnotationsOffset the start offset of a Runtime[In]VisibleTypeAnnotations - * attribute, excluding the attribute_info's attribute_name_index and attribute_length fields. - * @param visible true if the attribute to parse is a RuntimeVisibleTypeAnnotations attribute, - * false it is a RuntimeInvisibleTypeAnnotations attribute. + * attribute, excluding the attribute_info's + * attribute_name_index and attribute_length fields. + * @param visible true if the attribute to parse is a + * RuntimeVisibleTypeAnnotations attribute, false it is a + * RuntimeInvisibleTypeAnnotations attribute. * @return the start offset of each entry of the Runtime[In]VisibleTypeAnnotations_attribute's - * 'annotations' array field. + * 'annotations' array field. */ private int[] readTypeAnnotations( final MethodVisitor methodVisitor, @@ -2797,10 +2805,10 @@ public class ClassReader { * -1 if there is no such type_annotation of if it does not have a bytecode offset. * * @param typeAnnotationOffsets the offset of each 'type_annotation' entry in a - * Runtime[In]VisibleTypeAnnotations attribute, or {@literal null}. - * @param typeAnnotationIndex the index a 'type_annotation' entry in typeAnnotationOffsets. + * Runtime[In]VisibleTypeAnnotations attribute, or {@literal null}. + * @param typeAnnotationIndex the index a 'type_annotation' entry in typeAnnotationOffsets. * @return bytecode offset corresponding to the specified JVMS 'type_annotation' structure, or -1 - * if there is no such type_annotation of if it does not have a bytecode offset. + * if there is no such type_annotation of if it does not have a bytecode offset. */ private int getTypeAnnotationBytecodeOffset( final int[] typeAnnotationOffsets, final int typeAnnotationIndex) { @@ -2817,8 +2825,8 @@ public class ClassReader { * and target_path (the result is stored in the given context), and returns the start offset of * the rest of the type_annotation structure. * - * @param context information about the class being parsed. This is where the extracted - * target_type and target_path must be stored. + * @param context information about the class being parsed. This is where the + * extracted target_type and target_path must be stored. * @param typeAnnotationOffset the start offset of a type_annotation structure. * @return the start offset of the rest of the type_annotation structure. */ @@ -2897,13 +2905,16 @@ public class ClassReader { /** * Reads a Runtime[In]VisibleParameterAnnotations attribute and makes the given visitor visit it. * - * @param methodVisitor the visitor that must visit the parameter annotations. - * @param context information about the class being parsed. + * @param methodVisitor the visitor that must visit the parameter + * annotations. + * @param context information about the class being parsed. * @param runtimeParameterAnnotationsOffset the start offset of a - * Runtime[In]VisibleParameterAnnotations attribute, excluding the attribute_info's - * attribute_name_index and attribute_length fields. - * @param visible true if the attribute to parse is a RuntimeVisibleParameterAnnotations - * attribute, false it is a RuntimeInvisibleParameterAnnotations attribute. + * Runtime[In]VisibleParameterAnnotations attribute, + * excluding the attribute_info's attribute_name_index + * and attribute_length fields. + * @param visible true if the attribute to parse is a + * RuntimeVisibleParameterAnnotations attribute, false it + * is a RuntimeInvisibleParameterAnnotations attribute. */ private void readParameterAnnotations( final MethodVisitor methodVisitor, @@ -2938,12 +2949,12 @@ public class ClassReader { * annotation's 'element_value'. * * @param annotationVisitor the visitor that must visit the values. - * @param annotationOffset the start offset of an 'annotation' structure (excluding its type_index - * field) or of an 'array_value' structure. - * @param named if the annotation values are named or not. This should be true to parse the values - * of a JVMS 'annotation' structure, and false to parse the JVMS 'array_value' of an - * annotation's element_value. - * @param charBuffer the buffer used to read strings in the constant pool. + * @param annotationOffset the start offset of an 'annotation' structure (excluding its + * type_index field) or of an 'array_value' structure. + * @param named if the annotation values are named or not. This should be true to + * parse the values of a JVMS 'annotation' structure, and false to parse + * the JVMS 'array_value' of an annotation's element_value. + * @param charBuffer the buffer used to read strings in the constant pool. * @return the end offset of the JVMS 'annotation' or 'array_value' structure. */ private int readElementValues( @@ -2978,11 +2989,12 @@ public class ClassReader { /** * Reads a JVMS 'element_value' structure and makes the given visitor visit it. * - * @param annotationVisitor the visitor that must visit the element_value structure. + * @param annotationVisitor the visitor that must visit the element_value structure. * @param elementValueOffset the start offset in {@link #classFileBuffer} of the element_value - * structure to be read. - * @param elementName the name of the element_value structure to be read, or {@literal null}. - * @param charBuffer the buffer used to read strings in the constant pool. + * structure to be read. + * @param elementName the name of the element_value structure to be read, or + * {@literal null}. + * @param charBuffer the buffer used to read strings in the constant pool. * @return the end offset of the JVMS 'element_value' structure. */ private int readElementValue( @@ -3232,12 +3244,13 @@ public class ClassReader { * field (this is used to parse the legacy StackMap attributes). * * @param stackMapFrameOffset the start offset in {@link #classFileBuffer} of the - * stack_map_frame_value structure to be read, or the start offset of a full_frame structure - * (excluding its frame_type field). - * @param compressed true to read a 'stack_map_frame' structure, false to read a 'full_frame' - * structure without its frame_type field. - * @param expand if the stack map frame must be expanded. See {@link #EXPAND_FRAMES}. - * @param context where the parsed stack map frame must be stored. + * stack_map_frame_value structure to be read, or the start offset of a + * full_frame structure (excluding its frame_type field). + * @param compressed true to read a 'stack_map_frame' structure, false to read a + * 'full_frame' structure without its frame_type field. + * @param expand if the stack map frame must be expanded. See + * {@link #EXPAND_FRAMES}. + * @param context where the parsed stack map frame must be stored. * @return the end offset of the JVMS 'stack_map_frame' or 'full_frame' structure. */ private int readStackMapFrame( @@ -3330,13 +3343,14 @@ public class ClassReader { * array. * * @param verificationTypeInfoOffset the start offset of the 'verification_type_info' structure to - * read. - * @param frame the array where the parsed type must be stored. - * @param index the index in 'frame' where the parsed type must be stored. - * @param charBuffer the buffer used to read strings in the constant pool. - * @param labels the labels of the method currently being parsed, indexed by their offset. If the - * parsed type is an ITEM_Uninitialized, a new label for the corresponding NEW instruction is - * stored in this array if it does not already exist. + * read. + * @param frame the array where the parsed type must be stored. + * @param index the index in 'frame' where the parsed type must be stored. + * @param charBuffer the buffer used to read strings in the constant pool. + * @param labels the labels of the method currently being parsed, indexed by + * their offset. If the parsed type is an ITEM_Uninitialized, a + * new label for the corresponding NEW instruction is stored in + * this array if it does not already exist. * @return the end offset of the JVMS 'verification_type_info' structure. */ private int readVerificationTypeInfo( @@ -3392,7 +3406,7 @@ public class ClassReader { * field entry. * * @return the offset in {@link #classFileBuffer} of the first ClassFile's 'attributes' array - * field entry. + * field entry. */ final int getFirstAttributeOffset() { // Skip the access_flags, this_class, super_class, and interfaces_count fields (using 2 bytes @@ -3438,7 +3452,7 @@ public class ClassReader { * Reads the BootstrapMethods attribute to compute the offset of each bootstrap method. * * @param maxStringLength a conservative estimate of the maximum length of the strings contained - * in the constant pool of the class. + * in the constant pool of the class. * @return the offsets of the bootstrap methods. */ private int[] readBootstrapMethodsAttribute(final int maxStringLength) { @@ -3472,20 +3486,23 @@ public class ClassReader { * Reads a non standard JVMS 'attribute' structure in {@link #classFileBuffer}. * * @param attributePrototypes prototypes of the attributes that must be parsed during the visit of - * the class. Any attribute whose type is not equal to the type of one the prototypes will not - * be parsed: its byte array value will be passed unchanged to the ClassWriter. - * @param type the type of the attribute. - * @param offset the start offset of the JVMS 'attribute' structure in {@link #classFileBuffer}. - * The 6 attribute header bytes (attribute_name_index and attribute_length) are not taken into - * account here. - * @param length the length of the attribute's content (excluding the 6 attribute header bytes). - * @param charBuffer the buffer to be used to read strings in the constant pool. - * @param codeAttributeOffset the start offset of the enclosing Code attribute in {@link - * #classFileBuffer}, or -1 if the attribute to be read is not a code attribute. The 6 - * attribute header bytes (attribute_name_index and attribute_length) are not taken into - * account here. - * @param labels the labels of the method's code, or {@literal null} if the attribute to be read - * is not a code attribute. + * the class. Any attribute whose type is not equal to the type of one + * the prototypes will not be parsed: its byte array value will be + * passed unchanged to the ClassWriter. + * @param type the type of the attribute. + * @param offset the start offset of the JVMS 'attribute' structure in + * {@link #classFileBuffer}. The 6 attribute header bytes + * (attribute_name_index and attribute_length) are not taken into + * account here. + * @param length the length of the attribute's content (excluding the 6 attribute + * header bytes). + * @param charBuffer the buffer to be used to read strings in the constant pool. + * @param codeAttributeOffset the start offset of the enclosing Code attribute in + * {@link #classFileBuffer}, or -1 if the attribute to be read is not a + * code attribute. The 6 attribute header bytes (attribute_name_index + * and attribute_length) are not taken into account here. + * @param labels the labels of the method's code, or {@literal null} if the attribute + * to be read is not a code attribute. * @return the attribute that has been read. */ private Attribute readAttribute( @@ -3524,9 +3541,9 @@ public class ClassReader { * and is normally not needed by class generators or adapters. * * @param constantPoolEntryIndex the index a constant pool entry in the class's constant pool - * table. + * table. * @return the start offset in this {@link ClassReader} of the corresponding JVMS 'cp_info' - * structure, plus one. + * structure, plus one. */ public int getItem(final int constantPoolEntryIndex) { return cpInfoOffsets[constantPoolEntryIndex]; @@ -3537,15 +3554,15 @@ public class ClassReader { * constant pool table. * * @return a conservative estimate of the maximum length of the strings contained in the class's - * constant pool table. + * constant pool table. */ public int getMaxStringLength() { return maxStringLength; } /** - * Reads a byte value in this {@link ClassReader}. This method is intended for {@link - * Attribute} sub classes, and is normally not needed by class generators or adapters. + * Reads a byte value in this {@link ClassReader}. This method is intended for + * {@link Attribute} sub classes, and is normally not needed by class generators or adapters. * * @param offset the start offset of the value to be read in this {@link ClassReader}. * @return the read value. @@ -3567,8 +3584,8 @@ public class ClassReader { } /** - * Reads a signed short value in this {@link ClassReader}. This method is intended for {@link - * Attribute} sub classes, and is normally not needed by class generators or adapters. + * Reads a signed short value in this {@link ClassReader}. This method is intended for + * {@link Attribute} sub classes, and is normally not needed by class generators or adapters. * * @param offset the start offset of the value to be read in this {@link ClassReader}. * @return the read value. @@ -3579,8 +3596,8 @@ public class ClassReader { } /** - * Reads a signed int value in this {@link ClassReader}. This method is intended for {@link - * Attribute} sub classes, and is normally not needed by class generators or adapters. + * Reads a signed int value in this {@link ClassReader}. This method is intended for + * {@link Attribute} sub classes, and is normally not needed by class generators or adapters. * * @param offset the start offset of the value to be read in this {@link ClassReader}. * @return the read value. @@ -3594,8 +3611,8 @@ public class ClassReader { } /** - * Reads a signed long value in this {@link ClassReader}. This method is intended for {@link - * Attribute} sub classes, and is normally not needed by class generators or adapters. + * Reads a signed long value in this {@link ClassReader}. This method is intended for + * {@link Attribute} sub classes, and is normally not needed by class generators or adapters. * * @param offset the start offset of the value to be read in this {@link ClassReader}. * @return the read value. @@ -3611,10 +3628,11 @@ public class ClassReader { * intended for {@link Attribute} sub classes, and is normally not needed by class generators or * adapters. * - * @param offset the start offset of an unsigned short value in this {@link ClassReader}, whose - * value is the index of a CONSTANT_Utf8 entry in the class's constant pool table. + * @param offset the start offset of an unsigned short value in this {@link ClassReader}, + * whose value is the index of a CONSTANT_Utf8 entry in the class's constant + * pool table. * @param charBuffer the buffer to be used to read the string. This buffer must be sufficiently - * large. It is not automatically resized. + * large. It is not automatically resized. * @return the String corresponding to the specified CONSTANT_Utf8 entry. */ // DontCheck(AbbreviationAsWordInName): can't be renamed (for backward binary compatibility). @@ -3630,9 +3648,9 @@ public class ClassReader { * Reads a CONSTANT_Utf8 constant pool entry in {@link #classFileBuffer}. * * @param constantPoolEntryIndex the index of a CONSTANT_Utf8 entry in the class's constant pool - * table. - * @param charBuffer the buffer to be used to read the string. This buffer must be sufficiently - * large. It is not automatically resized. + * table. + * @param charBuffer the buffer to be used to read the string. This buffer must be + * sufficiently large. It is not automatically resized. * @return the String corresponding to the specified CONSTANT_Utf8 entry. */ final String readUtf(final int constantPoolEntryIndex, final char[] charBuffer) { @@ -3648,10 +3666,10 @@ public class ClassReader { /** * Reads an UTF8 string in {@link #classFileBuffer}. * - * @param utfOffset the start offset of the UTF8 string to be read. - * @param utfLength the length of the UTF8 string to be read. + * @param utfOffset the start offset of the UTF8 string to be read. + * @param utfLength the length of the UTF8 string to be read. * @param charBuffer the buffer to be used to read the string. This buffer must be sufficiently - * large. It is not automatically resized. + * large. It is not automatically resized. * @return the String corresponding to the specified UTF8 string. */ private String readUtf(final int utfOffset, final int utfLength, final char[] charBuffer) { @@ -3683,11 +3701,12 @@ public class ClassReader { * for {@link Attribute} sub classes, and is normally not needed by class generators or * adapters. * - * @param offset the start offset of an unsigned short value in {@link #classFileBuffer}, whose - * value is the index of a CONSTANT_Class, CONSTANT_String, CONSTANT_MethodType, - * CONSTANT_Module or CONSTANT_Package entry in class's constant pool table. + * @param offset the start offset of an unsigned short value in {@link #classFileBuffer}, + * whose value is the index of a CONSTANT_Class, CONSTANT_String, + * CONSTANT_MethodType, CONSTANT_Module or CONSTANT_Package entry in class's + * constant pool table. * @param charBuffer the buffer to be used to read the item. This buffer must be sufficiently - * large. It is not automatically resized. + * large. It is not automatically resized. * @return the String corresponding to the specified constant pool entry. */ private String readStringish(final int offset, final char[] charBuffer) { @@ -3701,10 +3720,11 @@ public class ClassReader { * intended for {@link Attribute} sub classes, and is normally not needed by class generators or * adapters. * - * @param offset the start offset of an unsigned short value in this {@link ClassReader}, whose - * value is the index of a CONSTANT_Class entry in class's constant pool table. + * @param offset the start offset of an unsigned short value in this {@link ClassReader}, + * whose value is the index of a CONSTANT_Class entry in class's constant pool + * table. * @param charBuffer the buffer to be used to read the item. This buffer must be sufficiently - * large. It is not automatically resized. + * large. It is not automatically resized. * @return the String corresponding to the specified CONSTANT_Class entry. */ public String readClass(final int offset, final char[] charBuffer) { @@ -3716,10 +3736,11 @@ public class ClassReader { * intended for {@link Attribute} sub classes, and is normally not needed by class generators or * adapters. * - * @param offset the start offset of an unsigned short value in this {@link ClassReader}, whose - * value is the index of a CONSTANT_Module entry in class's constant pool table. + * @param offset the start offset of an unsigned short value in this {@link ClassReader}, + * whose value is the index of a CONSTANT_Module entry in class's constant pool + * table. * @param charBuffer the buffer to be used to read the item. This buffer must be sufficiently - * large. It is not automatically resized. + * large. It is not automatically resized. * @return the String corresponding to the specified CONSTANT_Module entry. */ public String readModule(final int offset, final char[] charBuffer) { @@ -3731,10 +3752,11 @@ public class ClassReader { * intended for {@link Attribute} sub classes, and is normally not needed by class generators or * adapters. * - * @param offset the start offset of an unsigned short value in this {@link ClassReader}, whose - * value is the index of a CONSTANT_Package entry in class's constant pool table. + * @param offset the start offset of an unsigned short value in this {@link ClassReader}, + * whose value is the index of a CONSTANT_Package entry in class's constant pool + * table. * @param charBuffer the buffer to be used to read the item. This buffer must be sufficiently - * large. It is not automatically resized. + * large. It is not automatically resized. * @return the String corresponding to the specified CONSTANT_Package entry. */ public String readPackage(final int offset, final char[] charBuffer) { @@ -3745,9 +3767,9 @@ public class ClassReader { * Reads a CONSTANT_Dynamic constant pool entry in {@link #classFileBuffer}. * * @param constantPoolEntryIndex the index of a CONSTANT_Dynamic entry in the class's constant - * pool table. - * @param charBuffer the buffer to be used to read the string. This buffer must be sufficiently - * large. It is not automatically resized. + * pool table. + * @param charBuffer the buffer to be used to read the string. This buffer must be + * sufficiently large. It is not automatically resized. * @return the ConstantDynamic corresponding to the specified CONSTANT_Dynamic entry. */ private ConstantDynamic readConstantDynamic( @@ -3778,13 +3800,14 @@ public class ClassReader { * adapters. * * @param constantPoolEntryIndex the index of a CONSTANT_Integer, CONSTANT_Float, CONSTANT_Long, - * CONSTANT_Double, CONSTANT_Class, CONSTANT_String, CONSTANT_MethodType, - * CONSTANT_MethodHandle or CONSTANT_Dynamic entry in the class's constant pool. - * @param charBuffer the buffer to be used to read strings. This buffer must be sufficiently - * large. It is not automatically resized. + * CONSTANT_Double, CONSTANT_Class, CONSTANT_String, + * CONSTANT_MethodType, CONSTANT_MethodHandle or CONSTANT_Dynamic + * entry in the class's constant pool. + * @param charBuffer the buffer to be used to read strings. This buffer must be + * sufficiently large. It is not automatically resized. * @return the {@link Integer}, {@link Float}, {@link Long}, {@link Double}, {@link String}, - * {@link Type}, {@link Handle} or {@link ConstantDynamic} corresponding to the specified - * constant pool entry. + * {@link Type}, {@link Handle} or {@link ConstantDynamic} corresponding to the specified constant + * pool entry. */ public Object readConst(final int constantPoolEntryIndex, final char[] charBuffer) { int cpInfoOffset = cpInfoOffsets[constantPoolEntryIndex]; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassTooLargeException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassTooLargeException.java index 4bbfbabc..98380323 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassTooLargeException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassTooLargeException.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -16,7 +14,7 @@ public final class ClassTooLargeException extends IndexOutOfBoundsException { /** * Constructs a new {@link ClassTooLargeException}. * - * @param className the internal name of the class. + * @param className the internal name of the class. * @param constantPoolCount the number of constant pool items of the class. */ public ClassTooLargeException(final String className, final int constantPoolCount) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassVisitor.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassVisitor.java index 7809beb7..236b137f 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassVisitor.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassVisitor.java @@ -1,31 +1,32 @@ - - package cn.universal.core.engine.asm; /** * A visitor to visit a Java class. The methods of this class must be called in the following order: - * {@code visit} [ {@code visitSource} ] [ {@code visitModule} ][ {@code visitNestHost} ][ {@code - * visitOuterClass} ] ( {@code visitAnnotation} | {@code visitTypeAnnotation} | {@code - * visitAttribute} )* ( {@code visitNestMember} | [ {@code * visitPermittedSubclass} ] | {@code - * visitInnerClass} | {@code visitRecordComponent} | {@code visitField} | {@code visitMethod} )* - * {@code visitEnd}. @Author Eric Bruneton + * {@code visit} [ {@code visitSource} ] [ {@code visitModule} ][ {@code visitNestHost} ][ + * {@code visitOuterClass} ] ( {@code visitAnnotation} | {@code visitTypeAnnotation} | + * {@code visitAttribute} )* ( {@code visitNestMember} | [ {@code * visitPermittedSubclass} ] | + * {@code visitInnerClass} | {@code visitRecordComponent} | {@code visitField} | {@code visitMethod} + * )* {@code visitEnd}. @Author Eric Bruneton */ public abstract class ClassVisitor { /** - * The ASM API version implemented by this visitor. The value of this field must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. + * The ASM API version implemented by this visitor. The value of this field must be one of + * {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ protected final int api; - /** The class visitor to which this visitor must delegate method calls. May be {@literal null}. */ + /** + * The class visitor to which this visitor must delegate method calls. May be {@literal null}. + */ protected ClassVisitor cv; /** * Constructs a new {@link ClassVisitor}. * - * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. + * @param api the ASM API version implemented by this visitor. Must be one of + * {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or + * {@link Opcodes#ASM7}. */ public ClassVisitor(final int api) { this(api, null); @@ -34,11 +35,11 @@ public abstract class ClassVisitor { /** * Constructs a new {@link ClassVisitor}. * - * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link - * Opcodes#ASM8} or {@link Opcodes#ASM9}. + * @param api the ASM API version implemented by this visitor. Must be one of + * {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, + * {@link Opcodes#ASM7}, {@link Opcodes#ASM8} or {@link Opcodes#ASM9}. * @param classVisitor the class visitor to which this visitor must delegate method calls. May be - * null. + * null. */ public ClassVisitor(final int api, final ClassVisitor classVisitor) { if (api != Opcodes.ASM9 @@ -60,19 +61,19 @@ public abstract class ClassVisitor { /** * Visits the header of the class. * - * @param version the class version. The minor version is stored in the 16 most significant bits, - * and the major version in the 16 least significant bits. - * @param access the class's access flags (see {@link Opcodes}). This parameter also indicates if - * the class is deprecated {@link Opcodes#ACC_DEPRECATED} or a record {@link - * Opcodes#ACC_RECORD}. - * @param name the internal name of the class (see {@link Type#getInternalName()}). - * @param signature the signature of this class. May be {@literal null} if the class is not a - * generic one, and does not extend or implement generic classes or interfaces. - * @param superName the internal of name of the super class (see {@link Type#getInternalName()}). - * For interfaces, the super class is {@link Object}. May be {@literal null}, but only for the - * {@link Object} class. - * @param interfaces the internal names of the class's interfaces (see {@link - * Type#getInternalName()}). May be {@literal null}. + * @param version the class version. The minor version is stored in the 16 most significant + * bits, and the major version in the 16 least significant bits. + * @param access the class's access flags (see {@link Opcodes}). This parameter also indicates + * if the class is deprecated {@link Opcodes#ACC_DEPRECATED} or a record + * {@link Opcodes#ACC_RECORD}. + * @param name the internal name of the class (see {@link Type#getInternalName()}). + * @param signature the signature of this class. May be {@literal null} if the class is not a + * generic one, and does not extend or implement generic classes or interfaces. + * @param superName the internal of name of the super class (see {@link Type#getInternalName()}). + * For interfaces, the super class is {@link Object}. May be {@literal null}, + * but only for the {@link Object} class. + * @param interfaces the internal names of the class's interfaces (see + * {@link Type#getInternalName()}). May be {@literal null}. */ public void visit( final int version, @@ -92,10 +93,10 @@ public abstract class ClassVisitor { /** * Visits the source of the class. * - * @param source the name of the source file from which the class was compiled. May be {@literal - * null}. - * @param debug additional debug information to compute the correspondence between source and - * compiled elements of the class. May be {@literal null}. + * @param source the name of the source file from which the class was compiled. May be + * {@literal null}. + * @param debug additional debug information to compute the correspondence between source and + * compiled elements of the class. May be {@literal null}. */ public void visitSource(final String source, final String debug) { if (cv != null) { @@ -106,12 +107,12 @@ public abstract class ClassVisitor { /** * Visit the module corresponding to the class. * - * @param name the fully qualified name (using dots) of the module. - * @param access the module access flags, among {@code ACC_OPEN}, {@code ACC_SYNTHETIC} and {@code - * ACC_MANDATED}. + * @param name the fully qualified name (using dots) of the module. + * @param access the module access flags, among {@code ACC_OPEN}, {@code ACC_SYNTHETIC} and + * {@code ACC_MANDATED}. * @param version the module version, or {@literal null}. * @return a visitor to visit the module values, or {@literal null} if this visitor is not - * interested in visiting this module. + * interested in visiting this module. */ public ModuleVisitor visitModule(final String name, final int access, final String version) { if (api < Opcodes.ASM6) { @@ -146,11 +147,11 @@ public abstract class ClassVisitor { * Visits the enclosing class of the class. This method must be called only if the class has an * enclosing class. * - * @param owner internal name of the enclosing class of the class. - * @param name the name of the method that contains the class, or {@literal null} if the class is - * not enclosed in a method of its enclosing class. + * @param owner internal name of the enclosing class of the class. + * @param name the name of the method that contains the class, or {@literal null} if the + * class is not enclosed in a method of its enclosing class. * @param descriptor the descriptor of the method that contains the class, or {@literal null} if - * the class is not enclosed in a method of its enclosing class. + * the class is not enclosed in a method of its enclosing class. */ public void visitOuterClass(final String owner, final String name, final String descriptor) { if (cv != null) { @@ -162,9 +163,9 @@ public abstract class ClassVisitor { * Visits an annotation of the class. * * @param descriptor the class descriptor of the annotation class. - * @param visible {@literal true} if the annotation is visible at runtime. + * @param visible {@literal true} if the annotation is visible at runtime. * @return a visitor to visit the annotation values, or {@literal null} if this visitor is not - * interested in visiting this annotation. + * interested in visiting this annotation. */ public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) { if (cv != null) { @@ -176,17 +177,17 @@ public abstract class ClassVisitor { /** * Visits an annotation on a type in the class signature. * - * @param typeRef a reference to the annotated type. The sort of this type reference must be - * {@link TypeReference#CLASS_TYPE_PARAMETER}, {@link - * TypeReference#CLASS_TYPE_PARAMETER_BOUND} or {@link TypeReference#CLASS_EXTENDS}. See - * {@link TypeReference}. - * @param typePath the path to the annotated type argument, wildcard bound, array element type, or - * static inner type within 'typeRef'. May be {@literal null} if the annotation targets - * 'typeRef' as a whole. + * @param typeRef a reference to the annotated type. The sort of this type reference must be + * {@link TypeReference#CLASS_TYPE_PARAMETER}, + * {@link TypeReference#CLASS_TYPE_PARAMETER_BOUND} or + * {@link TypeReference#CLASS_EXTENDS}. See {@link TypeReference}. + * @param typePath the path to the annotated type argument, wildcard bound, array element type, + * or static inner type within 'typeRef'. May be {@literal null} if the + * annotation targets 'typeRef' as a whole. * @param descriptor the class descriptor of the annotation class. - * @param visible {@literal true} if the annotation is visible at runtime. + * @param visible {@literal true} if the annotation is visible at runtime. * @return a visitor to visit the annotation values, or {@literal null} if this visitor is not - * interested in visiting this annotation. + * interested in visiting this annotation. */ public AnnotationVisitor visitTypeAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { @@ -247,13 +248,14 @@ public abstract class ClassVisitor { * Visits information about an inner class. This inner class is not necessarily a member of the * class being visited. * - * @param name the internal name of an inner class (see {@link Type#getInternalName()}). - * @param outerName the internal name of the class to which the inner class belongs (see {@link - * Type#getInternalName()}). May be {@literal null} for not member classes. + * @param name the internal name of an inner class (see {@link Type#getInternalName()}). + * @param outerName the internal name of the class to which the inner class belongs (see + * {@link Type#getInternalName()}). May be {@literal null} for not member + * classes. * @param innerName the (simple) name of the inner class inside its enclosing class. May be - * {@literal null} for anonymous inner classes. - * @param access the access flags of the inner class as originally declared in the enclosing - * class. + * {@literal null} for anonymous inner classes. + * @param access the access flags of the inner class as originally declared in the enclosing + * class. */ public void visitInnerClass( final String name, final String outerName, final String innerName, final int access) { @@ -265,12 +267,12 @@ public abstract class ClassVisitor { /** * Visits a record component of the class. * - * @param name the record component name. + * @param name the record component name. * @param descriptor the record component descriptor (see {@link Type}). - * @param signature the record component signature. May be {@literal null} if the record component - * type does not use generic types. + * @param signature the record component signature. May be {@literal null} if the record + * component type does not use generic types. * @return a visitor to visit this record component annotations and attributes, or {@literal null} - * if this class visitor is not interested in visiting these annotations and attributes. + * if this class visitor is not interested in visiting these annotations and attributes. */ public RecordComponentVisitor visitRecordComponent( final String name, final String descriptor, final String signature) { @@ -286,20 +288,21 @@ public abstract class ClassVisitor { /** * Visits a field of the class. * - * @param access the field's access flags (see {@link Opcodes}). This parameter also indicates if - * the field is synthetic and/or deprecated. - * @param name the field's name. + * @param access the field's access flags (see {@link Opcodes}). This parameter also indicates + * if the field is synthetic and/or deprecated. + * @param name the field's name. * @param descriptor the field's descriptor (see {@link Type}). - * @param signature the field's signature. May be {@literal null} if the field's type does not use - * generic types. - * @param value the field's initial value. This parameter, which may be {@literal null} if the - * field does not have an initial value, must be an {@link Integer}, a {@link Float}, a {@link - * Long}, a {@link Double} or a {@link String} (for {@code int}, {@code float}, {@code long} - * or {@code String} fields respectively). This parameter is only used for static - * fields. Its value is ignored for non static fields, which must be initialized through - * bytecode instructions in constructors or methods. + * @param signature the field's signature. May be {@literal null} if the field's type does not + * use generic types. + * @param value the field's initial value. This parameter, which may be {@literal null} if + * the field does not have an initial value, must be an {@link Integer}, a + * {@link Float}, a {@link Long}, a {@link Double} or a {@link String} (for + * {@code int}, {@code float}, {@code long} or {@code String} fields + * respectively). This parameter is only used for static fields. Its + * value is ignored for non static fields, which must be initialized through + * bytecode instructions in constructors or methods. * @return a visitor to visit field annotations and attributes, or {@literal null} if this class - * visitor is not interested in visiting these annotations and attributes. + * visitor is not interested in visiting these annotations and attributes. */ public FieldVisitor visitField( final int access, @@ -318,16 +321,16 @@ public abstract class ClassVisitor { * instance (or {@literal null}) each time it is called, i.e., it should not return a previously * returned visitor. * - * @param access the method's access flags (see {@link Opcodes}). This parameter also indicates if - * the method is synthetic and/or deprecated. - * @param name the method's name. + * @param access the method's access flags (see {@link Opcodes}). This parameter also + * indicates if the method is synthetic and/or deprecated. + * @param name the method's name. * @param descriptor the method's descriptor (see {@link Type}). - * @param signature the method's signature. May be {@literal null} if the method parameters, - * return type and exceptions do not use generic types. - * @param exceptions the internal names of the method's exception classes (see {@link - * Type#getInternalName()}). May be {@literal null}. + * @param signature the method's signature. May be {@literal null} if the method parameters, + * return type and exceptions do not use generic types. + * @param exceptions the internal names of the method's exception classes (see + * {@link Type#getInternalName()}). May be {@literal null}. * @return an object to visit the byte code of the method, or {@literal null} if this class - * visitor is not interested in visiting the code of this method. + * visitor is not interested in visiting the code of this method. */ public MethodVisitor visitMethod( final int access, diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassWriter.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassWriter.java index 12d379e7..e0017b83 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassWriter.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ClassWriter.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -14,12 +12,13 @@ public class ClassWriter extends ClassVisitor { /** * A flag to automatically compute the maximum stack size and the maximum number of local - * variables of methods. If this flag is set, then the arguments of the {@link - * MethodVisitor#visitMaxs} method of the {@link MethodVisitor} returned by the {@link - * #visitMethod} method will be ignored, and computed automatically from the signature and the - * bytecode of each method. + * variables of methods. If this flag is set, then the arguments of the + * {@link MethodVisitor#visitMaxs} method of the {@link MethodVisitor} returned by the + * {@link #visitMethod} method will be ignored, and computed automatically from the signature and + * the bytecode of each method. * - *

Note: for classes whose version is {@link Opcodes#V1_7} of more, this option requires + *

Note: for classes whose version is {@link Opcodes#V1_7} of more, this option + * requires * valid stack map frames. The maximum stack size is then computed from these frames, and from the * bytecode instructions in between. If stack map frames are not present or must be recomputed, * used {@link #COMPUTE_FRAMES} instead. @@ -31,9 +30,9 @@ public class ClassWriter extends ClassVisitor { /** * A flag to automatically compute the stack map frames of methods from scratch. If this flag is * set, then the calls to the {@link MethodVisitor#visitFrame} method are ignored, and the stack - * map frames are recomputed from the methods bytecode. The arguments of the {@link - * MethodVisitor#visitMaxs} method are also ignored and recomputed from the bytecode. In other - * words, {@link #COMPUTE_FRAMES} implies {@link #COMPUTE_MAXS}. + * map frames are recomputed from the methods bytecode. The arguments of the + * {@link MethodVisitor#visitMaxs} method are also ignored and recomputed from the bytecode. In + * other words, {@link #COMPUTE_FRAMES} implies {@link #COMPUTE_MAXS}. * * @see #ClassWriter(int) */ @@ -48,7 +47,9 @@ public class ClassWriter extends ClassVisitor { */ private int version; - /** The symbol table for this class (contains the constant_pool and the BootstrapMethods). */ + /** + * The symbol table for this class (contains the constant_pool and the BootstrapMethods). + */ private final SymbolTable symbolTable; /** @@ -58,16 +59,24 @@ public class ClassWriter extends ClassVisitor { */ private int accessFlags; - /** The this_class field of the JVMS ClassFile structure. */ + /** + * The this_class field of the JVMS ClassFile structure. + */ private int thisClass; - /** The super_class field of the JVMS ClassFile structure. */ + /** + * The super_class field of the JVMS ClassFile structure. + */ private int superClass; - /** The interface_count field of the JVMS ClassFile structure. */ + /** + * The interface_count field of the JVMS ClassFile structure. + */ private int interfaceCount; - /** The 'interfaces' array of the JVMS ClassFile structure. */ + /** + * The 'interfaces' array of the JVMS ClassFile structure. + */ private int[] interfaces; /** @@ -94,25 +103,39 @@ public class ClassWriter extends ClassVisitor { */ private MethodWriter lastMethod; - /** The number_of_classes field of the InnerClasses attribute, or 0. */ + /** + * The number_of_classes field of the InnerClasses attribute, or 0. + */ private int numberOfInnerClasses; - /** The 'classes' array of the InnerClasses attribute, or {@literal null}. */ + /** + * The 'classes' array of the InnerClasses attribute, or {@literal null}. + */ private ByteVector innerClasses; - /** The class_index field of the EnclosingMethod attribute, or 0. */ + /** + * The class_index field of the EnclosingMethod attribute, or 0. + */ private int enclosingClassIndex; - /** The method_index field of the EnclosingMethod attribute. */ + /** + * The method_index field of the EnclosingMethod attribute. + */ private int enclosingMethodIndex; - /** The signature_index field of the Signature attribute, or 0. */ + /** + * The signature_index field of the Signature attribute, or 0. + */ private int signatureIndex; - /** The source_file_index field of the SourceFile attribute, or 0. */ + /** + * The source_file_index field of the SourceFile attribute, or 0. + */ private int sourceFileIndex; - /** The debug_extension field of the SourceDebugExtension attribute, or {@literal null}. */ + /** + * The debug_extension field of the SourceDebugExtension attribute, or {@literal null}. + */ private ByteVector debugExtension; /** @@ -139,22 +162,34 @@ public class ClassWriter extends ClassVisitor { */ private AnnotationWriter lastRuntimeInvisibleTypeAnnotation; - /** The Module attribute of this class, or {@literal null}. */ + /** + * The Module attribute of this class, or {@literal null}. + */ private ModuleWriter moduleWriter; - /** The host_class_index field of the NestHost attribute, or 0. */ + /** + * The host_class_index field of the NestHost attribute, or 0. + */ private int nestHostClassIndex; - /** The number_of_classes field of the NestMembers attribute, or 0. */ + /** + * The number_of_classes field of the NestMembers attribute, or 0. + */ private int numberOfNestMemberClasses; - /** The 'classes' array of the NestMembers attribute, or {@literal null}. */ + /** + * The 'classes' array of the NestMembers attribute, or {@literal null}. + */ private ByteVector nestMemberClasses; - /** The number_of_classes field of the PermittedSubclasses attribute, or 0. */ + /** + * The number_of_classes field of the PermittedSubclasses attribute, or 0. + */ private int numberOfPermittedSubclasses; - /** The 'classes' array of the PermittedSubclasses attribute, or {@literal null}. */ + /** + * The 'classes' array of the PermittedSubclasses attribute, or {@literal null}. + */ private ByteVector permittedSubclasses; /** @@ -172,20 +207,20 @@ public class ClassWriter extends ClassVisitor { private RecordComponentWriter lastRecordComponent; /** - * The first non standard attribute of this class. The next ones can be accessed with the {@link - * Attribute#nextAttribute} field. May be {@literal null}. + * The first non standard attribute of this class. The next ones can be accessed with the + * {@link Attribute#nextAttribute} field. May be {@literal null}. * *

WARNING: this list stores the attributes in the reverse order of their visit. - * firstAttribute is actually the last attribute visited in {@link #visitAttribute}. The {@link - * #toByteArray} method writes the attributes in the order defined by this list, i.e. in the - * reverse order specified by the user. + * firstAttribute is actually the last attribute visited in {@link #visitAttribute}. The + * {@link #toByteArray} method writes the attributes in the order defined by this list, i.e. in + * the reverse order specified by the user. */ private Attribute firstAttribute; /** - * Indicates what must be automatically computed in {@link MethodWriter}. Must be one of {@link - * MethodWriter#COMPUTE_NOTHING}, {@link MethodWriter#COMPUTE_MAX_STACK_AND_LOCAL}, {@link - * MethodWriter#COMPUTE_INSERTED_FRAMES}, or {@link MethodWriter#COMPUTE_ALL_FRAMES}. + * Indicates what must be automatically computed in {@link MethodWriter}. Must be one of + * {@link MethodWriter#COMPUTE_NOTHING}, {@link MethodWriter#COMPUTE_MAX_STACK_AND_LOCAL}, + * {@link MethodWriter#COMPUTE_INSERTED_FRAMES}, or {@link MethodWriter#COMPUTE_ALL_FRAMES}. */ private int compute; @@ -197,7 +232,7 @@ public class ClassWriter extends ClassVisitor { * Constructs a new {@link ClassWriter} object. * * @param flags option flags that can be used to modify the default behavior of this class. Must - * be zero or more of {@link #COMPUTE_MAXS} and {@link #COMPUTE_FRAMES}. + * be zero or more of {@link #COMPUTE_MAXS} and {@link #COMPUTE_FRAMES}. */ public ClassWriter(final int flags) { this(null, flags); @@ -220,12 +255,13 @@ public class ClassWriter extends ClassVisitor { * * * @param classReader the {@link ClassReader} used to read the original class. It will be used to - * copy the entire constant pool and bootstrap methods from the original class and also to - * copy other fragments of original bytecode where applicable. - * @param flags option flags that can be used to modify the default behavior of this class.Must be - * zero or more of {@link #COMPUTE_MAXS} and {@link #COMPUTE_FRAMES}. These option flags do - * not affect methods that are copied as is in the new class. This means that neither the - * maximum stack size nor the stack frames will be computed for these methods. + * copy the entire constant pool and bootstrap methods from the original class + * and also to copy other fragments of original bytecode where applicable. + * @param flags option flags that can be used to modify the default behavior of this + * class.Must be zero or more of {@link #COMPUTE_MAXS} and + * {@link #COMPUTE_FRAMES}. These option flags do not affect methods that + * are copied as is in the new class. This means that neither the maximum stack + * size nor the stack frames will be computed for these methods. */ public ClassWriter(final ClassReader classReader, final int flags) { super(/* latest api = */ Opcodes.ASM9); @@ -440,7 +476,7 @@ public class ClassWriter extends ClassVisitor { * Returns the content of the class file that was built by this ClassWriter. * * @return the binary content of the JVMS ClassFile structure that was built by this ClassWriter. - * @throws ClassTooLargeException if the constant pool of the class is too large. + * @throws ClassTooLargeException if the constant pool of the class is too large. * @throws MethodTooLargeException if the Code attribute of a method is too large. */ public byte[] toByteArray() { @@ -700,10 +736,10 @@ public class ClassWriter extends ClassVisitor { * with standard ones. This is done with a ClassReader -> ClassWriter round trip. * * @param classFile a class file containing ASM specific instructions, generated by this - * ClassWriter. + * ClassWriter. * @param hasFrames whether there is at least one stack map frames in 'classFile'. * @return an equivalent of 'classFile', with the ASM specific instructions replaced with standard - * ones. + * ones. */ private byte[] replaceAsmInstructions(final byte[] classFile, final boolean hasFrames) { final Attribute[] attributes = getAttributePrototypes(); @@ -765,11 +801,12 @@ public class ClassWriter extends ClassVisitor { /** * Adds a number or string constant to the constant pool of the class being build. Does nothing if - * the constant pool already contains a similar item. This method is intended for {@link - * Attribute} sub classes, and is normally not needed by class generators or adapters. + * the constant pool already contains a similar item. This method is intended for + * {@link Attribute} sub classes, and is normally not needed by class generators or adapters. * * @param value the value of the constant to be added to the constant pool. This parameter must be - * an {@link Integer}, a {@link Float}, a {@link Long}, a {@link Double} or a {@link String}. + * an {@link Integer}, a {@link Float}, a {@link Long}, a {@link Double} or a + * {@link String}. * @return the index of a new or already existing constant item with the given value. */ public int newConst(final Object value) { @@ -842,16 +879,17 @@ public class ClassWriter extends ClassVisitor { * already contains a similar item. This method is intended for {@link Attribute} sub classes, * and is normally not needed by class generators or adapters. * - * @param tag the kind of this handle. Must be {@link Opcodes#H_GETFIELD}, {@link - * Opcodes#H_GETSTATIC}, {@link Opcodes#H_PUTFIELD}, {@link Opcodes#H_PUTSTATIC}, {@link - * Opcodes#H_INVOKEVIRTUAL}, {@link Opcodes#H_INVOKESTATIC}, {@link Opcodes#H_INVOKESPECIAL}, - * {@link Opcodes#H_NEWINVOKESPECIAL} or {@link Opcodes#H_INVOKEINTERFACE}. - * @param owner the internal name of the field or method owner class. - * @param name the name of the field or method. + * @param tag the kind of this handle. Must be {@link Opcodes#H_GETFIELD}, + * {@link Opcodes#H_GETSTATIC}, {@link Opcodes#H_PUTFIELD}, + * {@link Opcodes#H_PUTSTATIC}, {@link Opcodes#H_INVOKEVIRTUAL}, + * {@link Opcodes#H_INVOKESTATIC}, {@link Opcodes#H_INVOKESPECIAL}, + * {@link Opcodes#H_NEWINVOKESPECIAL} or {@link Opcodes#H_INVOKEINTERFACE}. + * @param owner the internal name of the field or method owner class. + * @param name the name of the field or method. * @param descriptor the descriptor of the field or method. * @return the index of a new or already existing method type reference item. - * @deprecated this method is superseded by {@link #newHandle(int, String, String, String, - * boolean)}. + * @deprecated this method is superseded by + * {@link #newHandle(int, String, String, String, boolean)}. */ @Deprecated public int newHandle( @@ -864,13 +902,14 @@ public class ClassWriter extends ClassVisitor { * already contains a similar item. This method is intended for {@link Attribute} sub classes, * and is normally not needed by class generators or adapters. * - * @param tag the kind of this handle. Must be {@link Opcodes#H_GETFIELD}, {@link - * Opcodes#H_GETSTATIC}, {@link Opcodes#H_PUTFIELD}, {@link Opcodes#H_PUTSTATIC}, {@link - * Opcodes#H_INVOKEVIRTUAL}, {@link Opcodes#H_INVOKESTATIC}, {@link Opcodes#H_INVOKESPECIAL}, - * {@link Opcodes#H_NEWINVOKESPECIAL} or {@link Opcodes#H_INVOKEINTERFACE}. - * @param owner the internal name of the field or method owner class. - * @param name the name of the field or method. - * @param descriptor the descriptor of the field or method. + * @param tag the kind of this handle. Must be {@link Opcodes#H_GETFIELD}, + * {@link Opcodes#H_GETSTATIC}, {@link Opcodes#H_PUTFIELD}, + * {@link Opcodes#H_PUTSTATIC}, {@link Opcodes#H_INVOKEVIRTUAL}, + * {@link Opcodes#H_INVOKESTATIC}, {@link Opcodes#H_INVOKESPECIAL}, + * {@link Opcodes#H_NEWINVOKESPECIAL} or {@link Opcodes#H_INVOKEINTERFACE}. + * @param owner the internal name of the field or method owner class. + * @param name the name of the field or method. + * @param descriptor the descriptor of the field or method. * @param isInterface true if the owner is an processer. * @return the index of a new or already existing method type reference item. */ @@ -885,12 +924,12 @@ public class ClassWriter extends ClassVisitor { /** * Adds a dynamic constant reference to the constant pool of the class being build. Does nothing - * if the constant pool already contains a similar item. This method is intended for {@link - * Attribute} sub classes, and is normally not needed by class generators or adapters. + * if the constant pool already contains a similar item. This method is intended for + * {@link Attribute} sub classes, and is normally not needed by class generators or adapters. * - * @param name name of the invoked method. - * @param descriptor field descriptor of the constant type. - * @param bootstrapMethodHandle the bootstrap method. + * @param name name of the invoked method. + * @param descriptor field descriptor of the constant type. + * @param bootstrapMethodHandle the bootstrap method. * @param bootstrapMethodArguments the bootstrap method constant arguments. * @return the index of a new or already existing dynamic constant reference item. */ @@ -900,18 +939,18 @@ public class ClassWriter extends ClassVisitor { final Handle bootstrapMethodHandle, final Object... bootstrapMethodArguments) { return symbolTable.addConstantDynamic( - name, descriptor, bootstrapMethodHandle, bootstrapMethodArguments) + name, descriptor, bootstrapMethodHandle, bootstrapMethodArguments) .index; } /** * Adds an invokedynamic reference to the constant pool of the class being build. Does nothing if - * the constant pool already contains a similar item. This method is intended for {@link - * Attribute} sub classes, and is normally not needed by class generators or adapters. + * the constant pool already contains a similar item. This method is intended for + * {@link Attribute} sub classes, and is normally not needed by class generators or adapters. * - * @param name name of the invoked method. - * @param descriptor descriptor of the invoke method. - * @param bootstrapMethodHandle the bootstrap method. + * @param name name of the invoked method. + * @param descriptor descriptor of the invoke method. + * @param bootstrapMethodHandle the bootstrap method. * @param bootstrapMethodArguments the bootstrap method constant arguments. * @return the index of a new or already existing invokedynamic reference item. */ @@ -921,7 +960,7 @@ public class ClassWriter extends ClassVisitor { final Handle bootstrapMethodHandle, final Object... bootstrapMethodArguments) { return symbolTable.addConstantInvokeDynamic( - name, descriptor, bootstrapMethodHandle, bootstrapMethodArguments) + name, descriptor, bootstrapMethodHandle, bootstrapMethodArguments) .index; } @@ -930,8 +969,8 @@ public class ClassWriter extends ClassVisitor { * constant pool already contains a similar item. This method is intended for {@link Attribute} * sub classes, and is normally not needed by class generators or adapters. * - * @param owner the internal name of the field's owner class. - * @param name the field's name. + * @param owner the internal name of the field's owner class. + * @param name the field's name. * @param descriptor the field's descriptor. * @return the index of a new or already existing field reference item. */ @@ -944,9 +983,9 @@ public class ClassWriter extends ClassVisitor { * constant pool already contains a similar item. This method is intended for {@link Attribute} * sub classes, and is normally not needed by class generators or adapters. * - * @param owner the internal name of the method's owner class. - * @param name the method's name. - * @param descriptor the method's descriptor. + * @param owner the internal name of the method's owner class. + * @param name the method's name. + * @param descriptor the method's descriptor. * @param isInterface {@literal true} if {@code owner} is an processer. * @return the index of a new or already existing method reference item. */ @@ -960,7 +999,7 @@ public class ClassWriter extends ClassVisitor { * constant pool already contains a similar item. This method is intended for {@link Attribute} * sub classes, and is normally not needed by class generators or adapters. * - * @param name a name. + * @param name a name. * @param descriptor a type descriptor. * @return the index of a new or already existing name and type item. */ @@ -973,7 +1012,8 @@ public class ClassWriter extends ClassVisitor { // ----------------------------------------------------------------------------------------------- /** - * Returns the common super type of the two given types. The default implementation of this method + * Returns the common super type of the two given types. The default implementation of this + * method * loads the two given classes and uses the java.lang.Class methods to find the common * super class. It can be overridden to compute this common super type in other ways, in * particular without actually loading any class, or to take into account the class that is @@ -1015,9 +1055,9 @@ public class ClassWriter extends ClassVisitor { } /** - * Returns the {@link ClassLoader} to be used by the default implementation of {@link - * #getCommonSuperClass(String, String)}, that of this {@link ClassWriter}'s runtime type by - * default. + * Returns the {@link ClassLoader} to be used by the default implementation of + * {@link #getCommonSuperClass(String, String)}, that of this {@link ClassWriter}'s runtime type + * by default. * * @return ClassLoader */ diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ConstantDynamic.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ConstantDynamic.java index a64eebed..2fdac99d 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ConstantDynamic.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ConstantDynamic.java @@ -1,19 +1,25 @@ - - package cn.universal.core.engine.asm; import java.util.Arrays; -/** A constant whose value is computed at runtime, with a bootstrap method. @Author Remi Forax */ +/** + * A constant whose value is computed at runtime, with a bootstrap method. @Author Remi Forax + */ public final class ConstantDynamic { - /** The constant name (can be arbitrary). */ + /** + * The constant name (can be arbitrary). + */ private final String name; - /** The constant type (must be a field descriptor). */ + /** + * The constant type (must be a field descriptor). + */ private final String descriptor; - /** The bootstrap method to use to compute the constant value at runtime. */ + /** + * The bootstrap method to use to compute the constant value at runtime. + */ private final Handle bootstrapMethod; /** @@ -25,11 +31,12 @@ public final class ConstantDynamic { /** * Constructs a new {@link ConstantDynamic}. * - * @param name the constant name (can be arbitrary). - * @param descriptor the constant type (must be a field descriptor). - * @param bootstrapMethod the bootstrap method to use to compute the constant value at runtime. + * @param name the constant name (can be arbitrary). + * @param descriptor the constant type (must be a field descriptor). + * @param bootstrapMethod the bootstrap method to use to compute the constant value at + * runtime. * @param bootstrapMethodArguments the arguments to pass to the bootstrap method, in order to - * compute the constant value at runtime. + * compute the constant value at runtime. */ public ConstantDynamic( final String name, @@ -74,7 +81,7 @@ public final class ConstantDynamic { * of this constant. * * @return the number of arguments passed to the bootstrap method, in order to compute the value - * of this constant. + * of this constant. */ public int getBootstrapMethodArgumentCount() { return bootstrapMethodArguments.length; @@ -85,7 +92,7 @@ public final class ConstantDynamic { * constant. * * @param index an argument index, between 0 and {@link #getBootstrapMethodArgumentCount()} - * (exclusive). + * (exclusive). * @return the argument passed to the bootstrap method, with the given index. */ public Object getBootstrapMethodArgument(final int index) { @@ -97,7 +104,7 @@ public final class ConstantDynamic { * constant. WARNING: this array must not be modified, and must not be returned to the user. * * @return the arguments to pass to the bootstrap method, in order to compute the value of this - * constant. + * constant. */ Object[] getBootstrapMethodArgumentsUnsafe() { return bootstrapMethodArguments; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Constants.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Constants.java index 9c869b2d..49fb8e52 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Constants.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Constants.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; import java.io.DataInputStream; @@ -154,7 +152,8 @@ final class Constants { static final int ASM_IFNONNULL = Opcodes.IFNONNULL + ASM_IFNULL_OPCODE_DELTA; static final int ASM_GOTO_W = 220; - private Constants() {} + private Constants() { + } static void checkAsmExperimental(final Object caller) { Class callerClass = caller.getClass(); @@ -171,9 +170,9 @@ final class Constants { String member = "(Annotation|Class|Field|Method|Module|RecordComponent|Signature)"; return internalName.contains("Test$") || Pattern.matches( - "org/objectweb/asm/util/Trace" + member + "Visitor(\\$.*)?", internalName) + "org/objectweb/asm/util/Trace" + member + "Visitor(\\$.*)?", internalName) || Pattern.matches( - "org/objectweb/asm/util/Check" + member + "Adapter(\\$.*)?", internalName); + "org/objectweb/asm/util/Check" + member + "Adapter(\\$.*)?", internalName); } static void checkIsPreview(final InputStream classInputStream) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Context.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Context.java index 62a40f43..479b2687 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Context.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Context.java @@ -1,33 +1,43 @@ - - package cn.universal.core.engine.asm; -/** Information about a class being parsed in a {@link ClassReader}. @Author Eric Bruneton */ +/** + * Information about a class being parsed in a {@link ClassReader}. @Author Eric Bruneton + */ final class Context { - /** The prototypes of the attributes that must be parsed in this class. */ + /** + * The prototypes of the attributes that must be parsed in this class. + */ Attribute[] attributePrototypes; /** - * The options used to parse this class. One or more of {@link ClassReader#SKIP_CODE}, {@link - * ClassReader#SKIP_DEBUG}, {@link ClassReader#SKIP_FRAMES}, {@link ClassReader#EXPAND_FRAMES} or - * {@link ClassReader#EXPAND_ASM_INSNS}. + * The options used to parse this class. One or more of {@link ClassReader#SKIP_CODE}, + * {@link ClassReader#SKIP_DEBUG}, {@link ClassReader#SKIP_FRAMES}, + * {@link ClassReader#EXPAND_FRAMES} or {@link ClassReader#EXPAND_ASM_INSNS}. */ int parsingOptions; - /** The buffer used to read strings in the constant pool. */ + /** + * The buffer used to read strings in the constant pool. + */ char[] charBuffer; // Information about the current method, i.e. the one read in the current (or latest) call // to {@link ClassReader#readMethod()}. - /** The access flags of the current method. */ + /** + * The access flags of the current method. + */ int currentMethodAccessFlags; - /** The name of the current method. */ + /** + * The name of the current method. + */ String currentMethodName; - /** The descriptor of the current method. */ + /** + * The descriptor of the current method. + */ String currentMethodDescriptor; /** @@ -45,29 +55,39 @@ final class Context { */ int currentTypeAnnotationTarget; - /** The target_path of the current type annotation target. */ + /** + * The target_path of the current type annotation target. + */ TypePath currentTypeAnnotationTargetPath; - /** The start of each local variable range in the current local variable annotation. */ + /** + * The start of each local variable range in the current local variable annotation. + */ Label[] currentLocalVariableAnnotationRangeStarts; - /** The end of each local variable range in the current local variable annotation. */ + /** + * The end of each local variable range in the current local variable annotation. + */ Label[] currentLocalVariableAnnotationRangeEnds; /** - * The local variable index of each local variable range in the current local variable annotation. + * The local variable index of each local variable range in the current local variable + * annotation. */ int[] currentLocalVariableAnnotationRangeIndices; // Information about the current stack map frame, i.e. the one read in the current (or latest) // call to {@link ClassReader#readFrame()}. - /** The bytecode offset of the current stack map frame. */ + /** + * The bytecode offset of the current stack map frame. + */ int currentFrameOffset; /** - * The type of the current stack map frame. One of {@link Opcodes#F_FULL}, {@link - * Opcodes#F_APPEND}, {@link Opcodes#F_CHOP}, {@link Opcodes#F_SAME} or {@link Opcodes#F_SAME1}. + * The type of the current stack map frame. One of {@link Opcodes#F_FULL}, + * {@link Opcodes#F_APPEND}, {@link Opcodes#F_CHOP}, {@link Opcodes#F_SAME} or + * {@link Opcodes#F_SAME1}. */ int currentFrameType; @@ -86,9 +106,10 @@ final class Context { /** * The types of the local variables in the current stack map frame. Each type is represented with - * a single array element (even long and double), using the format described in {@link - * MethodVisitor#visitFrame}. Depending on {@link #currentFrameType}, this contains the types of - * all the local variables, or only those of the additional ones (compared to the previous frame). + * a single array element (even long and double), using the format described in + * {@link MethodVisitor#visitFrame}. Depending on {@link #currentFrameType}, this contains the + * types of all the local variables, or only those of the additional ones (compared to the + * previous frame). */ Object[] currentFrameLocalTypes; @@ -100,8 +121,8 @@ final class Context { /** * The types of the stack elements in the current stack map frame. Each type is represented with a - * single array element (even long and double), using the format described in {@link - * MethodVisitor#visitFrame}. + * single array element (even long and double), using the format described in + * {@link MethodVisitor#visitFrame}. */ Object[] currentFrameStackTypes; } diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/CurrentFrame.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/CurrentFrame.java index b4f796e0..be1b669c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/CurrentFrame.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/CurrentFrame.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Edge.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Edge.java index 652b2cd2..d1f3cda6 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Edge.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Edge.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -14,14 +12,14 @@ package cn.universal.core.engine.asm; final class Edge { /** - * A control flow graph edge corresponding to a jump or ret instruction. Only used with {@link - * ClassWriter#COMPUTE_FRAMES}. + * A control flow graph edge corresponding to a jump or ret instruction. Only used with + * {@link ClassWriter#COMPUTE_FRAMES}. */ static final int JUMP = 0; /** - * A control flow graph edge corresponding to an exception handler. Only used with {@link - * ClassWriter#COMPUTE_MAXS}. + * A control flow graph edge corresponding to an exception handler. Only used with + * {@link ClassWriter#COMPUTE_MAXS}. */ static final int EXCEPTION = 0x7FFFFFFF; @@ -42,7 +40,9 @@ final class Edge { */ final int info; - /** The successor block of this control flow graph edge. */ + /** + * The successor block of this control flow graph edge. + */ final Label successor; /** @@ -53,9 +53,9 @@ final class Edge { /** * Constructs a new Edge. * - * @param info see {@link #info}. + * @param info see {@link #info}. * @param successor see {@link #successor}. - * @param nextEdge see {@link #nextEdge}. + * @param nextEdge see {@link #nextEdge}. */ Edge(final int info, final Label successor, final Edge nextEdge) { this.info = info; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/FieldVisitor.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/FieldVisitor.java index 528720ff..949b7250 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/FieldVisitor.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/FieldVisitor.java @@ -1,30 +1,30 @@ - - package cn.universal.core.engine.asm; /** * A visitor to visit a Java field. The methods of this class must be called in the following order: - * ( {@code visitAnnotation} | {@code visitTypeAnnotation} | {@code visitAttribute} )* {@code - * visitEnd}. @Author Eric Bruneton + * ( {@code visitAnnotation} | {@code visitTypeAnnotation} | {@code visitAttribute} )* + * {@code visitEnd}. @Author Eric Bruneton */ public abstract class FieldVisitor { /** - * The ASM API version implemented by this visitor. The value of this field must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link - * Opcodes#ASM8} or {@link Opcodes#ASM9}. + * The ASM API version implemented by this visitor. The value of this field must be one of + * {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, + * {@link Opcodes#ASM8} or {@link Opcodes#ASM9}. */ protected final int api; - /** The field visitor to which this visitor must delegate method calls. May be {@literal null}. */ + /** + * The field visitor to which this visitor must delegate method calls. May be {@literal null}. + */ protected FieldVisitor fv; /** * Constructs a new {@link FieldVisitor}. * - * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link - * Opcodes#ASM8} or {@link Opcodes#ASM9}. + * @param api the ASM API version implemented by this visitor. Must be one of + * {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, + * {@link Opcodes#ASM7}, {@link Opcodes#ASM8} or {@link Opcodes#ASM9}. */ public FieldVisitor(final int api) { this(api, null); @@ -33,11 +33,11 @@ public abstract class FieldVisitor { /** * Constructs a new {@link FieldVisitor}. * - * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link - * Opcodes#ASM8}. + * @param api the ASM API version implemented by this visitor. Must be one of + * {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, + * {@link Opcodes#ASM7} or {@link Opcodes#ASM8}. * @param fieldVisitor the field visitor to which this visitor must delegate method calls. May be - * null. + * null. */ public FieldVisitor(final int api, final FieldVisitor fieldVisitor) { if (api != Opcodes.ASM9 @@ -60,9 +60,9 @@ public abstract class FieldVisitor { * Visits an annotation of the field. * * @param descriptor the class descriptor of the annotation class. - * @param visible {@literal true} if the annotation is visible at runtime. + * @param visible {@literal true} if the annotation is visible at runtime. * @return a visitor to visit the annotation values, or {@literal null} if this visitor is not - * interested in visiting this annotation. + * interested in visiting this annotation. */ public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) { if (fv != null) { @@ -74,15 +74,15 @@ public abstract class FieldVisitor { /** * Visits an annotation on the type of the field. * - * @param typeRef a reference to the annotated type. The sort of this type reference must be - * {@link TypeReference#FIELD}. See {@link TypeReference}. - * @param typePath the path to the annotated type argument, wildcard bound, array element type, or - * static inner type within 'typeRef'. May be {@literal null} if the annotation targets - * 'typeRef' as a whole. + * @param typeRef a reference to the annotated type. The sort of this type reference must be + * {@link TypeReference#FIELD}. See {@link TypeReference}. + * @param typePath the path to the annotated type argument, wildcard bound, array element type, + * or static inner type within 'typeRef'. May be {@literal null} if the + * annotation targets 'typeRef' as a whole. * @param descriptor the class descriptor of the annotation class. - * @param visible {@literal true} if the annotation is visible at runtime. + * @param visible {@literal true} if the annotation is visible at runtime. * @return a visitor to visit the annotation values, or {@literal null} if this visitor is not - * interested in visiting this annotation. + * interested in visiting this annotation. */ public AnnotationVisitor visitTypeAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/FieldWriter.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/FieldWriter.java index 2da79454..324ae5b5 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/FieldWriter.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/FieldWriter.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -7,11 +5,13 @@ package cn.universal.core.engine.asm; * Java Virtual Machine Specification (JVMS). @Author Eric Bruneton * * @see JVMS - * 4.5 + * 4.5 */ final class FieldWriter extends FieldVisitor { - /** Where the constants used in this FieldWriter must be stored. */ + /** + * Where the constants used in this FieldWriter must be stored. + */ private final SymbolTable symbolTable; // Note: fields are ordered as in the field_info structure, and those related to attributes are @@ -24,10 +24,14 @@ final class FieldWriter extends FieldVisitor { */ private final int accessFlags; - /** The name_index field of the field_info JVMS structure. */ + /** + * The name_index field of the field_info JVMS structure. + */ private final int nameIndex; - /** The descriptor_index field of the field_info JVMS structure. */ + /** + * The descriptor_index field of the field_info JVMS structure. + */ private final int descriptorIndex; /** @@ -67,13 +71,13 @@ final class FieldWriter extends FieldVisitor { private AnnotationWriter lastRuntimeInvisibleTypeAnnotation; /** - * The first non standard attribute of this field. The next ones can be accessed with the {@link - * Attribute#nextAttribute} field. May be {@literal null}. + * The first non standard attribute of this field. The next ones can be accessed with the + * {@link Attribute#nextAttribute} field. May be {@literal null}. * *

WARNING: this list stores the attributes in the reverse order of their visit. - * firstAttribute is actually the last attribute visited in {@link #visitAttribute}. The {@link - * #putFieldInfo} method writes the attributes in the order defined by this list, i.e. in the - * reverse order specified by the user. + * firstAttribute is actually the last attribute visited in {@link #visitAttribute}. The + * {@link #putFieldInfo} method writes the attributes in the order defined by this list, i.e. in + * the reverse order specified by the user. */ private Attribute firstAttribute; @@ -84,11 +88,11 @@ final class FieldWriter extends FieldVisitor { /** * Constructs a new {@link FieldWriter}. * - * @param symbolTable where the constants used in this FieldWriter must be stored. - * @param access the field's access flags (see {@link Opcodes}). - * @param name the field's name. - * @param descriptor the field's descriptor (see {@link Type}). - * @param signature the field's signature. May be {@literal null}. + * @param symbolTable where the constants used in this FieldWriter must be stored. + * @param access the field's access flags (see {@link Opcodes}). + * @param name the field's name. + * @param descriptor the field's descriptor (see {@link Type}). + * @param signature the field's signature. May be {@literal null}. * @param constantValue the field's constant value. May be {@literal null}. */ FieldWriter( diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Frame.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Frame.java index ae704782..e97c0567 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Frame.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Frame.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -121,10 +119,14 @@ class Frame { // Constants to manipulate the DIM field of an abstract type. - /** The constant to be added to an abstract type to get one with one more array dimension. */ + /** + * The constant to be added to an abstract type to get one with one more array dimension. + */ private static final int ARRAY_OF = +1 << DIM_SHIFT; - /** The constant to be added to an abstract type to get one with one less array dimension. */ + /** + * The constant to be added to an abstract type to get one with one less array dimension. + */ private static final int ELEMENT_OF = -1 << DIM_SHIFT; // Possible values for the KIND field of an abstract type. @@ -162,19 +164,29 @@ class Frame { // Instance fields // ----------------------------------------------------------------------------------------------- - /** The basic block to which these input and output stack map frames correspond. */ + /** + * The basic block to which these input and output stack map frames correspond. + */ Label owner; - /** The input stack map frame locals. This is an array of abstract types. */ + /** + * The input stack map frame locals. This is an array of abstract types. + */ private int[] inputLocals; - /** The input stack map frame stack. This is an array of abstract types. */ + /** + * The input stack map frame stack. This is an array of abstract types. + */ private int[] inputStack; - /** The output stack map frame locals. This is an array of abstract types. */ + /** + * The output stack map frame locals. This is an array of abstract types. + */ private int[] outputLocals; - /** The output stack map frame stack. This is an array of abstract types. */ + /** + * The output stack map frame stack. This is an array of abstract types. + */ private int[] outputStack; /** @@ -185,10 +197,14 @@ class Frame { */ private short outputStackStart; - /** The index of the top stack element in {@link #outputStack}. */ + /** + * The index of the top stack element in {@link #outputStack}. + */ private short outputStackTop; - /** The number of types that are initialized in the basic block. See {@link #initializations}. */ + /** + * The number of types that are initialized in the basic block. See {@link #initializations}. + */ private int initializationCount; /** @@ -243,11 +259,12 @@ class Frame { * Returns the abstract type corresponding to the given public API frame element type. * * @param symbolTable the type table to use to lookup and store type {@link Symbol}. - * @param type a frame element type described using the same format as in {@link - * MethodVisitor#visitFrame}, i.e. either {@link Opcodes#TOP}, {@link Opcodes#INTEGER}, {@link - * Opcodes#FLOAT}, {@link Opcodes#LONG}, {@link Opcodes#DOUBLE}, {@link Opcodes#NULL}, or - * {@link Opcodes#UNINITIALIZED_THIS}, or the internal name of a class, or a Label designating - * a NEW instruction (for uninitialized types). + * @param type a frame element type described using the same format as in + * {@link MethodVisitor#visitFrame}, i.e. either {@link Opcodes#TOP}, + * {@link Opcodes#INTEGER}, {@link Opcodes#FLOAT}, {@link Opcodes#LONG}, + * {@link Opcodes#DOUBLE}, {@link Opcodes#NULL}, or + * {@link Opcodes#UNINITIALIZED_THIS}, or the internal name of a class, or a + * Label designating a NEW instruction (for uninitialized types). * @return the abstract type corresponding to the given frame element type. */ static int getAbstractTypeFromApiFormat(final SymbolTable symbolTable, final Object type) { @@ -265,9 +282,9 @@ class Frame { /** * Returns the abstract type corresponding to the internal name of a class. * - * @param symbolTable the type table to use to lookup and store type {@link Symbol}. + * @param symbolTable the type table to use to lookup and store type {@link Symbol}. * @param internalName the internal name of a class. This must not be an array type - * descriptor. + * descriptor. * @return the abstract type value corresponding to the given internal name. */ static int getAbstractTypeFromInternalName( @@ -279,8 +296,8 @@ class Frame { * Returns the abstract type corresponding to the given type descriptor. * * @param symbolTable the type table to use to lookup and store type {@link Symbol}. - * @param buffer a string ending with a type descriptor. - * @param offset the start offset of the type descriptor in buffer. + * @param buffer a string ending with a type descriptor. + * @param offset the start offset of the type descriptor in buffer. * @return the abstract type corresponding to the given type descriptor. */ private static int getAbstractTypeFromDescriptor( @@ -358,9 +375,9 @@ class Frame { * attribute). * * @param symbolTable the type table to use to lookup and store type {@link Symbol}. - * @param access the method's access flags. - * @param descriptor the method descriptor. - * @param maxLocals the maximum number of local variables of the method. + * @param access the method's access flags. + * @param descriptor the method descriptor. + * @param maxLocals the maximum number of local variables of the method. */ final void setInputFrameFromDescriptor( final SymbolTable symbolTable, @@ -395,12 +412,12 @@ class Frame { * Sets the input frame from the given public API frame description. * * @param symbolTable the type table to use to lookup and store type {@link Symbol}. - * @param numLocal the number of local variables. - * @param local the local variable types, described using the same format as in {@link - * MethodVisitor#visitFrame}. - * @param numStack the number of operand stack elements. - * @param stack the operand stack types, described using the same format as in {@link - * MethodVisitor#visitFrame}. + * @param numLocal the number of local variables. + * @param local the local variable types, described using the same format as in + * {@link MethodVisitor#visitFrame}. + * @param numStack the number of operand stack elements. + * @param stack the operand stack types, described using the same format as in + * {@link MethodVisitor#visitFrame}. */ final void setInputFrameFromApiFormat( final SymbolTable symbolTable, @@ -469,7 +486,7 @@ class Frame { /** * Replaces the abstract type stored at the given local variable index in the output frame. * - * @param localIndex the index of the output frame local variable that must be set. + * @param localIndex the index of the output frame local variable that must be set. * @param abstractType the value that must be set. */ private void setLocal(final int localIndex, final int abstractType) { @@ -517,7 +534,7 @@ class Frame { * Pushes the abstract type corresponding to the given descriptor on the output frame stack. * * @param symbolTable the type table to use to lookup and store type {@link Symbol}. - * @param descriptor a type or method descriptor (in which case its return type is pushed). + * @param descriptor a type or method descriptor (in which case its return type is pushed). */ private void push(final SymbolTable symbolTable, final String descriptor) { int typeDescriptorOffset = @@ -606,11 +623,11 @@ class Frame { /** * Returns the "initialized" abstract type corresponding to the given abstract type. * - * @param symbolTable the type table to use to lookup and store type {@link Symbol}. + * @param symbolTable the type table to use to lookup and store type {@link Symbol}. * @param abstractType an abstract type. * @return the REFERENCE_KIND abstract type corresponding to abstractType if it is - * UNINITIALIZED_THIS or an UNINITIALIZED_KIND abstract type for one of the types on which a - * constructor is invoked in the basic block. Otherwise returns abstractType. + * UNINITIALIZED_THIS or an UNINITIALIZED_KIND abstract type for one of the types on which a + * constructor is invoked in the basic block. Otherwise returns abstractType. */ private int getInitializedType(final SymbolTable symbolTable, final int abstractType) { if (abstractType == UNINITIALIZED_THIS @@ -645,9 +662,9 @@ class Frame { /** * Simulates the action of the given instruction on the output stack frame. * - * @param opcode the opcode of the instruction. - * @param arg the numeric operand of the instruction, if any. - * @param argSymbol the Symbol operand of the instruction, if any. + * @param opcode the opcode of the instruction. + * @param arg the numeric operand of the instruction, if any. + * @param argSymbol the Symbol operand of the instruction, if any. * @param symbolTable the type table to use to lookup and store type {@link Symbol}. */ void execute( @@ -1088,8 +1105,8 @@ class Frame { * Computes the concrete output type corresponding to a given abstract output type. * * @param abstractOutputType an abstract output type. - * @param numStack the size of the input stack, used to resolve abstract output types of - * STACK_KIND kind. + * @param numStack the size of the input stack, used to resolve abstract output types of + * STACK_KIND kind. * @return the concrete output type corresponding to 'abstractOutputType'. */ private int getConcreteOutputType(final int abstractOutputType, final int numStack) { @@ -1125,11 +1142,12 @@ class Frame { * {@link Frame}. Returns {@literal true} if the given frame has been changed by this operation * (the input and output frames of this {@link Frame} are never changed). * - * @param symbolTable the type table to use to lookup and store type {@link Symbol}. - * @param dstFrame the {@link Frame} whose input frame must be updated. This should be the frame - * of a successor, in the control flow graph, of the basic block corresponding to this frame. + * @param symbolTable the type table to use to lookup and store type {@link Symbol}. + * @param dstFrame the {@link Frame} whose input frame must be updated. This should be the + * frame of a successor, in the control flow graph, of the basic block + * corresponding to this frame. * @param catchTypeIndex if 'frame' corresponds to an exception handler basic block, the type - * table index of the caught exception type, otherwise 0. + * table index of the caught exception type, otherwise 0. * @return {@literal true} if the input frame of 'frame' has been changed by this operation. */ final boolean merge( @@ -1224,13 +1242,14 @@ class Frame { * Returns {@literal true} if the type array has been modified by this operation. * * @param symbolTable the type table to use to lookup and store type {@link Symbol}. - * @param sourceType the abstract type with which the abstract type array element must be merged. - * This type should be of {@link #CONSTANT_KIND}, {@link #REFERENCE_KIND} or {@link - * #UNINITIALIZED_KIND} kind, with positive or {@literal null} array dimensions. - * @param dstTypes an array of abstract types. These types should be of {@link #CONSTANT_KIND}, - * {@link #REFERENCE_KIND} or {@link #UNINITIALIZED_KIND} kind, with positive or {@literal - * null} array dimensions. - * @param dstIndex the index of the type that must be merged in dstTypes. + * @param sourceType the abstract type with which the abstract type array element must be merged. + * This type should be of {@link #CONSTANT_KIND}, {@link #REFERENCE_KIND} or + * {@link #UNINITIALIZED_KIND} kind, with positive or {@literal null} array + * dimensions. + * @param dstTypes an array of abstract types. These types should be of {@link #CONSTANT_KIND}, + * {@link #REFERENCE_KIND} or {@link #UNINITIALIZED_KIND} kind, with positive + * or {@literal null} array dimensions. + * @param dstIndex the index of the type that must be merged in dstTypes. * @return {@literal true} if the type array has been modified by this operation. */ private static boolean merge( @@ -1320,8 +1339,8 @@ class Frame { * done with the {@link MethodWriter#visitFrameStart}, {@link MethodWriter#visitAbstractType} and * {@link MethodWriter#visitFrameEnd} methods. * - * @param methodWriter the {@link MethodWriter} that should visit the input frame of this {@link - * Frame}. + * @param methodWriter the {@link MethodWriter} that should visit the input frame of this + * {@link Frame}. */ final void accept(final MethodWriter methodWriter) { // Compute the number of locals, ignoring TOP types that are just after a LONG or a DOUBLE, and @@ -1370,12 +1389,12 @@ class Frame { * Put the given abstract type in the given ByteVector, using the JVMS verification_type_info * format used in StackMapTable attributes. * - * @param symbolTable the type table to use to lookup and store type {@link Symbol}. - * @param abstractType an abstract type, restricted to {@link Frame#CONSTANT_KIND}, {@link - * Frame#REFERENCE_KIND} or {@link Frame#UNINITIALIZED_KIND} types. - * @param output where the abstract type must be put. + * @param symbolTable the type table to use to lookup and store type {@link Symbol}. + * @param abstractType an abstract type, restricted to {@link Frame#CONSTANT_KIND}, + * {@link Frame#REFERENCE_KIND} or {@link Frame#UNINITIALIZED_KIND} types. + * @param output where the abstract type must be put. * @see JVMS - * 4.7.4 + * 4.7.4 */ static void putAbstractType( final SymbolTable symbolTable, final int abstractType, final ByteVector output) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Handle.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Handle.java index 338e0d36..ee3980a6 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Handle.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Handle.java @@ -1,44 +1,54 @@ - - package cn.universal.core.engine.asm; -/** A reference to a field or a method. @Author Remi Forax @Author Eric Bruneton */ +/** + * A reference to a field or a method. @Author Remi Forax @Author Eric Bruneton + */ public final class Handle { /** * The kind of field or method designated by this Handle. Should be {@link Opcodes#H_GETFIELD}, - * {@link Opcodes#H_GETSTATIC}, {@link Opcodes#H_PUTFIELD}, {@link Opcodes#H_PUTSTATIC}, {@link - * Opcodes#H_INVOKEVIRTUAL}, {@link Opcodes#H_INVOKESTATIC}, {@link Opcodes#H_INVOKESPECIAL}, - * {@link Opcodes#H_NEWINVOKESPECIAL} or {@link Opcodes#H_INVOKEINTERFACE}. + * {@link Opcodes#H_GETSTATIC}, {@link Opcodes#H_PUTFIELD}, {@link Opcodes#H_PUTSTATIC}, + * {@link Opcodes#H_INVOKEVIRTUAL}, {@link Opcodes#H_INVOKESTATIC}, + * {@link Opcodes#H_INVOKESPECIAL}, {@link Opcodes#H_NEWINVOKESPECIAL} or + * {@link Opcodes#H_INVOKEINTERFACE}. */ private final int tag; - /** The internal name of the class that owns the field or method designated by this handle. */ + /** + * The internal name of the class that owns the field or method designated by this handle. + */ private final String owner; - /** The name of the field or method designated by this handle. */ + /** + * The name of the field or method designated by this handle. + */ private final String name; - /** The descriptor of the field or method designated by this handle. */ + /** + * The descriptor of the field or method designated by this handle. + */ private final String descriptor; - /** Whether the owner is an processer or not. */ + /** + * Whether the owner is an processer or not. + */ private final boolean isInterface; /** * Constructs a new field or method handle. * - * @param tag the kind of field or method designated by this Handle. Must be {@link - * Opcodes#H_GETFIELD}, {@link Opcodes#H_GETSTATIC}, {@link Opcodes#H_PUTFIELD}, {@link - * Opcodes#H_PUTSTATIC}, {@link Opcodes#H_INVOKEVIRTUAL}, {@link Opcodes#H_INVOKESTATIC}, - * {@link Opcodes#H_INVOKESPECIAL}, {@link Opcodes#H_NEWINVOKESPECIAL} or {@link - * Opcodes#H_INVOKEINTERFACE}. - * @param owner the internal name of the class that owns the field or method designated by this - * handle. - * @param name the name of the field or method designated by this handle. + * @param tag the kind of field or method designated by this Handle. Must be + * {@link Opcodes#H_GETFIELD}, {@link Opcodes#H_GETSTATIC}, + * {@link Opcodes#H_PUTFIELD}, {@link Opcodes#H_PUTSTATIC}, + * {@link Opcodes#H_INVOKEVIRTUAL}, {@link Opcodes#H_INVOKESTATIC}, + * {@link Opcodes#H_INVOKESPECIAL}, {@link Opcodes#H_NEWINVOKESPECIAL} or + * {@link Opcodes#H_INVOKEINTERFACE}. + * @param owner the internal name of the class that owns the field or method designated by + * this handle. + * @param name the name of the field or method designated by this handle. * @param descriptor the descriptor of the field or method designated by this handle. - * @deprecated this constructor has been superseded by {@link #Handle(int, String, String, String, - * boolean)}. + * @deprecated this constructor has been superseded by + * {@link #Handle(int, String, String, String, boolean)}. */ @Deprecated public Handle(final int tag, final String owner, final String name, final String descriptor) { @@ -48,15 +58,16 @@ public final class Handle { /** * Constructs a new field or method handle. * - * @param tag the kind of field or method designated by this Handle. Must be {@link - * Opcodes#H_GETFIELD}, {@link Opcodes#H_GETSTATIC}, {@link Opcodes#H_PUTFIELD}, {@link - * Opcodes#H_PUTSTATIC}, {@link Opcodes#H_INVOKEVIRTUAL}, {@link Opcodes#H_INVOKESTATIC}, - * {@link Opcodes#H_INVOKESPECIAL}, {@link Opcodes#H_NEWINVOKESPECIAL} or {@link - * Opcodes#H_INVOKEINTERFACE}. - * @param owner the internal name of the class that owns the field or method designated by this - * handle. - * @param name the name of the field or method designated by this handle. - * @param descriptor the descriptor of the field or method designated by this handle. + * @param tag the kind of field or method designated by this Handle. Must be + * {@link Opcodes#H_GETFIELD}, {@link Opcodes#H_GETSTATIC}, + * {@link Opcodes#H_PUTFIELD}, {@link Opcodes#H_PUTSTATIC}, + * {@link Opcodes#H_INVOKEVIRTUAL}, {@link Opcodes#H_INVOKESTATIC}, + * {@link Opcodes#H_INVOKESPECIAL}, {@link Opcodes#H_NEWINVOKESPECIAL} or + * {@link Opcodes#H_INVOKEINTERFACE}. + * @param owner the internal name of the class that owns the field or method designated by + * this handle. + * @param name the name of the field or method designated by this handle. + * @param descriptor the descriptor of the field or method designated by this handle. * @param isInterface whether the owner is an processer or not. */ public Handle( @@ -76,16 +87,17 @@ public final class Handle { * Returns the kind of field or method designated by this handle. * * @return {@link Opcodes#H_GETFIELD}, {@link Opcodes#H_GETSTATIC}, {@link Opcodes#H_PUTFIELD}, - * {@link Opcodes#H_PUTSTATIC}, {@link Opcodes#H_INVOKEVIRTUAL}, {@link - * Opcodes#H_INVOKESTATIC}, {@link Opcodes#H_INVOKESPECIAL}, {@link - * Opcodes#H_NEWINVOKESPECIAL} or {@link Opcodes#H_INVOKEINTERFACE}. + * {@link Opcodes#H_PUTSTATIC}, {@link Opcodes#H_INVOKEVIRTUAL}, {@link Opcodes#H_INVOKESTATIC}, + * {@link Opcodes#H_INVOKESPECIAL}, {@link Opcodes#H_NEWINVOKESPECIAL} or + * {@link Opcodes#H_INVOKEINTERFACE}. */ public int getTag() { return tag; } /** - * Returns the internal name of the class that owns the field or method designated by this handle. + * Returns the internal name of the class that owns the field or method designated by this + * handle. * * @return the internal name of the class that owns the field or method designated by this handle. */ diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Handler.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Handler.java index bfbb9560..ab7c9811 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Handler.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Handler.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -9,7 +7,7 @@ package cn.universal.core.engine.asm; * exception_table array. @Author Eric Bruneton * * @see JVMS - * 4.7.3 + * 4.7.3 */ final class Handler { @@ -43,18 +41,20 @@ final class Handler { */ final String catchTypeDescriptor; - /** The next exception handler. */ + /** + * The next exception handler. + */ Handler nextHandler; /** * Constructs a new Handler. * - * @param startPc the start_pc field of this JVMS exception_table entry. - * @param endPc the end_pc field of this JVMS exception_table entry. - * @param handlerPc the handler_pc field of this JVMS exception_table entry. - * @param catchType The catch_type field of this JVMS exception_table entry. + * @param startPc the start_pc field of this JVMS exception_table entry. + * @param endPc the end_pc field of this JVMS exception_table entry. + * @param handlerPc the handler_pc field of this JVMS exception_table entry. + * @param catchType The catch_type field of this JVMS exception_table entry. * @param catchTypeDescriptor The internal name of the type of exceptions handled by this handler, - * or {@literal null} to catch any exceptions. + * or {@literal null} to catch any exceptions. */ Handler( final Label startPc, @@ -74,7 +74,7 @@ final class Handler { * * @param handler an existing Handler. * @param startPc the start_pc field of this JVMS exception_table entry. - * @param endPc the end_pc field of this JVMS exception_table entry. + * @param endPc the end_pc field of this JVMS exception_table entry. */ Handler(final Handler handler, final Label startPc, final Label endPc) { this(startPc, endPc, handler.handlerPc, handler.catchType, handler.catchTypeDescriptor); @@ -86,8 +86,8 @@ final class Handler { * element. * * @param firstHandler the beginning of a Handler list. May be {@literal null}. - * @param start the start of the range to be removed. - * @param end the end of the range to be removed. Maybe {@literal null}. + * @param start the start of the range to be removed. + * @param end the end of the range to be removed. Maybe {@literal null}. * @return the exception handler list with the start-end range removed. */ static Handler removeRange(final Handler firstHandler, final Label start, final Label end) { @@ -155,7 +155,8 @@ final class Handler { * element. This includes the exception_table_length field. * * @param firstHandler the beginning of a Handler list. May be {@literal null}. - * @param output where the exception_table_length and exception_table structures must be put. + * @param output where the exception_table_length and exception_table structures must be + * put. */ static void putExceptionTable(final Handler firstHandler, final ByteVector output) { output.putShort(getExceptionTableLength(firstHandler)); diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Label.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Label.java index 2129d768..229b6a4b 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Label.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Label.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -23,10 +21,14 @@ public class Label { */ static final int FLAG_JUMP_TARGET = 2; - /** A flag indicating that the bytecode offset of a label is known. */ + /** + * A flag indicating that the bytecode offset of a label is known. + */ static final int FLAG_RESOLVED = 4; - /** A flag indicating that a label corresponds to a reachable basic block. */ + /** + * A flag indicating that a label corresponds to a reachable basic block. + */ static final int FLAG_REACHABLE = 8; /** @@ -51,7 +53,9 @@ public class Label { */ static final int FLAG_SUBROUTINE_START = 32; - /** A flag indicating that the basic block corresponding to a label is the end of a subroutine. */ + /** + * A flag indicating that the basic block corresponding to a label is the end of a subroutine. + */ static final int FLAG_SUBROUTINE_END = 64; /** @@ -111,9 +115,9 @@ public class Label { /** * The type and status of this label or its corresponding basic block. Must be zero or more of - * {@link #FLAG_DEBUG_ONLY}, {@link #FLAG_JUMP_TARGET}, {@link #FLAG_RESOLVED}, {@link - * #FLAG_REACHABLE}, {@link #FLAG_SUBROUTINE_CALLER}, {@link #FLAG_SUBROUTINE_START}, {@link - * #FLAG_SUBROUTINE_END}. + * {@link #FLAG_DEBUG_ONLY}, {@link #FLAG_JUMP_TARGET}, {@link #FLAG_RESOLVED}, + * {@link #FLAG_REACHABLE}, {@link #FLAG_SUBROUTINE_CALLER}, {@link #FLAG_SUBROUTINE_START}, + * {@link #FLAG_SUBROUTINE_END}. */ short flags; @@ -200,8 +204,8 @@ public class Label { /** * The maximum height reached by the output stack, relatively to the top of the input stack, in - * the basic block corresponding to this label. This maximum is always positive or {@literal - * null}. + * the basic block corresponding to this label. This maximum is always positive or + * {@literal null}. */ short outputStackMax; @@ -216,17 +220,17 @@ public class Label { /** * The input and output stack map frames of the basic block corresponding to this label. This - * field is only used when the {@link MethodWriter#COMPUTE_ALL_FRAMES} or {@link - * MethodWriter#COMPUTE_INSERTED_FRAMES} option is used. + * field is only used when the {@link MethodWriter#COMPUTE_ALL_FRAMES} or + * {@link MethodWriter#COMPUTE_INSERTED_FRAMES} option is used. */ Frame frame; /** * The successor of this label, in the order they are visited in {@link MethodVisitor#visitLabel}. - * This linked list does not include labels used for debug info only. If the {@link - * MethodWriter#COMPUTE_ALL_FRAMES} or {@link MethodWriter#COMPUTE_INSERTED_FRAMES} option is used - * then it does not contain either successive labels that denote the same bytecode offset (in this - * case only the first label appears in this list). + * This linked list does not include labels used for debug info only. If the + * {@link MethodWriter#COMPUTE_ALL_FRAMES} or {@link MethodWriter#COMPUTE_INSERTED_FRAMES} option + * is used then it does not contain either successive labels that denote the same bytecode offset + * (in this case only the first label appears in this list). */ Label nextBasicBlock; @@ -258,7 +262,9 @@ public class Label { // Constructor and accessors // ----------------------------------------------------------------------------------------------- - /** Constructs a new label. */ + /** + * Constructs a new label. + */ public Label() { // Nothing to do. } @@ -288,8 +294,8 @@ public class Label { * is used. * * @return the label itself if {@link #frame} is null, otherwise the Label's frame owner. This - * corresponds to the "canonical" label instance described above thanks to the way the label - * frame is set in {@link MethodWriter#visitLabel}. + * corresponds to the "canonical" label instance described above thanks to the way the label frame + * is set in {@link MethodWriter#visitLabel}. */ final Label getCanonicalInstance() { return frame == null ? this : frame.owner; @@ -324,7 +330,7 @@ public class Label { /** * Makes the given visitor visit this label and its source line numbers, if applicable. * - * @param methodVisitor a method visitor. + * @param methodVisitor a method visitor. * @param visitLineNumbers whether to visit of the label's source line numbers, if any. */ final void accept(final MethodVisitor methodVisitor, final boolean visitLineNumbers) { @@ -349,10 +355,12 @@ public class Label { * computed and written directly. Otherwise, a null relative offset is written and a new forward * reference is declared for this label. * - * @param code the bytecode of the method. This is where the reference is appended. + * @param code the bytecode of the method. This is where the reference is + * appended. * @param sourceInsnBytecodeOffset the bytecode offset of the instruction that contains the - * reference to be appended. - * @param wideReference whether the reference must be stored in 4 bytes (instead of 2 bytes). + * reference to be appended. + * @param wideReference whether the reference must be stored in 4 bytes (instead of 2 + * bytes). */ final void put( final ByteVector code, final int sourceInsnBytecodeOffset, final boolean wideReference) { @@ -379,11 +387,11 @@ public class Label { * bytecode offset of the reference can be, and must be, computed and stored directly. * * @param sourceInsnBytecodeOffset the bytecode offset of the instruction that contains the - * reference stored at referenceHandle. - * @param referenceType either {@link #FORWARD_REFERENCE_TYPE_SHORT} or {@link - * #FORWARD_REFERENCE_TYPE_WIDE}. - * @param referenceHandle the offset in the bytecode where the forward reference value must be - * stored. + * reference stored at referenceHandle. + * @param referenceType either {@link #FORWARD_REFERENCE_TYPE_SHORT} or + * {@link #FORWARD_REFERENCE_TYPE_WIDE}. + * @param referenceHandle the offset in the bytecode where the forward reference value + * must be stored. */ private void addForwardReference( final int sourceInsnBytecodeOffset, final int referenceType, final int referenceHandle) { @@ -407,13 +415,13 @@ public class Label { * the method, i.e. when its bytecode offset becomes known. This method fills in the blanks that * where left in the bytecode by each forward reference previously added to this label. * - * @param code the bytecode of the method. + * @param code the bytecode of the method. * @param bytecodeOffset the bytecode offset of this label. * @return {@literal true} if a blank that was left for this label was too small to store the - * offset. In such a case the corresponding jump instruction is replaced with an equivalent - * ASM specific instruction using an unsigned two bytes offset. These ASM specific - * instructions are later replaced with standard bytecode instructions with wider offsets (4 - * bytes instead of 2), in ClassReader. + * offset. In such a case the corresponding jump instruction is replaced with an equivalent ASM + * specific instruction using an unsigned two bytes offset. These ASM specific instructions are + * later replaced with standard bytecode instructions with wider offsets (4 bytes instead of 2), + * in ClassReader. */ final boolean resolve(final byte[] code, final int bytecodeOffset) { this.flags |= FLAG_RESOLVED; @@ -469,7 +477,7 @@ public class Label { * {@link #nextListElement}. * * @param subroutineId the id of the subroutine starting with the basic block corresponding to - * this label. + * this label. */ final void markSubroutine(final short subroutineId) { // Data flow algorithm: put this basic block in a list of blocks to process (which are blocks @@ -504,7 +512,8 @@ public class Label { * {@link #nextListElement}. * * @param subroutineCaller a basic block that ends with a jsr to the basic block corresponding to - * this label. This label is supposed to correspond to the start of a subroutine. + * this label. This label is supposed to correspond to the start of a + * subroutine. */ final void addSubroutineRetSuccessors(final Label subroutineCaller) { // Data flow algorithm: put this basic block in a list blocks to process (which are blocks @@ -557,7 +566,7 @@ public class Label { * blocks to process, and returns the new list. * * @param listOfLabelsToProcess a list of basic blocks to process, linked together with their - * {@link #nextListElement} field. + * {@link #nextListElement} field. * @return the new list of blocks to process. */ private Label pushSuccessors(final Label listOfLabelsToProcess) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodTooLargeException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodTooLargeException.java index a62c2112..1f327ea2 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodTooLargeException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodTooLargeException.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -18,10 +16,10 @@ public final class MethodTooLargeException extends IndexOutOfBoundsException { /** * Constructs a new {@link MethodTooLargeException}. * - * @param className the internal name of the owner class. + * @param className the internal name of the owner class. * @param methodName the name of the method. * @param descriptor the descriptor of the method. - * @param codeSize the size of the method's Code attribute, in bytes. + * @param codeSize the size of the method's Code attribute, in bytes. */ public MethodTooLargeException( final String className, diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodVisitor.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodVisitor.java index ad78e851..70c22da0 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodVisitor.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodVisitor.java @@ -1,31 +1,30 @@ - - package cn.universal.core.engine.asm; /** * A visitor to visit a Java method. The methods of this class must be called in the following * order: ( {@code visitParameter} )* [ {@code visitAnnotationDefault} ] ( {@code visitAnnotation} | - * {@code visitAnnotableParameterCount} | {@code visitParameterAnnotation} {@code - * visitTypeAnnotation} | {@code visitAttribute} )* [ {@code visitCode} ( {@code visitFrame} | - * {@code visitXInsn} | {@code visitLabel} | {@code visitInsnAnnotation} | {@code - * visitTryCatchBlock} | {@code visitTryCatchAnnotation} | {@code visitLocalVariable} | {@code - * visitLocalVariableAnnotation} | {@code visitLineNumber} )* {@code visitMaxs} ] {@code visitEnd}. - * In addition, the {@code visitXInsn} and {@code visitLabel} methods must be called in the - * sequential order of the bytecode instructions of the visited code, {@code visitInsnAnnotation} - * must be called after the annotated instruction, {@code visitTryCatchBlock} must be called + * {@code visitAnnotableParameterCount} | {@code visitParameterAnnotation} + * {@code visitTypeAnnotation} | {@code visitAttribute} )* [ {@code visitCode} ( {@code visitFrame} + * | {@code visitXInsn} | {@code visitLabel} | {@code visitInsnAnnotation} | + * {@code visitTryCatchBlock} | {@code visitTryCatchAnnotation} | {@code visitLocalVariable} | + * {@code visitLocalVariableAnnotation} | {@code visitLineNumber} )* {@code visitMaxs} ] + * {@code visitEnd}. In addition, the {@code visitXInsn} and {@code visitLabel} methods must + * be called in the sequential order of the bytecode instructions of the visited code, + * {@code visitInsnAnnotation} must be called after the annotated instruction, + * {@code visitTryCatchBlock} must be called * before the labels passed as arguments have been visited, {@code * visitTryCatchBlockAnnotation} must be called after the corresponding try catch block has - * been visited, and the {@code visitLocalVariable}, {@code visitLocalVariableAnnotation} and {@code - * visitLineNumber} methods must be called after the labels passed as arguments have been - * visited. @Author Eric Bruneton + * been visited, and the {@code visitLocalVariable}, {@code visitLocalVariableAnnotation} and + * {@code visitLineNumber} methods must be called after the labels passed as arguments have + * been visited. @Author Eric Bruneton */ public abstract class MethodVisitor { private static final String REQUIRES_ASM5 = "This feature requires ASM5"; /** - * The ASM API version implemented by this visitor. The value of this field must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. + * The ASM API version implemented by this visitor. The value of this field must be one of + * {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ protected final int api; @@ -37,8 +36,9 @@ public abstract class MethodVisitor { /** * Constructs a new {@link MethodVisitor}. * - * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. + * @param api the ASM API version implemented by this visitor. Must be one of + * {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or + * {@link Opcodes#ASM7}. */ public MethodVisitor(final int api) { this(api, null); @@ -47,10 +47,11 @@ public abstract class MethodVisitor { /** * Constructs a new {@link MethodVisitor}. * - * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. + * @param api the ASM API version implemented by this visitor. Must be one of + * {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or + * {@link Opcodes#ASM7}. * @param methodVisitor the method visitor to which this visitor must delegate method calls. May - * be null. + * be null. */ public MethodVisitor(final int api, final MethodVisitor methodVisitor) { if (api != Opcodes.ASM9 @@ -76,9 +77,9 @@ public abstract class MethodVisitor { /** * Visits a parameter of this method. * - * @param name parameter name or {@literal null} if none is provided. + * @param name parameter name or {@literal null} if none is provided. * @param access the parameter's access flags, only {@code ACC_FINAL}, {@code ACC_SYNTHETIC} - * or/and {@code ACC_MANDATED} are allowed (see {@link Opcodes}). + * or/and {@code ACC_MANDATED} are allowed (see {@link Opcodes}). */ public void visitParameter(final String name, final int access) { if (api < Opcodes.ASM5) { @@ -93,9 +94,9 @@ public abstract class MethodVisitor { * Visits the default value of this annotation processer method. * * @return a visitor to the visit the actual default value of this annotation processer method, or - * {@literal null} if this visitor is not interested in visiting this default value. The - * 'name' parameters passed to the methods of this annotation visitor are ignored. Moreover, - * exacly one visit method must be called on this annotation visitor, followed by visitEnd. + * {@literal null} if this visitor is not interested in visiting this default value. The 'name' + * parameters passed to the methods of this annotation visitor are ignored. Moreover, exacly one + * visit method must be called on this annotation visitor, followed by visitEnd. */ public AnnotationVisitor visitAnnotationDefault() { if (mv != null) { @@ -108,9 +109,9 @@ public abstract class MethodVisitor { * Visits an annotation of this method. * * @param descriptor the class descriptor of the annotation class. - * @param visible {@literal true} if the annotation is visible at runtime. + * @param visible {@literal true} if the annotation is visible at runtime. * @return a visitor to visit the annotation values, or {@literal null} if this visitor is not - * interested in visiting this annotation. + * interested in visiting this annotation. */ public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) { if (mv != null) { @@ -122,18 +123,19 @@ public abstract class MethodVisitor { /** * Visits an annotation on a type in the method signature. * - * @param typeRef a reference to the annotated type. The sort of this type reference must be - * {@link TypeReference#METHOD_TYPE_PARAMETER}, {@link - * TypeReference#METHOD_TYPE_PARAMETER_BOUND}, {@link TypeReference#METHOD_RETURN}, {@link - * TypeReference#METHOD_RECEIVER}, {@link TypeReference#METHOD_FORMAL_PARAMETER} or {@link - * TypeReference#THROWS}. See {@link TypeReference}. - * @param typePath the path to the annotated type argument, wildcard bound, array element type, or - * static inner type within 'typeRef'. May be {@literal null} if the annotation targets - * 'typeRef' as a whole. + * @param typeRef a reference to the annotated type. The sort of this type reference must be + * {@link TypeReference#METHOD_TYPE_PARAMETER}, + * {@link TypeReference#METHOD_TYPE_PARAMETER_BOUND}, + * {@link TypeReference#METHOD_RETURN}, {@link TypeReference#METHOD_RECEIVER}, + * {@link TypeReference#METHOD_FORMAL_PARAMETER} or + * {@link TypeReference#THROWS}. See {@link TypeReference}. + * @param typePath the path to the annotated type argument, wildcard bound, array element type, + * or static inner type within 'typeRef'. May be {@literal null} if the + * annotation targets 'typeRef' as a whole. * @param descriptor the class descriptor of the annotation class. - * @param visible {@literal true} if the annotation is visible at runtime. + * @param visible {@literal true} if the annotation is visible at runtime. * @return a visitor to visit the annotation values, or {@literal null} if this visitor is not - * interested in visiting this annotation. + * interested in visiting this annotation. */ public AnnotationVisitor visitTypeAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { @@ -152,13 +154,14 @@ public abstract class MethodVisitor { * annotations. * * @param parameterCount the number of method parameters than can have annotations. This number - * must be less or equal than the number of parameter types in the method descriptor. It can - * be strictly less when a method has synthetic parameters and when these parameters are - * ignored when computing parameter indices for the purpose of parameter annotations (see - * https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.18). - * @param visible {@literal true} to define the number of method parameters that can have - * annotations visible at runtime, {@literal false} to define the number of method parameters - * that can have annotations invisible at runtime. + * must be less or equal than the number of parameter types in the method + * descriptor. It can be strictly less when a method has synthetic + * parameters and when these parameters are ignored when computing parameter + * indices for the purpose of parameter annotations (see + * https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.18). + * @param visible {@literal true} to define the number of method parameters that can have + * annotations visible at runtime, {@literal false} to define the number of + * method parameters that can have annotations invisible at runtime. */ public void visitAnnotableParameterCount(final int parameterCount, final boolean visible) { if (mv != null) { @@ -169,16 +172,17 @@ public abstract class MethodVisitor { /** * Visits an annotation of a parameter this method. * - * @param parameter the parameter index. This index must be strictly smaller than the number of - * parameters in the method descriptor, and strictly smaller than the parameter count - * specified in {@link #visitAnnotableParameterCount}. Important note: a parameter index i - * is not required to correspond to the i'th parameter descriptor in the method - * descriptor, in particular in case of synthetic parameters (see - * https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.18). + * @param parameter the parameter index. This index must be strictly smaller than the number of + * parameters in the method descriptor, and strictly smaller than the parameter + * count specified in {@link #visitAnnotableParameterCount}. Important note: + * a parameter index i is not required to correspond to the i'th parameter + * descriptor in the method descriptor, in particular in case of synthetic + * parameters (see + * https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.18). * @param descriptor the class descriptor of the annotation class. - * @param visible {@literal true} if the annotation is visible at runtime. + * @param visible {@literal true} if the annotation is visible at runtime. * @return a visitor to visit the annotation values, or {@literal null} if this visitor is not - * interested in visiting this annotation. + * interested in visiting this annotation. */ public AnnotationVisitor visitParameterAnnotation( final int parameter, final String descriptor, final boolean visible) { @@ -199,7 +203,9 @@ public abstract class MethodVisitor { } } - /** Starts the visit of the method's code, if any (i.e. non abstract method). */ + /** + * Starts the visit of the method's code, if any (i.e. non abstract method). + */ public void visitCode() { if (mv != null) { mv.visitCode(); @@ -213,8 +219,8 @@ public abstract class MethodVisitor { * exception handler block. The visited types must describe the values of the local variables and * of the operand stack elements just before i is executed.
*
- * (*) this is mandatory only for classes whose version is greater than or equal to {@link - * Opcodes#V1_6}.
+ * (*) this is mandatory only for classes whose version is greater than or equal to + * {@link Opcodes#V1_6}.
*
* The frames of a method must be given either in expanded form, or in compressed form (all frames * must use the same format, i.e. you must not mix expanded and compressed frames within a single @@ -245,23 +251,25 @@ public abstract class MethodVisitor { * implicit and must not be visited. Also, it is illegal to visit two or more frames for the same * code location (i.e., at least one instruction must be visited between two calls to visitFrame). * - * @param type the type of this stack map frame. Must be {@link Opcodes#F_NEW} for expanded - * frames, or {@link Opcodes#F_FULL}, {@link Opcodes#F_APPEND}, {@link Opcodes#F_CHOP}, {@link - * Opcodes#F_SAME} or {@link Opcodes#F_APPEND}, {@link Opcodes#F_SAME1} for compressed frames. + * @param type the type of this stack map frame. Must be {@link Opcodes#F_NEW} for expanded + * frames, or {@link Opcodes#F_FULL}, {@link Opcodes#F_APPEND}, + * {@link Opcodes#F_CHOP}, {@link Opcodes#F_SAME} or {@link Opcodes#F_APPEND}, + * {@link Opcodes#F_SAME1} for compressed frames. * @param numLocal the number of local variables in the visited frame. - * @param local the local variable types in this frame. This array must not be modified. Primitive - * types are represented by {@link Opcodes#TOP}, {@link Opcodes#INTEGER}, {@link - * Opcodes#FLOAT}, {@link Opcodes#LONG}, {@link Opcodes#DOUBLE}, {@link Opcodes#NULL} or - * {@link Opcodes#UNINITIALIZED_THIS} (long and double are represented by a single element). - * Reference types are represented by String objects (representing internal names), and - * uninitialized types by Label objects (this label designates the NEW instruction that - * created this uninitialized value). + * @param local the local variable types in this frame. This array must not be modified. + * Primitive types are represented by {@link Opcodes#TOP}, + * {@link Opcodes#INTEGER}, {@link Opcodes#FLOAT}, {@link Opcodes#LONG}, + * {@link Opcodes#DOUBLE}, {@link Opcodes#NULL} or + * {@link Opcodes#UNINITIALIZED_THIS} (long and double are represented by a single + * element). Reference types are represented by String objects (representing + * internal names), and uninitialized types by Label objects (this label + * designates the NEW instruction that created this uninitialized value). * @param numStack the number of operand stack elements in the visited frame. - * @param stack the operand stack types in this frame. This array must not be modified. Its - * content has the same format as the "local" array. + * @param stack the operand stack types in this frame. This array must not be modified. Its + * content has the same format as the "local" array. * @throws IllegalStateException if a frame is visited just after another one, without any - * instruction between the two (unless this frame is a Opcodes#F_SAME frame, in which case it - * is silently ignored). + * instruction between the two (unless this frame is a + * Opcodes#F_SAME frame, in which case it is silently ignored). */ public void visitFrame( final int type, @@ -282,15 +290,16 @@ public abstract class MethodVisitor { * Visits a zero operand instruction. * * @param opcode the opcode of the instruction to be visited. This opcode is either NOP, - * ACONST_NULL, ICONST_M1, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, - * LCONST_0, LCONST_1, FCONST_0, FCONST_1, FCONST_2, DCONST_0, DCONST_1, IALOAD, LALOAD, - * FALOAD, DALOAD, AALOAD, BALOAD, CALOAD, SALOAD, IASTORE, LASTORE, FASTORE, DASTORE, - * AASTORE, BASTORE, CASTORE, SASTORE, POP, POP2, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, - * SWAP, IADD, LADD, FADD, DADD, ISUB, LSUB, FSUB, DSUB, IMUL, LMUL, FMUL, DMUL, IDIV, LDIV, - * FDIV, DDIV, IREM, LREM, FREM, DREM, INEG, LNEG, FNEG, DNEG, ISHL, LSHL, ISHR, LSHR, IUSHR, - * LUSHR, IAND, LAND, IOR, LOR, IXOR, LXOR, I2L, I2F, I2D, L2I, L2F, L2D, F2I, F2L, F2D, D2I, - * D2L, D2F, I2B, I2C, I2S, LCMP, FCMPL, FCMPG, DCMPL, DCMPG, IRETURN, LRETURN, FRETURN, - * DRETURN, ARETURN, RETURN, ARRAYLENGTH, ATHROW, MONITORENTER, or MONITOREXIT. + * ACONST_NULL, ICONST_M1, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, + * ICONST_5, LCONST_0, LCONST_1, FCONST_0, FCONST_1, FCONST_2, DCONST_0, DCONST_1, + * IALOAD, LALOAD, FALOAD, DALOAD, AALOAD, BALOAD, CALOAD, SALOAD, IASTORE, LASTORE, + * FASTORE, DASTORE, AASTORE, BASTORE, CASTORE, SASTORE, POP, POP2, DUP, DUP_X1, + * DUP_X2, DUP2, DUP2_X1, DUP2_X2, SWAP, IADD, LADD, FADD, DADD, ISUB, LSUB, FSUB, + * DSUB, IMUL, LMUL, FMUL, DMUL, IDIV, LDIV, FDIV, DDIV, IREM, LREM, FREM, DREM, + * INEG, LNEG, FNEG, DNEG, ISHL, LSHL, ISHR, LSHR, IUSHR, LUSHR, IAND, LAND, IOR, + * LOR, IXOR, LXOR, I2L, I2F, I2D, L2I, L2F, L2D, F2I, F2L, F2D, D2I, D2L, D2F, I2B, + * I2C, I2S, LCMP, FCMPL, FCMPG, DCMPL, DCMPG, IRETURN, LRETURN, FRETURN, DRETURN, + * ARETURN, RETURN, ARRAYLENGTH, ATHROW, MONITORENTER, or MONITOREXIT. */ public void visitInsn(final int opcode) { if (mv != null) { @@ -301,16 +310,18 @@ public abstract class MethodVisitor { /** * Visits an instruction with a single int operand. * - * @param opcode the opcode of the instruction to be visited. This opcode is either BIPUSH, SIPUSH - * or NEWARRAY. - * @param operand the operand of the instruction to be visited.
- * When opcode is BIPUSH, operand value should be between Byte.MIN_VALUE and Byte.MAX_VALUE. - *
- * When opcode is SIPUSH, operand value should be between Short.MIN_VALUE and Short.MAX_VALUE. - *
- * When opcode is NEWARRAY, operand value should be one of {@link Opcodes#T_BOOLEAN}, {@link - * Opcodes#T_CHAR}, {@link Opcodes#T_FLOAT}, {@link Opcodes#T_DOUBLE}, {@link Opcodes#T_BYTE}, - * {@link Opcodes#T_SHORT}, {@link Opcodes#T_INT} or {@link Opcodes#T_LONG}. + * @param opcode the opcode of the instruction to be visited. This opcode is either BIPUSH, + * SIPUSH or NEWARRAY. + * @param operand the operand of the instruction to be visited.
When opcode is BIPUSH, operand + * value should be between Byte.MIN_VALUE and Byte.MAX_VALUE. + *
+ * When opcode is SIPUSH, operand value should be between Short.MIN_VALUE and + * Short.MAX_VALUE. + *
+ * When opcode is NEWARRAY, operand value should be one of + * {@link Opcodes#T_BOOLEAN}, {@link Opcodes#T_CHAR}, {@link Opcodes#T_FLOAT}, + * {@link Opcodes#T_DOUBLE}, {@link Opcodes#T_BYTE}, {@link Opcodes#T_SHORT}, + * {@link Opcodes#T_INT} or {@link Opcodes#T_LONG}. */ public void visitIntInsn(final int opcode, final int operand) { if (mv != null) { @@ -323,9 +334,10 @@ public abstract class MethodVisitor { * or stores the value of a local variable. * * @param opcode the opcode of the local variable instruction to be visited. This opcode is either - * ILOAD, LLOAD, FLOAD, DLOAD, ALOAD, ISTORE, LSTORE, FSTORE, DSTORE, ASTORE or RET. - * @param var the operand of the instruction to be visited. This operand is the index of a local - * variable. + * ILOAD, LLOAD, FLOAD, DLOAD, ALOAD, ISTORE, LSTORE, FSTORE, DSTORE, ASTORE or + * RET. + * @param var the operand of the instruction to be visited. This operand is the index of a + * local variable. */ public void visitVarInsn(final int opcode, final int var) { if (mv != null) { @@ -338,9 +350,9 @@ public abstract class MethodVisitor { * a class as parameter. * * @param opcode the opcode of the type instruction to be visited. This opcode is either NEW, - * ANEWARRAY, CHECKCAST or INSTANCEOF. - * @param type the operand of the instruction to be visited. This operand must be the internal - * name of an object or array class (see {@link Type#getInternalName()}). + * ANEWARRAY, CHECKCAST or INSTANCEOF. + * @param type the operand of the instruction to be visited. This operand must be the internal + * name of an object or array class (see {@link Type#getInternalName()}). */ public void visitTypeInsn(final int opcode, final String type) { if (mv != null) { @@ -352,10 +364,11 @@ public abstract class MethodVisitor { * Visits a field instruction. A field instruction is an instruction that loads or stores the * value of a field of an object. * - * @param opcode the opcode of the type instruction to be visited. This opcode is either - * GETSTATIC, PUTSTATIC, GETFIELD or PUTFIELD. - * @param owner the internal name of the field's owner class (see {@link Type#getInternalName()}). - * @param name the field's name. + * @param opcode the opcode of the type instruction to be visited. This opcode is either + * GETSTATIC, PUTSTATIC, GETFIELD or PUTFIELD. + * @param owner the internal name of the field's owner class (see + * {@link Type#getInternalName()}). + * @param name the field's name. * @param descriptor the field's descriptor (see {@link Type}). */ public void visitFieldInsn( @@ -368,11 +381,11 @@ public abstract class MethodVisitor { /** * Visits a method instruction. A method instruction is an instruction that invokes a method. * - * @param opcode the opcode of the type instruction to be visited. This opcode is either - * INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or INVOKEINTERFACE. - * @param owner the internal name of the method's owner class (see {@link - * Type#getInternalName()}). - * @param name the method's name. + * @param opcode the opcode of the type instruction to be visited. This opcode is either + * INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or INVOKEINTERFACE. + * @param owner the internal name of the method's owner class (see + * {@link Type#getInternalName()}). + * @param name the method's name. * @param descriptor the method's descriptor (see {@link Type}). * @deprecated use {@link #visitMethodInsn(int, String, String, String, boolean)} instead. */ @@ -386,12 +399,12 @@ public abstract class MethodVisitor { /** * Visits a method instruction. A method instruction is an instruction that invokes a method. * - * @param opcode the opcode of the type instruction to be visited. This opcode is either - * INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or INVOKEINTERFACE. - * @param owner the internal name of the method's owner class (see {@link - * Type#getInternalName()}). - * @param name the method's name. - * @param descriptor the method's descriptor (see {@link Type}). + * @param opcode the opcode of the type instruction to be visited. This opcode is either + * INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or INVOKEINTERFACE. + * @param owner the internal name of the method's owner class (see + * {@link Type#getInternalName()}). + * @param name the method's name. + * @param descriptor the method's descriptor (see {@link Type}). * @param isInterface if the method's owner class is an processer. */ public void visitMethodInsn( @@ -415,13 +428,15 @@ public abstract class MethodVisitor { /** * Visits an invokedynamic instruction. * - * @param name the method's name. - * @param descriptor the method's descriptor (see {@link Type}). - * @param bootstrapMethodHandle the bootstrap method. + * @param name the method's name. + * @param descriptor the method's descriptor (see {@link Type}). + * @param bootstrapMethodHandle the bootstrap method. * @param bootstrapMethodArguments the bootstrap method constant arguments. Each argument must be - * an {@link Integer}, {@link Float}, {@link Long}, {@link Double}, {@link String}, {@link - * Type}, {@link Handle} or {@link ConstantDynamic} value. This method is allowed to modify - * the content of the array so a caller should expect that this array may change. + * an {@link Integer}, {@link Float}, {@link Long}, + * {@link Double}, {@link String}, {@link Type}, {@link Handle} or + * {@link ConstantDynamic} value. This method is allowed to modify + * the content of the array so a caller should expect that this + * array may change. */ public void visitInvokeDynamicInsn( final String name, @@ -441,10 +456,10 @@ public abstract class MethodVisitor { * instruction. * * @param opcode the opcode of the type instruction to be visited. This opcode is either IFEQ, - * IFNE, IFLT, IFGE, IFGT, IFLE, IF_ICMPEQ, IF_ICMPNE, IF_ICMPLT, IF_ICMPGE, IF_ICMPGT, - * IF_ICMPLE, IF_ACMPEQ, IF_ACMPNE, GOTO, JSR, IFNULL or IFNONNULL. - * @param label the operand of the instruction to be visited. This operand is a label that - * designates the instruction to which the jump instruction may jump. + * IFNE, IFLT, IFGE, IFGT, IFLE, IF_ICMPEQ, IF_ICMPNE, IF_ICMPLT, IF_ICMPGE, + * IF_ICMPGT, IF_ICMPLE, IF_ACMPEQ, IF_ACMPNE, GOTO, JSR, IFNULL or IFNONNULL. + * @param label the operand of the instruction to be visited. This operand is a label that + * designates the instruction to which the jump instruction may jump. */ public void visitJumpInsn(final int opcode, final Label label) { if (mv != null) { @@ -503,17 +518,18 @@ public abstract class MethodVisitor { * } * * - * @param value the constant to be loaded on the stack. This parameter must be a non null {@link - * Integer}, a {@link Float}, a {@link Long}, a {@link Double}, a {@link String}, a {@link - * Type} of OBJECT or ARRAY sort for {@code .class} constants, for classes whose version is - * 49, a {@link Type} of METHOD sort for MethodType, a {@link Handle} for MethodHandle - * constants, for classes whose version is 51 or a {@link ConstantDynamic} for a constant - * dynamic for classes whose version is 55. + * @param value the constant to be loaded on the stack. This parameter must be a non null + * {@link Integer}, a {@link Float}, a {@link Long}, a {@link Double}, a + * {@link String}, a {@link Type} of OBJECT or ARRAY sort for {@code .class} + * constants, for classes whose version is 49, a {@link Type} of METHOD sort for + * MethodType, a {@link Handle} for MethodHandle constants, for classes whose version + * is 51 or a {@link ConstantDynamic} for a constant dynamic for classes whose + * version is 55. */ public void visitLdcInsn(final Object value) { if (api < Opcodes.ASM5 && (value instanceof Handle - || (value instanceof Type && ((Type) value).getSort() == Type.METHOD))) { + || (value instanceof Type && ((Type) value).getSort() == Type.METHOD))) { throw new UnsupportedOperationException(REQUIRES_ASM5); } if (api < Opcodes.ASM7 && value instanceof ConstantDynamic) { @@ -527,7 +543,7 @@ public abstract class MethodVisitor { /** * Visits an IINC instruction. * - * @param var index of the local variable to be incremented. + * @param var index of the local variable to be incremented. * @param increment amount to increment the local variable by. */ public void visitIincInsn(final int var, final int increment) { @@ -539,11 +555,11 @@ public abstract class MethodVisitor { /** * Visits a TABLESWITCH instruction. * - * @param min the minimum key value. - * @param max the maximum key value. - * @param dflt beginning of the default handler block. + * @param min the minimum key value. + * @param max the maximum key value. + * @param dflt beginning of the default handler block. * @param labels beginnings of the handler blocks. {@code labels[i]} is the beginning of the - * handler block for the {@code min + i} key. + * handler block for the {@code min + i} key. */ public void visitTableSwitchInsn( final int min, final int max, final Label dflt, final Label... labels) { @@ -555,10 +571,10 @@ public abstract class MethodVisitor { /** * Visits a LOOKUPSWITCH instruction. * - * @param dflt beginning of the default handler block. - * @param keys the values of the keys. + * @param dflt beginning of the default handler block. + * @param keys the values of the keys. * @param labels beginnings of the handler blocks. {@code labels[i]} is the beginning of the - * handler block for the {@code keys[i]} key. + * handler block for the {@code keys[i]} key. */ public void visitLookupSwitchInsn(final Label dflt, final int[] keys, final Label[] labels) { if (mv != null) { @@ -569,7 +585,7 @@ public abstract class MethodVisitor { /** * Visits a MULTIANEWARRAY instruction. * - * @param descriptor an array type descriptor (see {@link Type}). + * @param descriptor an array type descriptor (see {@link Type}). * @param numDimensions the number of dimensions of the array to allocate. */ public void visitMultiANewArrayInsn(final String descriptor, final int numDimensions) { @@ -582,20 +598,22 @@ public abstract class MethodVisitor { * Visits an annotation on an instruction. This method must be called just after the * annotated instruction. It can be called several times for the same instruction. * - * @param typeRef a reference to the annotated type. The sort of this type reference must be - * {@link TypeReference#INSTANCEOF}, {@link TypeReference#NEW}, {@link - * TypeReference#CONSTRUCTOR_REFERENCE}, {@link TypeReference#METHOD_REFERENCE}, {@link - * TypeReference#CAST}, {@link TypeReference#CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT}, {@link - * TypeReference#METHOD_INVOCATION_TYPE_ARGUMENT}, {@link - * TypeReference#CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT}, or {@link - * TypeReference#METHOD_REFERENCE_TYPE_ARGUMENT}. See {@link TypeReference}. - * @param typePath the path to the annotated type argument, wildcard bound, array element type, or - * static inner type within 'typeRef'. May be {@literal null} if the annotation targets - * 'typeRef' as a whole. + * @param typeRef a reference to the annotated type. The sort of this type reference must be + * {@link TypeReference#INSTANCEOF}, {@link TypeReference#NEW}, + * {@link TypeReference#CONSTRUCTOR_REFERENCE}, + * {@link TypeReference#METHOD_REFERENCE}, {@link TypeReference#CAST}, + * {@link TypeReference#CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT}, + * {@link TypeReference#METHOD_INVOCATION_TYPE_ARGUMENT}, + * {@link TypeReference#CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT}, or + * {@link TypeReference#METHOD_REFERENCE_TYPE_ARGUMENT}. See + * {@link TypeReference}. + * @param typePath the path to the annotated type argument, wildcard bound, array element type, + * or static inner type within 'typeRef'. May be {@literal null} if the + * annotation targets 'typeRef' as a whole. * @param descriptor the class descriptor of the annotation class. - * @param visible {@literal true} if the annotation is visible at runtime. + * @param visible {@literal true} if the annotation is visible at runtime. * @return a visitor to visit the annotation values, or {@literal null} if this visitor is not - * interested in visiting this annotation. + * interested in visiting this annotation. */ public AnnotationVisitor visitInsnAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { @@ -615,13 +633,13 @@ public abstract class MethodVisitor { /** * Visits a try catch block. * - * @param start the beginning of the exception handler's scope (inclusive). - * @param end the end of the exception handler's scope (exclusive). + * @param start the beginning of the exception handler's scope (inclusive). + * @param end the end of the exception handler's scope (exclusive). * @param handler the beginning of the exception handler's code. - * @param type the internal name of the type of exceptions handled by the handler, or {@literal - * null} to catch any exceptions (for "finally" blocks). + * @param type the internal name of the type of exceptions handled by the handler, or + * {@literal null} to catch any exceptions (for "finally" blocks). * @throws IllegalArgumentException if one of the labels has already been visited by this visitor - * (by the {@link #visitLabel} method). + * (by the {@link #visitLabel} method). */ public void visitTryCatchBlock( final Label start, final Label end, final Label handler, final String type) { @@ -635,15 +653,15 @@ public abstract class MethodVisitor { * {@link #visitTryCatchBlock} for the annotated exception handler. It can be called several times * for the same exception handler. * - * @param typeRef a reference to the annotated type. The sort of this type reference must be - * {@link TypeReference#EXCEPTION_PARAMETER}. See {@link TypeReference}. - * @param typePath the path to the annotated type argument, wildcard bound, array element type, or - * static inner type within 'typeRef'. May be {@literal null} if the annotation targets - * 'typeRef' as a whole. + * @param typeRef a reference to the annotated type. The sort of this type reference must be + * {@link TypeReference#EXCEPTION_PARAMETER}. See {@link TypeReference}. + * @param typePath the path to the annotated type argument, wildcard bound, array element type, + * or static inner type within 'typeRef'. May be {@literal null} if the + * annotation targets 'typeRef' as a whole. * @param descriptor the class descriptor of the annotation class. - * @param visible {@literal true} if the annotation is visible at runtime. + * @param visible {@literal true} if the annotation is visible at runtime. * @return a visitor to visit the annotation values, or {@literal null} if this visitor is not - * interested in visiting this annotation. + * interested in visiting this annotation. */ public AnnotationVisitor visitTryCatchAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { @@ -659,16 +677,17 @@ public abstract class MethodVisitor { /** * Visits a local variable declaration. * - * @param name the name of a local variable. + * @param name the name of a local variable. * @param descriptor the type descriptor of this local variable. - * @param signature the type signature of this local variable. May be {@literal null} if the local - * variable type does not use generic types. - * @param start the first instruction corresponding to the scope of this local variable - * (inclusive). - * @param end the last instruction corresponding to the scope of this local variable (exclusive). - * @param index the local variable's index. + * @param signature the type signature of this local variable. May be {@literal null} if the + * local variable type does not use generic types. + * @param start the first instruction corresponding to the scope of this local variable + * (inclusive). + * @param end the last instruction corresponding to the scope of this local variable + * (exclusive). + * @param index the local variable's index. * @throws IllegalArgumentException if one of the labels has not already been visited by this - * visitor (by the {@link #visitLabel} method). + * visitor (by the {@link #visitLabel} method). */ public void visitLocalVariable( final String name, @@ -685,22 +704,23 @@ public abstract class MethodVisitor { /** * Visits an annotation on a local variable type. * - * @param typeRef a reference to the annotated type. The sort of this type reference must be - * {@link TypeReference#LOCAL_VARIABLE} or {@link TypeReference#RESOURCE_VARIABLE}. See {@link - * TypeReference}. - * @param typePath the path to the annotated type argument, wildcard bound, array element type, or - * static inner type within 'typeRef'. May be {@literal null} if the annotation targets - * 'typeRef' as a whole. - * @param start the fist instructions corresponding to the continuous ranges that make the scope - * of this local variable (inclusive). - * @param end the last instructions corresponding to the continuous ranges that make the scope of - * this local variable (exclusive). This array must have the same size as the 'start' array. - * @param index the local variable's index in each range. This array must have the same size as - * the 'start' array. + * @param typeRef a reference to the annotated type. The sort of this type reference must be + * {@link TypeReference#LOCAL_VARIABLE} or + * {@link TypeReference#RESOURCE_VARIABLE}. See {@link TypeReference}. + * @param typePath the path to the annotated type argument, wildcard bound, array element type, + * or static inner type within 'typeRef'. May be {@literal null} if the + * annotation targets 'typeRef' as a whole. + * @param start the fist instructions corresponding to the continuous ranges that make the + * scope of this local variable (inclusive). + * @param end the last instructions corresponding to the continuous ranges that make the + * scope of this local variable (exclusive). This array must have the same size + * as the 'start' array. + * @param index the local variable's index in each range. This array must have the same size + * as the 'start' array. * @param descriptor the class descriptor of the annotation class. - * @param visible {@literal true} if the annotation is visible at runtime. + * @param visible {@literal true} if the annotation is visible at runtime. * @return a visitor to visit the annotation values, or {@literal null} if this visitor is not - * interested in visiting this annotation. + * interested in visiting this annotation. */ public AnnotationVisitor visitLocalVariableAnnotation( final int typeRef, @@ -723,11 +743,11 @@ public abstract class MethodVisitor { /** * Visits a line number declaration. * - * @param line a line number. This number refers to the source file from which the class was - * compiled. + * @param line a line number. This number refers to the source file from which the class was + * compiled. * @param start the first instruction corresponding to this line number. * @throws IllegalArgumentException if {@code start} has not already been visited by this visitor - * (by the {@link #visitLabel} method). + * (by the {@link #visitLabel} method). */ public void visitLineNumber(final int line, final Label start) { if (mv != null) { @@ -738,7 +758,7 @@ public abstract class MethodVisitor { /** * Visits the maximum stack size and the maximum number of local variables of the method. * - * @param maxStack maximum stack size of the method. + * @param maxStack maximum stack size of the method. * @param maxLocals maximum number of local variables for the method. */ public void visitMaxs(final int maxStack, final int maxLocals) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodWriter.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodWriter.java index bdc02cdc..82882955 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodWriter.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/MethodWriter.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -7,11 +5,13 @@ package cn.universal.core.engine.asm; * Java Virtual Machine Specification (JVMS). @Author Eric Bruneton @Author Eugene Kuleshov * * @see JVMS - * 4.6 + * 4.6 */ final class MethodWriter extends MethodVisitor { - /** Indicates that nothing must be computed. */ + /** + * Indicates that nothing must be computed. + */ static final int COMPUTE_NOTHING = 0; /** @@ -42,7 +42,9 @@ final class MethodWriter extends MethodVisitor { */ static final int COMPUTE_ALL_FRAMES = 4; - /** Indicates that {@link #STACK_SIZE_DELTA} is not applicable (not constant or never used). */ + /** + * Indicates that {@link #STACK_SIZE_DELTA} is not applicable (not constant or never used). + */ private static final int NA = 0; /** @@ -52,211 +54,213 @@ final class MethodWriter extends MethodVisitor { * @see JVMS 6 */ private static final int[] STACK_SIZE_DELTA = { - 0, // nop = 0 (0x0) - 1, // aconst_null = 1 (0x1) - 1, // iconst_m1 = 2 (0x2) - 1, // iconst_0 = 3 (0x3) - 1, // iconst_1 = 4 (0x4) - 1, // iconst_2 = 5 (0x5) - 1, // iconst_3 = 6 (0x6) - 1, // iconst_4 = 7 (0x7) - 1, // iconst_5 = 8 (0x8) - 2, // lconst_0 = 9 (0x9) - 2, // lconst_1 = 10 (0xa) - 1, // fconst_0 = 11 (0xb) - 1, // fconst_1 = 12 (0xc) - 1, // fconst_2 = 13 (0xd) - 2, // dconst_0 = 14 (0xe) - 2, // dconst_1 = 15 (0xf) - 1, // bipush = 16 (0x10) - 1, // sipush = 17 (0x11) - 1, // ldc = 18 (0x12) - NA, // ldc_w = 19 (0x13) - NA, // ldc2_w = 20 (0x14) - 1, // iload = 21 (0x15) - 2, // lload = 22 (0x16) - 1, // fload = 23 (0x17) - 2, // dload = 24 (0x18) - 1, // aload = 25 (0x19) - NA, // iload_0 = 26 (0x1a) - NA, // iload_1 = 27 (0x1b) - NA, // iload_2 = 28 (0x1c) - NA, // iload_3 = 29 (0x1d) - NA, // lload_0 = 30 (0x1e) - NA, // lload_1 = 31 (0x1f) - NA, // lload_2 = 32 (0x20) - NA, // lload_3 = 33 (0x21) - NA, // fload_0 = 34 (0x22) - NA, // fload_1 = 35 (0x23) - NA, // fload_2 = 36 (0x24) - NA, // fload_3 = 37 (0x25) - NA, // dload_0 = 38 (0x26) - NA, // dload_1 = 39 (0x27) - NA, // dload_2 = 40 (0x28) - NA, // dload_3 = 41 (0x29) - NA, // aload_0 = 42 (0x2a) - NA, // aload_1 = 43 (0x2b) - NA, // aload_2 = 44 (0x2c) - NA, // aload_3 = 45 (0x2d) - -1, // iaload = 46 (0x2e) - 0, // laload = 47 (0x2f) - -1, // faload = 48 (0x30) - 0, // daload = 49 (0x31) - -1, // aaload = 50 (0x32) - -1, // baload = 51 (0x33) - -1, // caload = 52 (0x34) - -1, // saload = 53 (0x35) - -1, // istore = 54 (0x36) - -2, // lstore = 55 (0x37) - -1, // fstore = 56 (0x38) - -2, // dstore = 57 (0x39) - -1, // astore = 58 (0x3a) - NA, // istore_0 = 59 (0x3b) - NA, // istore_1 = 60 (0x3c) - NA, // istore_2 = 61 (0x3d) - NA, // istore_3 = 62 (0x3e) - NA, // lstore_0 = 63 (0x3f) - NA, // lstore_1 = 64 (0x40) - NA, // lstore_2 = 65 (0x41) - NA, // lstore_3 = 66 (0x42) - NA, // fstore_0 = 67 (0x43) - NA, // fstore_1 = 68 (0x44) - NA, // fstore_2 = 69 (0x45) - NA, // fstore_3 = 70 (0x46) - NA, // dstore_0 = 71 (0x47) - NA, // dstore_1 = 72 (0x48) - NA, // dstore_2 = 73 (0x49) - NA, // dstore_3 = 74 (0x4a) - NA, // astore_0 = 75 (0x4b) - NA, // astore_1 = 76 (0x4c) - NA, // astore_2 = 77 (0x4d) - NA, // astore_3 = 78 (0x4e) - -3, // iastore = 79 (0x4f) - -4, // lastore = 80 (0x50) - -3, // fastore = 81 (0x51) - -4, // dastore = 82 (0x52) - -3, // aastore = 83 (0x53) - -3, // bastore = 84 (0x54) - -3, // castore = 85 (0x55) - -3, // sastore = 86 (0x56) - -1, // pop = 87 (0x57) - -2, // pop2 = 88 (0x58) - 1, // dup = 89 (0x59) - 1, // dup_x1 = 90 (0x5a) - 1, // dup_x2 = 91 (0x5b) - 2, // dup2 = 92 (0x5c) - 2, // dup2_x1 = 93 (0x5d) - 2, // dup2_x2 = 94 (0x5e) - 0, // swap = 95 (0x5f) - -1, // iadd = 96 (0x60) - -2, // ladd = 97 (0x61) - -1, // fadd = 98 (0x62) - -2, // dadd = 99 (0x63) - -1, // isub = 100 (0x64) - -2, // lsub = 101 (0x65) - -1, // fsub = 102 (0x66) - -2, // dsub = 103 (0x67) - -1, // imul = 104 (0x68) - -2, // lmul = 105 (0x69) - -1, // fmul = 106 (0x6a) - -2, // dmul = 107 (0x6b) - -1, // idiv = 108 (0x6c) - -2, // ldiv = 109 (0x6d) - -1, // fdiv = 110 (0x6e) - -2, // ddiv = 111 (0x6f) - -1, // irem = 112 (0x70) - -2, // lrem = 113 (0x71) - -1, // frem = 114 (0x72) - -2, // drem = 115 (0x73) - 0, // ineg = 116 (0x74) - 0, // lneg = 117 (0x75) - 0, // fneg = 118 (0x76) - 0, // dneg = 119 (0x77) - -1, // ishl = 120 (0x78) - -1, // lshl = 121 (0x79) - -1, // ishr = 122 (0x7a) - -1, // lshr = 123 (0x7b) - -1, // iushr = 124 (0x7c) - -1, // lushr = 125 (0x7d) - -1, // iand = 126 (0x7e) - -2, // land = 127 (0x7f) - -1, // ior = 128 (0x80) - -2, // lor = 129 (0x81) - -1, // ixor = 130 (0x82) - -2, // lxor = 131 (0x83) - 0, // iinc = 132 (0x84) - 1, // i2l = 133 (0x85) - 0, // i2f = 134 (0x86) - 1, // i2d = 135 (0x87) - -1, // l2i = 136 (0x88) - -1, // l2f = 137 (0x89) - 0, // l2d = 138 (0x8a) - 0, // f2i = 139 (0x8b) - 1, // f2l = 140 (0x8c) - 1, // f2d = 141 (0x8d) - -1, // d2i = 142 (0x8e) - 0, // d2l = 143 (0x8f) - -1, // d2f = 144 (0x90) - 0, // i2b = 145 (0x91) - 0, // i2c = 146 (0x92) - 0, // i2s = 147 (0x93) - -3, // lcmp = 148 (0x94) - -1, // fcmpl = 149 (0x95) - -1, // fcmpg = 150 (0x96) - -3, // dcmpl = 151 (0x97) - -3, // dcmpg = 152 (0x98) - -1, // ifeq = 153 (0x99) - -1, // ifne = 154 (0x9a) - -1, // iflt = 155 (0x9b) - -1, // ifge = 156 (0x9c) - -1, // ifgt = 157 (0x9d) - -1, // ifle = 158 (0x9e) - -2, // if_icmpeq = 159 (0x9f) - -2, // if_icmpne = 160 (0xa0) - -2, // if_icmplt = 161 (0xa1) - -2, // if_icmpge = 162 (0xa2) - -2, // if_icmpgt = 163 (0xa3) - -2, // if_icmple = 164 (0xa4) - -2, // if_acmpeq = 165 (0xa5) - -2, // if_acmpne = 166 (0xa6) - 0, // goto = 167 (0xa7) - 1, // jsr = 168 (0xa8) - 0, // ret = 169 (0xa9) - -1, // tableswitch = 170 (0xaa) - -1, // lookupswitch = 171 (0xab) - -1, // ireturn = 172 (0xac) - -2, // lreturn = 173 (0xad) - -1, // freturn = 174 (0xae) - -2, // dreturn = 175 (0xaf) - -1, // areturn = 176 (0xb0) - 0, // return = 177 (0xb1) - NA, // getstatic = 178 (0xb2) - NA, // putstatic = 179 (0xb3) - NA, // getfield = 180 (0xb4) - NA, // putfield = 181 (0xb5) - NA, // invokevirtual = 182 (0xb6) - NA, // invokespecial = 183 (0xb7) - NA, // invokestatic = 184 (0xb8) - NA, // invokeinterface = 185 (0xb9) - NA, // invokedynamic = 186 (0xba) - 1, // new = 187 (0xbb) - 0, // newarray = 188 (0xbc) - 0, // anewarray = 189 (0xbd) - 0, // arraylength = 190 (0xbe) - NA, // athrow = 191 (0xbf) - 0, // checkcast = 192 (0xc0) - 0, // instanceof = 193 (0xc1) - -1, // monitorenter = 194 (0xc2) - -1, // monitorexit = 195 (0xc3) - NA, // wide = 196 (0xc4) - NA, // multianewarray = 197 (0xc5) - -1, // ifnull = 198 (0xc6) - -1, // ifnonnull = 199 (0xc7) - NA, // goto_w = 200 (0xc8) - NA // jsr_w = 201 (0xc9) + 0, // nop = 0 (0x0) + 1, // aconst_null = 1 (0x1) + 1, // iconst_m1 = 2 (0x2) + 1, // iconst_0 = 3 (0x3) + 1, // iconst_1 = 4 (0x4) + 1, // iconst_2 = 5 (0x5) + 1, // iconst_3 = 6 (0x6) + 1, // iconst_4 = 7 (0x7) + 1, // iconst_5 = 8 (0x8) + 2, // lconst_0 = 9 (0x9) + 2, // lconst_1 = 10 (0xa) + 1, // fconst_0 = 11 (0xb) + 1, // fconst_1 = 12 (0xc) + 1, // fconst_2 = 13 (0xd) + 2, // dconst_0 = 14 (0xe) + 2, // dconst_1 = 15 (0xf) + 1, // bipush = 16 (0x10) + 1, // sipush = 17 (0x11) + 1, // ldc = 18 (0x12) + NA, // ldc_w = 19 (0x13) + NA, // ldc2_w = 20 (0x14) + 1, // iload = 21 (0x15) + 2, // lload = 22 (0x16) + 1, // fload = 23 (0x17) + 2, // dload = 24 (0x18) + 1, // aload = 25 (0x19) + NA, // iload_0 = 26 (0x1a) + NA, // iload_1 = 27 (0x1b) + NA, // iload_2 = 28 (0x1c) + NA, // iload_3 = 29 (0x1d) + NA, // lload_0 = 30 (0x1e) + NA, // lload_1 = 31 (0x1f) + NA, // lload_2 = 32 (0x20) + NA, // lload_3 = 33 (0x21) + NA, // fload_0 = 34 (0x22) + NA, // fload_1 = 35 (0x23) + NA, // fload_2 = 36 (0x24) + NA, // fload_3 = 37 (0x25) + NA, // dload_0 = 38 (0x26) + NA, // dload_1 = 39 (0x27) + NA, // dload_2 = 40 (0x28) + NA, // dload_3 = 41 (0x29) + NA, // aload_0 = 42 (0x2a) + NA, // aload_1 = 43 (0x2b) + NA, // aload_2 = 44 (0x2c) + NA, // aload_3 = 45 (0x2d) + -1, // iaload = 46 (0x2e) + 0, // laload = 47 (0x2f) + -1, // faload = 48 (0x30) + 0, // daload = 49 (0x31) + -1, // aaload = 50 (0x32) + -1, // baload = 51 (0x33) + -1, // caload = 52 (0x34) + -1, // saload = 53 (0x35) + -1, // istore = 54 (0x36) + -2, // lstore = 55 (0x37) + -1, // fstore = 56 (0x38) + -2, // dstore = 57 (0x39) + -1, // astore = 58 (0x3a) + NA, // istore_0 = 59 (0x3b) + NA, // istore_1 = 60 (0x3c) + NA, // istore_2 = 61 (0x3d) + NA, // istore_3 = 62 (0x3e) + NA, // lstore_0 = 63 (0x3f) + NA, // lstore_1 = 64 (0x40) + NA, // lstore_2 = 65 (0x41) + NA, // lstore_3 = 66 (0x42) + NA, // fstore_0 = 67 (0x43) + NA, // fstore_1 = 68 (0x44) + NA, // fstore_2 = 69 (0x45) + NA, // fstore_3 = 70 (0x46) + NA, // dstore_0 = 71 (0x47) + NA, // dstore_1 = 72 (0x48) + NA, // dstore_2 = 73 (0x49) + NA, // dstore_3 = 74 (0x4a) + NA, // astore_0 = 75 (0x4b) + NA, // astore_1 = 76 (0x4c) + NA, // astore_2 = 77 (0x4d) + NA, // astore_3 = 78 (0x4e) + -3, // iastore = 79 (0x4f) + -4, // lastore = 80 (0x50) + -3, // fastore = 81 (0x51) + -4, // dastore = 82 (0x52) + -3, // aastore = 83 (0x53) + -3, // bastore = 84 (0x54) + -3, // castore = 85 (0x55) + -3, // sastore = 86 (0x56) + -1, // pop = 87 (0x57) + -2, // pop2 = 88 (0x58) + 1, // dup = 89 (0x59) + 1, // dup_x1 = 90 (0x5a) + 1, // dup_x2 = 91 (0x5b) + 2, // dup2 = 92 (0x5c) + 2, // dup2_x1 = 93 (0x5d) + 2, // dup2_x2 = 94 (0x5e) + 0, // swap = 95 (0x5f) + -1, // iadd = 96 (0x60) + -2, // ladd = 97 (0x61) + -1, // fadd = 98 (0x62) + -2, // dadd = 99 (0x63) + -1, // isub = 100 (0x64) + -2, // lsub = 101 (0x65) + -1, // fsub = 102 (0x66) + -2, // dsub = 103 (0x67) + -1, // imul = 104 (0x68) + -2, // lmul = 105 (0x69) + -1, // fmul = 106 (0x6a) + -2, // dmul = 107 (0x6b) + -1, // idiv = 108 (0x6c) + -2, // ldiv = 109 (0x6d) + -1, // fdiv = 110 (0x6e) + -2, // ddiv = 111 (0x6f) + -1, // irem = 112 (0x70) + -2, // lrem = 113 (0x71) + -1, // frem = 114 (0x72) + -2, // drem = 115 (0x73) + 0, // ineg = 116 (0x74) + 0, // lneg = 117 (0x75) + 0, // fneg = 118 (0x76) + 0, // dneg = 119 (0x77) + -1, // ishl = 120 (0x78) + -1, // lshl = 121 (0x79) + -1, // ishr = 122 (0x7a) + -1, // lshr = 123 (0x7b) + -1, // iushr = 124 (0x7c) + -1, // lushr = 125 (0x7d) + -1, // iand = 126 (0x7e) + -2, // land = 127 (0x7f) + -1, // ior = 128 (0x80) + -2, // lor = 129 (0x81) + -1, // ixor = 130 (0x82) + -2, // lxor = 131 (0x83) + 0, // iinc = 132 (0x84) + 1, // i2l = 133 (0x85) + 0, // i2f = 134 (0x86) + 1, // i2d = 135 (0x87) + -1, // l2i = 136 (0x88) + -1, // l2f = 137 (0x89) + 0, // l2d = 138 (0x8a) + 0, // f2i = 139 (0x8b) + 1, // f2l = 140 (0x8c) + 1, // f2d = 141 (0x8d) + -1, // d2i = 142 (0x8e) + 0, // d2l = 143 (0x8f) + -1, // d2f = 144 (0x90) + 0, // i2b = 145 (0x91) + 0, // i2c = 146 (0x92) + 0, // i2s = 147 (0x93) + -3, // lcmp = 148 (0x94) + -1, // fcmpl = 149 (0x95) + -1, // fcmpg = 150 (0x96) + -3, // dcmpl = 151 (0x97) + -3, // dcmpg = 152 (0x98) + -1, // ifeq = 153 (0x99) + -1, // ifne = 154 (0x9a) + -1, // iflt = 155 (0x9b) + -1, // ifge = 156 (0x9c) + -1, // ifgt = 157 (0x9d) + -1, // ifle = 158 (0x9e) + -2, // if_icmpeq = 159 (0x9f) + -2, // if_icmpne = 160 (0xa0) + -2, // if_icmplt = 161 (0xa1) + -2, // if_icmpge = 162 (0xa2) + -2, // if_icmpgt = 163 (0xa3) + -2, // if_icmple = 164 (0xa4) + -2, // if_acmpeq = 165 (0xa5) + -2, // if_acmpne = 166 (0xa6) + 0, // goto = 167 (0xa7) + 1, // jsr = 168 (0xa8) + 0, // ret = 169 (0xa9) + -1, // tableswitch = 170 (0xaa) + -1, // lookupswitch = 171 (0xab) + -1, // ireturn = 172 (0xac) + -2, // lreturn = 173 (0xad) + -1, // freturn = 174 (0xae) + -2, // dreturn = 175 (0xaf) + -1, // areturn = 176 (0xb0) + 0, // return = 177 (0xb1) + NA, // getstatic = 178 (0xb2) + NA, // putstatic = 179 (0xb3) + NA, // getfield = 180 (0xb4) + NA, // putfield = 181 (0xb5) + NA, // invokevirtual = 182 (0xb6) + NA, // invokespecial = 183 (0xb7) + NA, // invokestatic = 184 (0xb8) + NA, // invokeinterface = 185 (0xb9) + NA, // invokedynamic = 186 (0xba) + 1, // new = 187 (0xbb) + 0, // newarray = 188 (0xbc) + 0, // anewarray = 189 (0xbd) + 0, // arraylength = 190 (0xbe) + NA, // athrow = 191 (0xbf) + 0, // checkcast = 192 (0xc0) + 0, // instanceof = 193 (0xc1) + -1, // monitorenter = 194 (0xc2) + -1, // monitorexit = 195 (0xc3) + NA, // wide = 196 (0xc4) + NA, // multianewarray = 197 (0xc5) + -1, // ifnull = 198 (0xc6) + -1, // ifnonnull = 199 (0xc7) + NA, // goto_w = 200 (0xc8) + NA // jsr_w = 201 (0xc9) }; - /** Where the constants used in this MethodWriter must be stored. */ + /** + * Where the constants used in this MethodWriter must be stored. + */ private final SymbolTable symbolTable; // Note: fields are ordered as in the method_info structure, and those related to attributes are @@ -269,27 +273,41 @@ final class MethodWriter extends MethodVisitor { */ private final int accessFlags; - /** The name_index field of the method_info JVMS structure. */ + /** + * The name_index field of the method_info JVMS structure. + */ private final int nameIndex; - /** The name of this method. */ + /** + * The name of this method. + */ private final String name; - /** The descriptor_index field of the method_info JVMS structure. */ + /** + * The descriptor_index field of the method_info JVMS structure. + */ private final int descriptorIndex; - /** The descriptor of this method. */ + /** + * The descriptor of this method. + */ private final String descriptor; // Code attribute fields and sub attributes: - /** The max_stack field of the Code attribute. */ + /** + * The max_stack field of the Code attribute. + */ private int maxStack; - /** The max_locals field of the Code attribute. */ + /** + * The max_locals field of the Code attribute. + */ private int maxLocals; - /** The 'code' field of the Code attribute. */ + /** + * The 'code' field of the Code attribute. + */ private final ByteVector code = new ByteVector(); /** @@ -306,13 +324,19 @@ final class MethodWriter extends MethodVisitor { */ private Handler lastHandler; - /** The line_number_table_length field of the LineNumberTable code attribute. */ + /** + * The line_number_table_length field of the LineNumberTable code attribute. + */ private int lineNumberTableLength; - /** The line_number_table array of the LineNumberTable code attribute, or {@literal null}. */ + /** + * The line_number_table array of the LineNumberTable code attribute, or {@literal null}. + */ private ByteVector lineNumberTable; - /** The local_variable_table_length field of the LocalVariableTable code attribute. */ + /** + * The local_variable_table_length field of the LocalVariableTable code attribute. + */ private int localVariableTableLength; /** @@ -320,19 +344,25 @@ final class MethodWriter extends MethodVisitor { */ private ByteVector localVariableTable; - /** The local_variable_type_table_length field of the LocalVariableTypeTable code attribute. */ + /** + * The local_variable_type_table_length field of the LocalVariableTypeTable code attribute. + */ private int localVariableTypeTableLength; /** - * The local_variable_type_table array of the LocalVariableTypeTable code attribute, or {@literal - * null}. + * The local_variable_type_table array of the LocalVariableTypeTable code attribute, or + * {@literal null}. */ private ByteVector localVariableTypeTable; - /** The number_of_entries field of the StackMapTable code attribute. */ + /** + * The number_of_entries field of the StackMapTable code attribute. + */ private int stackMapTableNumberOfEntries; - /** The 'entries' array of the StackMapTable code attribute. */ + /** + * The 'entries' array of the StackMapTable code attribute. + */ private ByteVector stackMapTableEntries; /** @@ -352,21 +382,27 @@ final class MethodWriter extends MethodVisitor { * {@link Attribute#nextAttribute} field. May be {@literal null}. * *

WARNING: this list stores the attributes in the reverse order of their visit. - * firstAttribute is actually the last attribute visited in {@link #visitAttribute}. The {@link - * #putMethodInfo} method writes the attributes in the order defined by this list, i.e. in the - * reverse order specified by the user. + * firstAttribute is actually the last attribute visited in {@link #visitAttribute}. The + * {@link #putMethodInfo} method writes the attributes in the order defined by this list, i.e. in + * the reverse order specified by the user. */ private Attribute firstCodeAttribute; // Other method_info attributes: - /** The number_of_exceptions field of the Exceptions attribute. */ + /** + * The number_of_exceptions field of the Exceptions attribute. + */ private final int numberOfExceptions; - /** The exception_index_table array of the Exceptions attribute, or {@literal null}. */ + /** + * The exception_index_table array of the Exceptions attribute, or {@literal null}. + */ private final int[] exceptionIndexTable; - /** The signature_index field of the Signature attribute. */ + /** + * The signature_index field of the Signature attribute. + */ private final int signatureIndex; /** @@ -381,7 +417,9 @@ final class MethodWriter extends MethodVisitor { */ private AnnotationWriter lastRuntimeInvisibleAnnotation; - /** The number of method parameters that can have runtime visible annotations, or 0. */ + /** + * The number of method parameters that can have runtime visible annotations, or 0. + */ private int visibleAnnotableParameterCount; /** @@ -391,7 +429,9 @@ final class MethodWriter extends MethodVisitor { */ private AnnotationWriter[] lastRuntimeVisibleParameterAnnotations; - /** The number of method parameters that can have runtime visible annotations, or 0. */ + /** + * The number of method parameters that can have runtime visible annotations, or 0. + */ private int invisibleAnnotableParameterCount; /** @@ -413,23 +453,29 @@ final class MethodWriter extends MethodVisitor { */ private AnnotationWriter lastRuntimeInvisibleTypeAnnotation; - /** The default_value field of the AnnotationDefault attribute, or {@literal null}. */ + /** + * The default_value field of the AnnotationDefault attribute, or {@literal null}. + */ private ByteVector defaultValue; - /** The parameters_count field of the MethodParameters attribute. */ + /** + * The parameters_count field of the MethodParameters attribute. + */ private int parametersCount; - /** The 'parameters' array of the MethodParameters attribute, or {@literal null}. */ + /** + * The 'parameters' array of the MethodParameters attribute, or {@literal null}. + */ private ByteVector parameters; /** - * The first non standard attribute of this method. The next ones can be accessed with the {@link - * Attribute#nextAttribute} field. May be {@literal null}. + * The first non standard attribute of this method. The next ones can be accessed with the + * {@link Attribute#nextAttribute} field. May be {@literal null}. * *

WARNING: this list stores the attributes in the reverse order of their visit. - * firstAttribute is actually the last attribute visited in {@link #visitAttribute}. The {@link - * #putMethodInfo} method writes the attributes in the order defined by this list, i.e. in the - * reverse order specified by the user. + * firstAttribute is actually the last attribute visited in {@link #visitAttribute}. The + * {@link #putMethodInfo} method writes the attributes in the order defined by this list, i.e. in + * the reverse order specified by the user. */ private Attribute firstAttribute; @@ -438,8 +484,9 @@ final class MethodWriter extends MethodVisitor { // ----------------------------------------------------------------------------------------------- /** - * Indicates what must be computed. Must be one of {@link #COMPUTE_ALL_FRAMES}, {@link - * #COMPUTE_INSERTED_FRAMES}, {@link #COMPUTE_MAX_STACK_AND_LOCAL} or {@link #COMPUTE_NOTHING}. + * Indicates what must be computed. Must be one of {@link #COMPUTE_ALL_FRAMES}, + * {@link #COMPUTE_INSERTED_FRAMES}, {@link #COMPUTE_MAX_STACK_AND_LOCAL} or + * {@link #COMPUTE_NOTHING}. */ private final int compute; @@ -456,24 +503,25 @@ final class MethodWriter extends MethodVisitor { private Label lastBasicBlock; /** - * The current basic block, i.e. the basic block of the last visited instruction. When {@link - * #compute} is equal to {@link #COMPUTE_MAX_STACK_AND_LOCAL} or {@link #COMPUTE_ALL_FRAMES}, this - * field is {@literal null} for unreachable code. When {@link #compute} is equal to {@link - * #COMPUTE_MAX_STACK_AND_LOCAL_FROM_FRAMES} or {@link #COMPUTE_INSERTED_FRAMES}, this field stays - * unchanged throughout the whole method (i.e. the whole code is seen as a single basic block; - * indeed, the existing frames are sufficient by hypothesis to compute any intermediate frame - - * and the maximum stack size as well - without using any control flow graph). + * The current basic block, i.e. the basic block of the last visited instruction. When + * {@link #compute} is equal to {@link #COMPUTE_MAX_STACK_AND_LOCAL} or + * {@link #COMPUTE_ALL_FRAMES}, this field is {@literal null} for unreachable code. When + * {@link #compute} is equal to {@link #COMPUTE_MAX_STACK_AND_LOCAL_FROM_FRAMES} or + * {@link #COMPUTE_INSERTED_FRAMES}, this field stays unchanged throughout the whole method (i.e. + * the whole code is seen as a single basic block; indeed, the existing frames are sufficient by + * hypothesis to compute any intermediate frame - and the maximum stack size as well - without + * using any control flow graph). */ private Label currentBasicBlock; /** * The relative stack size after the last visited instruction. This size is relative to the * beginning of {@link #currentBasicBlock}, i.e. the true stack size after the last visited - * instruction is equal to the {@link Label#inputStackSize} of the current basic block plus {@link - * #relativeStackSize}. When {@link #compute} is equal to {@link - * #COMPUTE_MAX_STACK_AND_LOCAL_FROM_FRAMES}, {@link #currentBasicBlock} is always the start of - * the method, so this relative size is also equal to the absolute stack size after the last - * visited instruction. + * instruction is equal to the {@link Label#inputStackSize} of the current basic block plus + * {@link #relativeStackSize}. When {@link #compute} is equal to + * {@link #COMPUTE_MAX_STACK_AND_LOCAL_FROM_FRAMES}, {@link #currentBasicBlock} is always the + * start of the method, so this relative size is also equal to the absolute stack size after the + * last visited instruction. */ private int relativeStackSize; @@ -481,17 +529,21 @@ final class MethodWriter extends MethodVisitor { * The maximum relative stack size after the last visited instruction. This size is relative to * the beginning of {@link #currentBasicBlock}, i.e. the true maximum stack size after the last * visited instruction is equal to the {@link Label#inputStackSize} of the current basic block - * plus {@link #maxRelativeStackSize}.When {@link #compute} is equal to {@link - * #COMPUTE_MAX_STACK_AND_LOCAL_FROM_FRAMES}, {@link #currentBasicBlock} is always the start of - * the method, so this relative size is also equal to the absolute maximum stack size after the - * last visited instruction. + * plus {@link #maxRelativeStackSize}.When {@link #compute} is equal to + * {@link #COMPUTE_MAX_STACK_AND_LOCAL_FROM_FRAMES}, {@link #currentBasicBlock} is always the + * start of the method, so this relative size is also equal to the absolute maximum stack size + * after the last visited instruction. */ private int maxRelativeStackSize; - /** The number of local variables in the last visited stack map frame. */ + /** + * The number of local variables in the last visited stack map frame. + */ private int currentLocals; - /** The bytecode offset of the last frame that was written in {@link #stackMapTableEntries}. */ + /** + * The bytecode offset of the last frame that was written in {@link #stackMapTableEntries}. + */ private int previousFrameOffset; /** @@ -506,19 +558,24 @@ final class MethodWriter extends MethodVisitor { * the number of stack elements. The local variables start at index 3 and are followed by the * operand stack elements. In summary frame[0] = offset, frame[1] = numLocal, frame[2] = numStack. * Local variables and operand stack entries contain abstract types, as defined in {@link Frame}, - * but restricted to {@link Frame#CONSTANT_KIND}, {@link Frame#REFERENCE_KIND} or {@link - * Frame#UNINITIALIZED_KIND} abstract types. Long and double types use only one array entry. + * but restricted to {@link Frame#CONSTANT_KIND}, {@link Frame#REFERENCE_KIND} or + * {@link Frame#UNINITIALIZED_KIND} abstract types. Long and double types use only one array + * entry. */ private int[] currentFrame; - /** Whether this method contains subroutines. */ + /** + * Whether this method contains subroutines. + */ private boolean hasSubroutines; // ----------------------------------------------------------------------------------------------- // Other miscellaneous status fields // ----------------------------------------------------------------------------------------------- - /** Whether the bytecode of this method contains ASM specific instructions. */ + /** + * Whether the bytecode of this method contains ASM specific instructions. + */ private boolean hasAsmInstructions; /** @@ -550,12 +607,12 @@ final class MethodWriter extends MethodVisitor { * Constructs a new {@link MethodWriter}. * * @param symbolTable where the constants used in this AnnotationWriter must be stored. - * @param access the method's access flags (see {@link Opcodes}). - * @param name the method's name. - * @param descriptor the method's descriptor (see {@link Type}). - * @param signature the method's signature. May be {@literal null}. - * @param exceptions the internal names of the method's exceptions. May be {@literal null}. - * @param compute indicates what must be computed (see #compute). + * @param access the method's access flags (see {@link Opcodes}). + * @param name the method's name. + * @param descriptor the method's descriptor (see {@link Type}). + * @param signature the method's signature. May be {@literal null}. + * @param exceptions the internal names of the method's exceptions. May be {@literal null}. + * @param compute indicates what must be computed (see #compute). */ MethodWriter( final SymbolTable symbolTable, @@ -1257,8 +1314,8 @@ final class MethodWriter extends MethodVisitor { constantSymbol.tag == Symbol.CONSTANT_LONG_TAG || constantSymbol.tag == Symbol.CONSTANT_DOUBLE_TAG || (constantSymbol.tag == Symbol.CONSTANT_DYNAMIC_TAG - && ((firstDescriptorChar = constantSymbol.value.charAt(0)) == 'J' - || firstDescriptorChar == 'D')); + && ((firstDescriptorChar = constantSymbol.value.charAt(0)) == 'J' + || firstDescriptorChar == 'D')); if (isLongOrDouble) { code.put12(Constants.LDC2_W, constantIndex); } else if (constantIndex >= 256) { @@ -1528,7 +1585,9 @@ final class MethodWriter extends MethodVisitor { } } - /** Computes all the stack map frames of the method, from scratch. */ + /** + * Computes all the stack map frames of the method, from scratch. + */ private void computeAllFrames() { // Complete the control flow graph with exception handler blocks. Handler handler = firstHandler; @@ -1630,7 +1689,9 @@ final class MethodWriter extends MethodVisitor { this.maxStack = maxStackSize; } - /** Computes the maximum stack size of the method. */ + /** + * Computes the maximum stack size of the method. + */ private void computeMaxStackAndLocal() { // Complete the control flow graph with exception handler blocks. Handler handler = firstHandler; @@ -1749,7 +1810,7 @@ final class MethodWriter extends MethodVisitor { /** * Adds a successor to {@link #currentBasicBlock} in the control flow graph. * - * @param info information about the control flow edge to be added. + * @param info information about the control flow edge to be added. * @param successor the successor block to be added to the current basic block. */ private void addSuccessorToCurrentBasicBlock(final int info, final Label successor) { @@ -1785,7 +1846,7 @@ final class MethodWriter extends MethodVisitor { /** * Starts the visit of a new stack map frame, stored in {@link #currentFrame}. * - * @param offset the bytecode offset of the instruction to which the frame corresponds. + * @param offset the bytecode offset of the instruction to which the frame corresponds. * @param numLocal the number of local variables in the frame. * @param numStack the number of stack elements in the frame. * @return the index of the next element to be written in this frame. @@ -1804,7 +1865,7 @@ final class MethodWriter extends MethodVisitor { /** * Sets an abstract type in {@link #currentFrame}. * - * @param frameIndex the index of the element to be set in {@link #currentFrame}. + * @param frameIndex the index of the element to be set in {@link #currentFrame}. * @param abstractType an abstract type. */ void visitAbstractType(final int frameIndex, final int abstractType) { @@ -1828,7 +1889,9 @@ final class MethodWriter extends MethodVisitor { currentFrame = null; } - /** Compresses and writes {@link #currentFrame} in a new StackMapTable entry. */ + /** + * Compresses and writes {@link #currentFrame} in a new StackMapTable entry. + */ private void putFrame() { final int numLocal = currentFrame[1]; final int numStack = currentFrame[2]; @@ -1926,7 +1989,7 @@ final class MethodWriter extends MethodVisitor { * JVMS verification_type_info format used in StackMapTable attributes. * * @param start index of the first type in {@link #currentFrame} to write. - * @param end index of last type in {@link #currentFrame} to write (exclusive). + * @param end index of last type in {@link #currentFrame} to write (exclusive). */ private void putAbstractTypes(final int start, final int end) { for (int i = start; i < end; ++i) { @@ -1938,11 +2001,12 @@ final class MethodWriter extends MethodVisitor { * Puts the given public API frame element type in {@link #stackMapTableEntries} , using the JVMS * verification_type_info format used in StackMapTable attributes. * - * @param type a frame element type described using the same format as in {@link - * MethodVisitor#visitFrame}, i.e. either {@link Opcodes#TOP}, {@link Opcodes#INTEGER}, {@link - * Opcodes#FLOAT}, {@link Opcodes#LONG}, {@link Opcodes#DOUBLE}, {@link Opcodes#NULL}, or - * {@link Opcodes#UNINITIALIZED_THIS}, or the internal name of a class, or a Label designating - * a NEW instruction (for uninitialized types). + * @param type a frame element type described using the same format as in + * {@link MethodVisitor#visitFrame}, i.e. either {@link Opcodes#TOP}, + * {@link Opcodes#INTEGER}, {@link Opcodes#FLOAT}, {@link Opcodes#LONG}, + * {@link Opcodes#DOUBLE}, {@link Opcodes#NULL}, or + * {@link Opcodes#UNINITIALIZED_THIS}, or the internal name of a class, or a Label + * designating a NEW instruction (for uninitialized types). */ private void putFrameType(final Object type) { if (type instanceof Integer) { @@ -1970,20 +2034,23 @@ final class MethodWriter extends MethodVisitor { * constructor arguments (at most a Signature, an Exception, a Deprecated and a Synthetic * attribute) are the same as the corresponding attributes in the given method. * - * @param source the source ClassReader from which the attributes of this method might be copied. - * @param hasSyntheticAttribute whether the method_info JVMS structure from which the attributes - * of this method might be copied contains a Synthetic attribute. + * @param source the source ClassReader from which the attributes of this method + * might be copied. + * @param hasSyntheticAttribute whether the method_info JVMS structure from which the attributes + * of this method might be copied contains a Synthetic attribute. * @param hasDeprecatedAttribute whether the method_info JVMS structure from which the attributes - * of this method might be copied contains a Deprecated attribute. - * @param descriptorIndex the descriptor_index field of the method_info JVMS structure from which - * the attributes of this method might be copied. - * @param signatureIndex the constant pool index contained in the Signature attribute of the - * method_info JVMS structure from which the attributes of this method might be copied, or 0. - * @param exceptionsOffset the offset in 'source.b' of the Exceptions attribute of the method_info - * JVMS structure from which the attributes of this method might be copied, or 0. + * of this method might be copied contains a Deprecated attribute. + * @param descriptorIndex the descriptor_index field of the method_info JVMS structure from + * which the attributes of this method might be copied. + * @param signatureIndex the constant pool index contained in the Signature attribute of + * the method_info JVMS structure from which the attributes of this + * method might be copied, or 0. + * @param exceptionsOffset the offset in 'source.b' of the Exceptions attribute of the + * method_info JVMS structure from which the attributes of this + * method might be copied, or 0. * @return whether the attributes of this method can be copied from the attributes of the - * method_info JVMS structure in 'source.b', between 'methodInfoOffset' and 'methodInfoOffset' - * + 'methodInfoLength'. + * method_info JVMS structure in 'source.b', between 'methodInfoOffset' and 'methodInfoOffset' + + * 'methodInfoLength'. */ boolean canCopyMethodAttributes( final ClassReader source, @@ -2026,9 +2093,9 @@ final class MethodWriter extends MethodVisitor { * Sets the source from which the attributes of this method will be copied. * * @param methodInfoOffset the offset in 'symbolTable.getSource()' of the method_info JVMS - * structure from which the attributes of this method will be copied. + * structure from which the attributes of this method will be copied. * @param methodInfoLength the length in 'symbolTable.getSource()' of the method_info JVMS - * structure from which the attributes of this method will be copied. + * structure from which the attributes of this method will be copied. */ void setMethodAttributesSource(final int methodInfoOffset, final int methodInfoLength) { // Don't copy the attributes yet, instead store their location in the source class reader so diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ModuleVisitor.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ModuleVisitor.java index 84d70395..684c7684 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ModuleVisitor.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ModuleVisitor.java @@ -1,18 +1,16 @@ - - package cn.universal.core.engine.asm; /** * A visitor to visit a Java module. The methods of this class must be called in the following - * order: ( {@code visitMainClass} | ( {@code visitPackage} | {@code visitRequire} | {@code - * visitExport} | {@code visitOpen} | {@code visitUse} | {@code visitProvide} )* ) {@code - * visitEnd}. @Author Remi Forax @Author Eric Bruneton + * order: ( {@code visitMainClass} | ( {@code visitPackage} | {@code visitRequire} | + * {@code visitExport} | {@code visitOpen} | {@code visitUse} | {@code visitProvide} )* ) + * {@code visitEnd}. @Author Remi Forax @Author Eric Bruneton */ public abstract class ModuleVisitor { /** - * The ASM API version implemented by this visitor. The value of this field must be one of {@link - * Opcodes#ASM6} or {@link Opcodes#ASM7}. + * The ASM API version implemented by this visitor. The value of this field must be one of + * {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ protected final int api; @@ -25,7 +23,7 @@ public abstract class ModuleVisitor { * Constructs a new {@link ModuleVisitor}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link Opcodes#ASM6} - * or {@link Opcodes#ASM7}. + * or {@link Opcodes#ASM7}. */ public ModuleVisitor(final int api) { this(api, null); @@ -34,10 +32,10 @@ public abstract class ModuleVisitor { /** * Constructs a new {@link ModuleVisitor}. * - * @param api the ASM API version implemented by this visitor. Must be one of {@link Opcodes#ASM6} - * or {@link Opcodes#ASM7}. + * @param api the ASM API version implemented by this visitor. Must be one of + * {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * @param moduleVisitor the module visitor to which this visitor must delegate method calls. May - * be null. + * be null. */ public ModuleVisitor(final int api, final ModuleVisitor moduleVisitor) { if (api != Opcodes.ASM9 @@ -81,9 +79,9 @@ public abstract class ModuleVisitor { /** * Visits a dependence of the current module. * - * @param module the fully qualified name (using dots) of the dependence. - * @param access the access flag of the dependence among {@code ACC_TRANSITIVE}, {@code - * ACC_STATIC_PHASE}, {@code ACC_SYNTHETIC} and {@code ACC_MANDATED}. + * @param module the fully qualified name (using dots) of the dependence. + * @param access the access flag of the dependence among {@code ACC_TRANSITIVE}, + * {@code ACC_STATIC_PHASE}, {@code ACC_SYNTHETIC} and {@code ACC_MANDATED}. * @param version the module version at compile time, or {@literal null}. */ public void visitRequire(final String module, final int access, final String version) { @@ -96,10 +94,10 @@ public abstract class ModuleVisitor { * Visit an exported package of the current module. * * @param packaze the internal name of the exported package. - * @param access the access flag of the exported package, valid values are among {@code - * ACC_SYNTHETIC} and {@code ACC_MANDATED}. + * @param access the access flag of the exported package, valid values are among + * {@code ACC_SYNTHETIC} and {@code ACC_MANDATED}. * @param modules the fully qualified names (using dots) of the modules that can access the public - * classes of the exported package, or {@literal null}. + * classes of the exported package, or {@literal null}. */ public void visitExport(final String packaze, final int access, final String... modules) { if (mv != null) { @@ -111,10 +109,10 @@ public abstract class ModuleVisitor { * Visit an open package of the current module. * * @param packaze the internal name of the opened package. - * @param access the access flag of the opened package, valid values are among {@code - * ACC_SYNTHETIC} and {@code ACC_MANDATED}. + * @param access the access flag of the opened package, valid values are among + * {@code ACC_SYNTHETIC} and {@code ACC_MANDATED}. * @param modules the fully qualified names (using dots) of the modules that can use deep - * reflection to the classes of the open package, or {@literal null}. + * reflection to the classes of the open package, or {@literal null}. */ public void visitOpen(final String packaze, final int access, final String... modules) { if (mv != null) { @@ -137,9 +135,9 @@ public abstract class ModuleVisitor { /** * Visit an implementation of a third. * - * @param service the internal name of the third. + * @param service the internal name of the third. * @param providers the internal names of the implementations of the third (there is at least one - * provider). + * provider). */ public void visitProvide(final String service, final String... providers) { if (mv != null) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ModuleWriter.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ModuleWriter.java index a900660d..f0a67343 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ModuleWriter.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/ModuleWriter.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -8,63 +6,97 @@ package cn.universal.core.engine.asm; * Remi Forax @Author Eric Bruneton * * @see JVMS - * 4.7.25 + * 4.7.25 * @see JVMS - * 4.7.26 + * 4.7.26 * @see JVMS - * 4.7.27 + * 4.7.27 */ final class ModuleWriter extends ModuleVisitor { - /** Where the constants used in this AnnotationWriter must be stored. */ + /** + * Where the constants used in this AnnotationWriter must be stored. + */ private final SymbolTable symbolTable; - /** The module_name_index field of the JVMS Module attribute. */ + /** + * The module_name_index field of the JVMS Module attribute. + */ private final int moduleNameIndex; - /** The module_flags field of the JVMS Module attribute. */ + /** + * The module_flags field of the JVMS Module attribute. + */ private final int moduleFlags; - /** The module_version_index field of the JVMS Module attribute. */ + /** + * The module_version_index field of the JVMS Module attribute. + */ private final int moduleVersionIndex; - /** The requires_count field of the JVMS Module attribute. */ + /** + * The requires_count field of the JVMS Module attribute. + */ private int requiresCount; - /** The binary content of the 'requires' array of the JVMS Module attribute. */ + /** + * The binary content of the 'requires' array of the JVMS Module attribute. + */ private final ByteVector requires; - /** The exports_count field of the JVMS Module attribute. */ + /** + * The exports_count field of the JVMS Module attribute. + */ private int exportsCount; - /** The binary content of the 'exports' array of the JVMS Module attribute. */ + /** + * The binary content of the 'exports' array of the JVMS Module attribute. + */ private final ByteVector exports; - /** The opens_count field of the JVMS Module attribute. */ + /** + * The opens_count field of the JVMS Module attribute. + */ private int opensCount; - /** The binary content of the 'opens' array of the JVMS Module attribute. */ + /** + * The binary content of the 'opens' array of the JVMS Module attribute. + */ private final ByteVector opens; - /** The uses_count field of the JVMS Module attribute. */ + /** + * The uses_count field of the JVMS Module attribute. + */ private int usesCount; - /** The binary content of the 'uses_index' array of the JVMS Module attribute. */ + /** + * The binary content of the 'uses_index' array of the JVMS Module attribute. + */ private final ByteVector usesIndex; - /** The provides_count field of the JVMS Module attribute. */ + /** + * The provides_count field of the JVMS Module attribute. + */ private int providesCount; - /** The binary content of the 'provides' array of the JVMS Module attribute. */ + /** + * The binary content of the 'provides' array of the JVMS Module attribute. + */ private final ByteVector provides; - /** The provides_count field of the JVMS ModulePackages attribute. */ + /** + * The provides_count field of the JVMS ModulePackages attribute. + */ private int packageCount; - /** The binary content of the 'package_index' array of the JVMS ModulePackages attribute. */ + /** + * The binary content of the 'package_index' array of the JVMS ModulePackages attribute. + */ private final ByteVector packageIndex; - /** The main_class_index field of the JVMS ModuleMainClass attribute, or 0. */ + /** + * The main_class_index field of the JVMS ModuleMainClass attribute, or 0. + */ private int mainClassIndex; ModuleWriter(final SymbolTable symbolTable, final int name, final int access, final int version) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Opcodes.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Opcodes.java index e522392c..35e8abc8 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Opcodes.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Opcodes.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -30,7 +28,8 @@ public interface Opcodes { * * @deprecated This API is experimental. */ - @Deprecated int ASM10_EXPERIMENTAL = 1 << 24 | 10 << 16 | 0 << 8; + @Deprecated + int ASM10_EXPERIMENTAL = 1 << 24 | 10 << 16 | 0 << 8; /* * Internal flags used to redirect calls to deprecated methods. For instance, if a visitOldStuff @@ -332,10 +331,14 @@ public interface Opcodes { // ASM specific stack map frame types, used in {@link ClassVisitor#visitFrame}. - /** An expanded frame. See {@link ClassReader#EXPAND_FRAMES}. */ + /** + * An expanded frame. See {@link ClassReader#EXPAND_FRAMES}. + */ int F_NEW = -1; - /** A compressed frame with complete frame data. */ + /** + * A compressed frame with complete frame data. + */ int F_FULL = 0; /** diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/RecordComponentVisitor.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/RecordComponentVisitor.java index 6d9027af..3e3afbbe 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/RecordComponentVisitor.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/RecordComponentVisitor.java @@ -1,17 +1,15 @@ - - package cn.universal.core.engine.asm; /** * A visitor to visit a record component. The methods of this class must be called in the following - * order: ( {@code visitAnnotation} | {@code visitTypeAnnotation} | {@code visitAttribute} )* {@code - * visitEnd}. @Author Remi Forax @Author Eric Bruneton + * order: ( {@code visitAnnotation} | {@code visitTypeAnnotation} | {@code visitAttribute} )* + * {@code visitEnd}. @Author Remi Forax @Author Eric Bruneton */ public abstract class RecordComponentVisitor { /** - * The ASM API version implemented by this visitor. The value of this field must be one of {@link - * Opcodes#ASM8} or {@link Opcodes#ASM9}. + * The ASM API version implemented by this visitor. The value of this field must be one of + * {@link Opcodes#ASM8} or {@link Opcodes#ASM9}. */ protected final int api; @@ -24,7 +22,7 @@ public abstract class RecordComponentVisitor { * Constructs a new {@link RecordComponentVisitor}. * * @param api the ASM API version implemented by this visitor. Must be one of {@link Opcodes#ASM8} - * or {@link Opcodes#ASM9}. + * or {@link Opcodes#ASM9}. */ public RecordComponentVisitor(final int api) { this(api, null); @@ -33,9 +31,10 @@ public abstract class RecordComponentVisitor { /** * Constructs a new {@link RecordComponentVisitor}. * - * @param api the ASM API version implemented by this visitor. Must be {@link Opcodes#ASM8}. + * @param api the ASM API version implemented by this visitor. Must be + * {@link Opcodes#ASM8}. * @param recordComponentVisitor the record component visitor to which this visitor must delegate - * method calls. May be null. + * method calls. May be null. */ public RecordComponentVisitor( final int api, final RecordComponentVisitor recordComponentVisitor) { @@ -68,9 +67,9 @@ public abstract class RecordComponentVisitor { * Visits an annotation of the record component. * * @param descriptor the class descriptor of the annotation class. - * @param visible {@literal true} if the annotation is visible at runtime. + * @param visible {@literal true} if the annotation is visible at runtime. * @return a visitor to visit the annotation values, or {@literal null} if this visitor is not - * interested in visiting this annotation. + * interested in visiting this annotation. */ public AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible) { if (delegate != null) { @@ -82,17 +81,17 @@ public abstract class RecordComponentVisitor { /** * Visits an annotation on a type in the record component signature. * - * @param typeRef a reference to the annotated type. The sort of this type reference must be - * {@link TypeReference#CLASS_TYPE_PARAMETER}, {@link - * TypeReference#CLASS_TYPE_PARAMETER_BOUND} or {@link TypeReference#CLASS_EXTENDS}. See - * {@link TypeReference}. - * @param typePath the path to the annotated type argument, wildcard bound, array element type, or - * static inner type within 'typeRef'. May be {@literal null} if the annotation targets - * 'typeRef' as a whole. + * @param typeRef a reference to the annotated type. The sort of this type reference must be + * {@link TypeReference#CLASS_TYPE_PARAMETER}, + * {@link TypeReference#CLASS_TYPE_PARAMETER_BOUND} or + * {@link TypeReference#CLASS_EXTENDS}. See {@link TypeReference}. + * @param typePath the path to the annotated type argument, wildcard bound, array element type, + * or static inner type within 'typeRef'. May be {@literal null} if the + * annotation targets 'typeRef' as a whole. * @param descriptor the class descriptor of the annotation class. - * @param visible {@literal true} if the annotation is visible at runtime. + * @param visible {@literal true} if the annotation is visible at runtime. * @return a visitor to visit the annotation values, or {@literal null} if this visitor is not - * interested in visiting this annotation. + * interested in visiting this annotation. */ public AnnotationVisitor visitTypeAnnotation( final int typeRef, final TypePath typePath, final String descriptor, final boolean visible) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/RecordComponentWriter.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/RecordComponentWriter.java index a28289a5..8ed2832e 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/RecordComponentWriter.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/RecordComponentWriter.java @@ -1,19 +1,23 @@ - - package cn.universal.core.engine.asm; final class RecordComponentWriter extends RecordComponentVisitor { - /** Where the constants used in this RecordComponentWriter must be stored. */ + /** + * Where the constants used in this RecordComponentWriter must be stored. + */ private final SymbolTable symbolTable; // Note: fields are ordered as in the record_component_info structure, and those related to // attributes are ordered as in Section 4.7 of the JVMS. - /** The name_index field of the Record attribute. */ + /** + * The name_index field of the Record attribute. + */ private final int nameIndex; - /** The descriptor_index field of the the Record attribute. */ + /** + * The descriptor_index field of the the Record attribute. + */ private final int descriptorIndex; /** @@ -61,9 +65,9 @@ final class RecordComponentWriter extends RecordComponentVisitor { * Constructs a new {@link RecordComponentWriter}. * * @param symbolTable where the constants used in this RecordComponentWriter must be stored. - * @param name the record component name. - * @param descriptor the record component descriptor (see {@link Type}). - * @param signature the record component signature. May be {@literal null}. + * @param name the record component name. + * @param descriptor the record component descriptor (see {@link Type}). + * @param signature the record component signature. May be {@literal null}. */ RecordComponentWriter( final SymbolTable symbolTable, diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Symbol.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Symbol.java index 18d382bb..0e71dda4 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Symbol.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Symbol.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -7,73 +5,111 @@ package cn.universal.core.engine.asm; * table of a class. @Author Eric Bruneton * * @see JVMS - * 4.4 + * 4.4 * @see JVMS - * 4.7.23 + * 4.7.23 */ abstract class Symbol { // Tag values for the constant pool entries (using the same order as in the JVMS). - /** The tag value of CONSTANT_Class_info JVMS structures. */ + /** + * The tag value of CONSTANT_Class_info JVMS structures. + */ static final int CONSTANT_CLASS_TAG = 7; - /** The tag value of CONSTANT_Fieldref_info JVMS structures. */ + /** + * The tag value of CONSTANT_Fieldref_info JVMS structures. + */ static final int CONSTANT_FIELDREF_TAG = 9; - /** The tag value of CONSTANT_Methodref_info JVMS structures. */ + /** + * The tag value of CONSTANT_Methodref_info JVMS structures. + */ static final int CONSTANT_METHODREF_TAG = 10; - /** The tag value of CONSTANT_InterfaceMethodref_info JVMS structures. */ + /** + * The tag value of CONSTANT_InterfaceMethodref_info JVMS structures. + */ static final int CONSTANT_INTERFACE_METHODREF_TAG = 11; - /** The tag value of CONSTANT_String_info JVMS structures. */ + /** + * The tag value of CONSTANT_String_info JVMS structures. + */ static final int CONSTANT_STRING_TAG = 8; - /** The tag value of CONSTANT_Integer_info JVMS structures. */ + /** + * The tag value of CONSTANT_Integer_info JVMS structures. + */ static final int CONSTANT_INTEGER_TAG = 3; - /** The tag value of CONSTANT_Float_info JVMS structures. */ + /** + * The tag value of CONSTANT_Float_info JVMS structures. + */ static final int CONSTANT_FLOAT_TAG = 4; - /** The tag value of CONSTANT_Long_info JVMS structures. */ + /** + * The tag value of CONSTANT_Long_info JVMS structures. + */ static final int CONSTANT_LONG_TAG = 5; - /** The tag value of CONSTANT_Double_info JVMS structures. */ + /** + * The tag value of CONSTANT_Double_info JVMS structures. + */ static final int CONSTANT_DOUBLE_TAG = 6; - /** The tag value of CONSTANT_NameAndType_info JVMS structures. */ + /** + * The tag value of CONSTANT_NameAndType_info JVMS structures. + */ static final int CONSTANT_NAME_AND_TYPE_TAG = 12; - /** The tag value of CONSTANT_Utf8_info JVMS structures. */ + /** + * The tag value of CONSTANT_Utf8_info JVMS structures. + */ static final int CONSTANT_UTF8_TAG = 1; - /** The tag value of CONSTANT_MethodHandle_info JVMS structures. */ + /** + * The tag value of CONSTANT_MethodHandle_info JVMS structures. + */ static final int CONSTANT_METHOD_HANDLE_TAG = 15; - /** The tag value of CONSTANT_MethodType_info JVMS structures. */ + /** + * The tag value of CONSTANT_MethodType_info JVMS structures. + */ static final int CONSTANT_METHOD_TYPE_TAG = 16; - /** The tag value of CONSTANT_Dynamic_info JVMS structures. */ + /** + * The tag value of CONSTANT_Dynamic_info JVMS structures. + */ static final int CONSTANT_DYNAMIC_TAG = 17; - /** The tag value of CONSTANT_InvokeDynamic_info JVMS structures. */ + /** + * The tag value of CONSTANT_InvokeDynamic_info JVMS structures. + */ static final int CONSTANT_INVOKE_DYNAMIC_TAG = 18; - /** The tag value of CONSTANT_Module_info JVMS structures. */ + /** + * The tag value of CONSTANT_Module_info JVMS structures. + */ static final int CONSTANT_MODULE_TAG = 19; - /** The tag value of CONSTANT_Package_info JVMS structures. */ + /** + * The tag value of CONSTANT_Package_info JVMS structures. + */ static final int CONSTANT_PACKAGE_TAG = 20; // Tag values for the BootstrapMethods attribute entries (ASM specific tag). - /** The tag value of the BootstrapMethods attribute entries. */ + /** + * The tag value of the BootstrapMethods attribute entries. + */ static final int BOOTSTRAP_METHOD_TAG = 64; // Tag values for the type table entries (ASM specific tags). - /** The tag value of a normal type entry in the (ASM specific) type table of a class. */ + /** + * The tag value of a normal type entry in the (ASM specific) type table of a class. + */ static final int TYPE_TAG = 128; /** @@ -81,7 +117,9 @@ abstract class Symbol { */ static final int UNINITIALIZED_TYPE_TAG = 129; - /** The tag value of a merged type entry in the (ASM specific) type table of a class. */ + /** + * The tag value of a merged type entry in the (ASM specific) type table of a class. + */ static final int MERGED_TYPE_TAG = 130; // Instance fields. @@ -99,18 +137,18 @@ abstract class Symbol { final int tag; /** - * The internal name of the owner class of this symbol. Only used for {@link - * #CONSTANT_FIELDREF_TAG}, {@link #CONSTANT_METHODREF_TAG}, {@link - * #CONSTANT_INTERFACE_METHODREF_TAG}, and {@link #CONSTANT_METHOD_HANDLE_TAG} symbols. + * The internal name of the owner class of this symbol. Only used for + * {@link #CONSTANT_FIELDREF_TAG}, {@link #CONSTANT_METHODREF_TAG}, + * {@link #CONSTANT_INTERFACE_METHODREF_TAG}, and {@link #CONSTANT_METHOD_HANDLE_TAG} symbols. */ final String owner; /** - * The name of the class field or method corresponding to this symbol. Only used for {@link - * #CONSTANT_FIELDREF_TAG}, {@link #CONSTANT_METHODREF_TAG}, {@link - * #CONSTANT_INTERFACE_METHODREF_TAG}, {@link #CONSTANT_NAME_AND_TYPE_TAG}, {@link - * #CONSTANT_METHOD_HANDLE_TAG}, {@link #CONSTANT_DYNAMIC_TAG} and {@link - * #CONSTANT_INVOKE_DYNAMIC_TAG} symbols. + * The name of the class field or method corresponding to this symbol. Only used for + * {@link #CONSTANT_FIELDREF_TAG}, {@link #CONSTANT_METHODREF_TAG}, + * {@link #CONSTANT_INTERFACE_METHODREF_TAG}, {@link #CONSTANT_NAME_AND_TYPE_TAG}, + * {@link #CONSTANT_METHOD_HANDLE_TAG}, {@link #CONSTANT_DYNAMIC_TAG} and + * {@link #CONSTANT_INVOKE_DYNAMIC_TAG} symbols. */ final String name; @@ -177,13 +215,13 @@ abstract class Symbol { * abstract. Instead, use the factory methods of the {@link SymbolTable} class. * * @param index the symbol index in the constant pool, in the BootstrapMethods attribute, or in - * the (ASM specific) type table of a class (depending on 'tag'). - * @param tag the symbol type. Must be one of the static tag values defined in this class. + * the (ASM specific) type table of a class (depending on 'tag'). + * @param tag the symbol type. Must be one of the static tag values defined in this class. * @param owner The internal name of the symbol's owner class. Maybe {@literal null}. - * @param name The name of the symbol's corresponding class field or method. Maybe {@literal - * null}. + * @param name The name of the symbol's corresponding class field or method. Maybe + * {@literal null}. * @param value The string value of this symbol. Maybe {@literal null}. - * @param data The numeric value of this symbol. + * @param data The numeric value of this symbol. */ Symbol( final int index, @@ -204,9 +242,8 @@ abstract class Symbol { * Returns the result {@link Type#getArgumentsAndReturnSizes} on {@link #value}. * * @return the result {@link Type#getArgumentsAndReturnSizes} on {@link #value} (memoized in - * {@link #info} for efficiency). This should only be used for {@link - * #CONSTANT_METHODREF_TAG}, {@link #CONSTANT_INTERFACE_METHODREF_TAG} and {@link - * #CONSTANT_INVOKE_DYNAMIC_TAG} symbols. + * {@link #info} for efficiency). This should only be used for {@link #CONSTANT_METHODREF_TAG}, + * {@link #CONSTANT_INTERFACE_METHODREF_TAG} and {@link #CONSTANT_INVOKE_DYNAMIC_TAG} symbols. */ int getArgumentsAndReturnSizes() { if (info == 0) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/SymbolTable.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/SymbolTable.java index 56b53e88..a7a051b2 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/SymbolTable.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/SymbolTable.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -7,16 +5,16 @@ package cn.universal.core.engine.asm; * table entries of a class. @Author Eric Bruneton * * @see JVMS - * 4.4 + * 4.4 * @see JVMS - * 4.7.23 + * 4.7.23 */ final class SymbolTable { /** - * The ClassWriter to which this SymbolTable belongs. This is only used to get access to {@link - * ClassWriter#getCommonSuperClass} and to serialize custom attributes with {@link - * Attribute#write}. + * The ClassWriter to which this SymbolTable belongs. This is only used to get access to + * {@link ClassWriter#getCommonSuperClass} and to serialize custom attributes with + * {@link Attribute#write}. */ final ClassWriter classWriter; @@ -26,10 +24,14 @@ final class SymbolTable { */ private final ClassReader sourceClassReader; - /** The major version number of the class to which this symbol table belongs. */ + /** + * The major version number of the class to which this symbol table belongs. + */ private int majorVersion; - /** The internal name of the class to which this symbol table belongs. */ + /** + * The internal name of the class to which this symbol table belongs. + */ private String className; /** @@ -81,9 +83,9 @@ final class SymbolTable { /** * An ASM specific type table used to temporarily store internal names that will not necessarily * be stored in the constant pool. This type table is used by the control flow and data flow - * analysis algorithm used to compute stack map frames from scratch. This array stores {@link - * Symbol#TYPE_TAG} and {@link Symbol#UNINITIALIZED_TYPE_TAG}) Symbol. The type symbol at index - * {@code i} has its {@link Symbol#index} equal to {@code i} (and vice versa). + * analysis algorithm used to compute stack map frames from scratch. This array stores + * {@link Symbol#TYPE_TAG} and {@link Symbol#UNINITIALIZED_TYPE_TAG}) Symbol. The type symbol at + * index {@code i} has its {@link Symbol#index} equal to {@code i} (and vice versa). */ private Entry[] typeTable; @@ -106,7 +108,7 @@ final class SymbolTable { * * @param classWriter a ClassWriter. * @param classReader the ClassReader whose constant pool and bootstrap methods must be copied to - * initialize the SymbolTable. + * initialize the SymbolTable. */ SymbolTable(final ClassWriter classWriter, final ClassReader classReader) { this.classWriter = classWriter; @@ -211,8 +213,8 @@ final class SymbolTable { * the SymbolTable. * * @param classReader the ClassReader whose bootstrap methods must be copied to initialize the - * SymbolTable. - * @param charBuffer a buffer used to read strings in the constant pool. + * SymbolTable. + * @param charBuffer a buffer used to read strings in the constant pool. */ private void copyBootstrapMethods(final ClassReader classReader, final char[] charBuffer) { // Find attributOffset of the 'bootstrap_methods' array. @@ -256,7 +258,7 @@ final class SymbolTable { * Returns the ClassReader from which this SymbolTable was constructed. * * @return the ClassReader from which this SymbolTable was constructed, or {@literal null} if it - * was constructed from scratch. + * was constructed from scratch. */ ClassReader getSource() { return sourceClassReader; @@ -285,7 +287,7 @@ final class SymbolTable { * the class name to the constant pool. * * @param majorVersion a major ClassFile version number. - * @param className an internal class name. + * @param className an internal class name. * @return the constant pool index of a new or already existing Symbol with the given class name. */ int setMajorVersionAndClassName(final int majorVersion, final String className) { @@ -362,7 +364,7 @@ final class SymbolTable { * * @param hashCode a {@link Entry#hashCode} value. * @return the list of entries which can potentially have the given hash code. The list is stored - * via the {@link Entry#next} field. + * via the {@link Entry#next} field. */ private Entry get(final int hashCode) { return entries[hashCode % entries.length]; @@ -371,8 +373,8 @@ final class SymbolTable { /** * Puts the given entry in the {@link #entries} hash set. This method does not check * whether {@link #entries} already contains a similar entry or not. {@link #entries} is resized - * if necessary to avoid hash collisions (multiple entries needing to be stored at the same {@link - * #entries} array index) as much as possible, with reasonable memory usage. + * if necessary to avoid hash collisions (multiple entries needing to be stored at the same + * {@link #entries} array index) as much as possible, with reasonable memory usage. * * @param entry an Entry (which must not already be contained in {@link #entries}). * @return the given entry @@ -423,8 +425,9 @@ final class SymbolTable { * constant pool already contains a similar item. * * @param value the value of the constant to be added to the constant pool. This parameter must be - * an {@link Integer}, {@link Byte}, {@link Character}, {@link Short}, {@link Boolean}, {@link - * Float}, {@link Long}, {@link Double}, {@link String}, {@link Type} or {@link Handle}. + * an {@link Integer}, {@link Byte}, {@link Character}, {@link Short}, + * {@link Boolean}, {@link Float}, {@link Long}, {@link Double}, {@link String}, + * {@link Type} or {@link Handle}. * @return a new or already existing Symbol with the given value. */ Symbol addConstant(final Object value) { @@ -491,8 +494,8 @@ final class SymbolTable { * Adds a CONSTANT_Fieldref_info to the constant pool of this symbol table. Does nothing if the * constant pool already contains a similar item. * - * @param owner the internal name of a class. - * @param name a field name. + * @param owner the internal name of a class. + * @param name a field name. * @param descriptor a field descriptor. * @return a new or already existing Symbol with the given value. */ @@ -504,9 +507,9 @@ final class SymbolTable { * Adds a CONSTANT_Methodref_info or CONSTANT_InterfaceMethodref_info to the constant pool of this * symbol table. Does nothing if the constant pool already contains a similar item. * - * @param owner the internal name of a class. - * @param name a method name. - * @param descriptor a method descriptor. + * @param owner the internal name of a class. + * @param name a method name. + * @param descriptor a method descriptor. * @param isInterface whether owner is an processer or not. * @return a new or already existing Symbol with the given value. */ @@ -521,10 +524,11 @@ final class SymbolTable { * the constant pool of this symbol table. Does nothing if the constant pool already contains a * similar item. * - * @param tag one of {@link Symbol#CONSTANT_FIELDREF_TAG}, {@link Symbol#CONSTANT_METHODREF_TAG} - * or {@link Symbol#CONSTANT_INTERFACE_METHODREF_TAG}. - * @param owner the internal name of a class. - * @param name a field or method name. + * @param tag one of {@link Symbol#CONSTANT_FIELDREF_TAG}, + * {@link Symbol#CONSTANT_METHODREF_TAG} or + * {@link Symbol#CONSTANT_INTERFACE_METHODREF_TAG}. + * @param owner the internal name of a class. + * @param name a field or method name. * @param descriptor a field or method descriptor. * @return a new or already existing Symbol with the given value. */ @@ -551,11 +555,12 @@ final class SymbolTable { * Adds a new CONSTANT_Fieldref_info, CONSTANT_Methodref_info or CONSTANT_InterfaceMethodref_info * to the constant pool of this symbol table. * - * @param index the constant pool index of the new Symbol. - * @param tag one of {@link Symbol#CONSTANT_FIELDREF_TAG}, {@link Symbol#CONSTANT_METHODREF_TAG} - * or {@link Symbol#CONSTANT_INTERFACE_METHODREF_TAG}. - * @param owner the internal name of a class. - * @param name a field or method name. + * @param index the constant pool index of the new Symbol. + * @param tag one of {@link Symbol#CONSTANT_FIELDREF_TAG}, + * {@link Symbol#CONSTANT_METHODREF_TAG} or + * {@link Symbol#CONSTANT_INTERFACE_METHODREF_TAG}. + * @param owner the internal name of a class. + * @param name a field or method name. * @param descriptor a field or method descriptor. */ private void addConstantMemberReference( @@ -604,7 +609,7 @@ final class SymbolTable { * Adds a CONSTANT_Integer_info or CONSTANT_Float_info to the constant pool of this symbol table. * Does nothing if the constant pool already contains a similar item. * - * @param tag one of {@link Symbol#CONSTANT_INTEGER_TAG} or {@link Symbol#CONSTANT_FLOAT_TAG}. + * @param tag one of {@link Symbol#CONSTANT_INTEGER_TAG} or {@link Symbol#CONSTANT_FLOAT_TAG}. * @param value an int or float. * @return a constant pool constant with the given tag and primitive values. */ @@ -626,7 +631,7 @@ final class SymbolTable { * table. * * @param index the constant pool index of the new Symbol. - * @param tag one of {@link Symbol#CONSTANT_INTEGER_TAG} or {@link Symbol#CONSTANT_FLOAT_TAG}. + * @param tag one of {@link Symbol#CONSTANT_INTEGER_TAG} or {@link Symbol#CONSTANT_FLOAT_TAG}. * @param value an int or float. */ private void addConstantIntegerOrFloat(final int index, final int tag, final int value) { @@ -659,7 +664,7 @@ final class SymbolTable { * Adds a CONSTANT_Long_info or CONSTANT_Double_info to the constant pool of this symbol table. * Does nothing if the constant pool already contains a similar item. * - * @param tag one of {@link Symbol#CONSTANT_LONG_TAG} or {@link Symbol#CONSTANT_DOUBLE_TAG}. + * @param tag one of {@link Symbol#CONSTANT_LONG_TAG} or {@link Symbol#CONSTANT_DOUBLE_TAG}. * @param value a long or double. * @return a constant pool constant with the given tag and primitive values. */ @@ -683,7 +688,7 @@ final class SymbolTable { * table. * * @param index the constant pool index of the new Symbol. - * @param tag one of {@link Symbol#CONSTANT_LONG_TAG} or {@link Symbol#CONSTANT_DOUBLE_TAG}. + * @param tag one of {@link Symbol#CONSTANT_LONG_TAG} or {@link Symbol#CONSTANT_DOUBLE_TAG}. * @param value a long or double. */ private void addConstantLongOrDouble(final int index, final int tag, final long value) { @@ -694,7 +699,7 @@ final class SymbolTable { * Adds a CONSTANT_NameAndType_info to the constant pool of this symbol table. Does nothing if the * constant pool already contains a similar item. * - * @param name a field or method name. + * @param name a field or method name. * @param descriptor a field or method descriptor. * @return a new or already existing Symbol with the given value. */ @@ -718,8 +723,8 @@ final class SymbolTable { /** * Adds a new CONSTANT_NameAndType_info to the constant pool of this symbol table. * - * @param index the constant pool index of the new Symbol. - * @param name a field or method name. + * @param index the constant pool index of the new Symbol. + * @param name a field or method name. * @param descriptor a field or method descriptor. */ private void addConstantNameAndType(final int index, final String name, final String descriptor) { @@ -763,14 +768,15 @@ final class SymbolTable { * Adds a CONSTANT_MethodHandle_info to the constant pool of this symbol table. Does nothing if * the constant pool already contains a similar item. * - * @param referenceKind one of {@link Opcodes#H_GETFIELD}, {@link Opcodes#H_GETSTATIC}, {@link - * Opcodes#H_PUTFIELD}, {@link Opcodes#H_PUTSTATIC}, {@link Opcodes#H_INVOKEVIRTUAL}, {@link - * Opcodes#H_INVOKESTATIC}, {@link Opcodes#H_INVOKESPECIAL}, {@link - * Opcodes#H_NEWINVOKESPECIAL} or {@link Opcodes#H_INVOKEINTERFACE}. - * @param owner the internal name of a class of processer. - * @param name a field or method name. - * @param descriptor a field or method descriptor. - * @param isInterface whether owner is an processer or not. + * @param referenceKind one of {@link Opcodes#H_GETFIELD}, {@link Opcodes#H_GETSTATIC}, + * {@link Opcodes#H_PUTFIELD}, {@link Opcodes#H_PUTSTATIC}, + * {@link Opcodes#H_INVOKEVIRTUAL}, {@link Opcodes#H_INVOKESTATIC}, + * {@link Opcodes#H_INVOKESPECIAL}, {@link Opcodes#H_NEWINVOKESPECIAL} or + * {@link Opcodes#H_INVOKEINTERFACE}. + * @param owner the internal name of a class of processer. + * @param name a field or method name. + * @param descriptor a field or method descriptor. + * @param isInterface whether owner is an processer or not. * @return a new or already existing Symbol with the given value. */ Symbol addConstantMethodHandle( @@ -808,14 +814,15 @@ final class SymbolTable { /** * Adds a new CONSTANT_MethodHandle_info to the constant pool of this symbol table. * - * @param index the constant pool index of the new Symbol. - * @param referenceKind one of {@link Opcodes#H_GETFIELD}, {@link Opcodes#H_GETSTATIC}, {@link - * Opcodes#H_PUTFIELD}, {@link Opcodes#H_PUTSTATIC}, {@link Opcodes#H_INVOKEVIRTUAL}, {@link - * Opcodes#H_INVOKESTATIC}, {@link Opcodes#H_INVOKESPECIAL}, {@link - * Opcodes#H_NEWINVOKESPECIAL} or {@link Opcodes#H_INVOKEINTERFACE}. - * @param owner the internal name of a class of processer. - * @param name a field or method name. - * @param descriptor a field or method descriptor. + * @param index the constant pool index of the new Symbol. + * @param referenceKind one of {@link Opcodes#H_GETFIELD}, {@link Opcodes#H_GETSTATIC}, + * {@link Opcodes#H_PUTFIELD}, {@link Opcodes#H_PUTSTATIC}, + * {@link Opcodes#H_INVOKEVIRTUAL}, {@link Opcodes#H_INVOKESTATIC}, + * {@link Opcodes#H_INVOKESPECIAL}, {@link Opcodes#H_NEWINVOKESPECIAL} or + * {@link Opcodes#H_INVOKEINTERFACE}. + * @param owner the internal name of a class of processer. + * @param name a field or method name. + * @param descriptor a field or method descriptor. */ private void addConstantMethodHandle( final int index, @@ -844,9 +851,9 @@ final class SymbolTable { * bootstrap method to the BootstrapMethods of this symbol table. Does nothing if the constant * pool already contains a similar item. * - * @param name a method name. - * @param descriptor a field descriptor. - * @param bootstrapMethodHandle a bootstrap method handle. + * @param name a method name. + * @param descriptor a field descriptor. + * @param bootstrapMethodHandle a bootstrap method handle. * @param bootstrapMethodArguments the bootstrap method arguments. * @return a new or already existing Symbol with the given value. */ @@ -865,9 +872,9 @@ final class SymbolTable { * related bootstrap method to the BootstrapMethods of this symbol table. Does nothing if the * constant pool already contains a similar item. * - * @param name a method name. - * @param descriptor a method descriptor. - * @param bootstrapMethodHandle a bootstrap method handle. + * @param name a method name. + * @param descriptor a method descriptor. + * @param bootstrapMethodHandle a bootstrap method handle. * @param bootstrapMethodArguments the bootstrap method arguments. * @return a new or already existing Symbol with the given value. */ @@ -885,11 +892,11 @@ final class SymbolTable { * Adds a CONSTANT_Dynamic or a CONSTANT_InvokeDynamic_info to the constant pool of this symbol * table. Does nothing if the constant pool already contains a similar item. * - * @param tag one of {@link Symbol#CONSTANT_DYNAMIC_TAG} or {@link - * Symbol#CONSTANT_INVOKE_DYNAMIC_TAG}. - * @param name a method name. - * @param descriptor a field descriptor for CONSTANT_DYNAMIC_TAG) or a method descriptor for - * CONSTANT_INVOKE_DYNAMIC_TAG. + * @param tag one of {@link Symbol#CONSTANT_DYNAMIC_TAG} or + * {@link Symbol#CONSTANT_INVOKE_DYNAMIC_TAG}. + * @param name a method name. + * @param descriptor a field descriptor for CONSTANT_DYNAMIC_TAG) or a method descriptor + * for CONSTANT_INVOKE_DYNAMIC_TAG. * @param bootstrapMethodIndex the index of a bootstrap method in the BootstrapMethods attribute. * @return a new or already existing Symbol with the given value. */ @@ -917,12 +924,12 @@ final class SymbolTable { * Adds a new CONSTANT_Dynamic_info or CONSTANT_InvokeDynamic_info to the constant pool of this * symbol table. * - * @param tag one of {@link Symbol#CONSTANT_DYNAMIC_TAG} or {@link - * Symbol#CONSTANT_INVOKE_DYNAMIC_TAG}. - * @param index the constant pool index of the new Symbol. - * @param name a method name. - * @param descriptor a field descriptor for CONSTANT_DYNAMIC_TAG or a method descriptor for - * CONSTANT_INVOKE_DYNAMIC_TAG. + * @param tag one of {@link Symbol#CONSTANT_DYNAMIC_TAG} or + * {@link Symbol#CONSTANT_INVOKE_DYNAMIC_TAG}. + * @param index the constant pool index of the new Symbol. + * @param name a method name. + * @param descriptor a field descriptor for CONSTANT_DYNAMIC_TAG or a method descriptor + * for CONSTANT_INVOKE_DYNAMIC_TAG. * @param bootstrapMethodIndex the index of a bootstrap method in the BootstrapMethods attribute. */ private void addConstantDynamicOrInvokeDynamicReference( @@ -962,11 +969,11 @@ final class SymbolTable { * CONSTANT_Module_info or CONSTANT_Package_info to the constant pool of this symbol table. Does * nothing if the constant pool already contains a similar item. * - * @param tag one of {@link Symbol#CONSTANT_CLASS_TAG}, {@link Symbol#CONSTANT_STRING_TAG}, {@link - * Symbol#CONSTANT_METHOD_TYPE_TAG}, {@link Symbol#CONSTANT_MODULE_TAG} or {@link - * Symbol#CONSTANT_PACKAGE_TAG}. + * @param tag one of {@link Symbol#CONSTANT_CLASS_TAG}, {@link Symbol#CONSTANT_STRING_TAG}, + * {@link Symbol#CONSTANT_METHOD_TYPE_TAG}, {@link Symbol#CONSTANT_MODULE_TAG} or + * {@link Symbol#CONSTANT_PACKAGE_TAG}. * @param value an internal class name, an arbitrary string, a method descriptor, a module or a - * package name, depending on tag. + * package name, depending on tag. * @return a new or already existing Symbol with the given value. */ private Symbol addConstantUtf8Reference(final int tag, final String value) { @@ -987,11 +994,11 @@ final class SymbolTable { * CONSTANT_Module_info or CONSTANT_Package_info to the constant pool of this symbol table. * * @param index the constant pool index of the new Symbol. - * @param tag one of {@link Symbol#CONSTANT_CLASS_TAG}, {@link Symbol#CONSTANT_STRING_TAG}, {@link - * Symbol#CONSTANT_METHOD_TYPE_TAG}, {@link Symbol#CONSTANT_MODULE_TAG} or {@link - * Symbol#CONSTANT_PACKAGE_TAG}. + * @param tag one of {@link Symbol#CONSTANT_CLASS_TAG}, {@link Symbol#CONSTANT_STRING_TAG}, + * {@link Symbol#CONSTANT_METHOD_TYPE_TAG}, {@link Symbol#CONSTANT_MODULE_TAG} or + * {@link Symbol#CONSTANT_PACKAGE_TAG}. * @param value an internal class name, an arbitrary string, a method descriptor, a module or a - * package name, depending on tag. + * package name, depending on tag. */ private void addConstantUtf8Reference(final int index, final int tag, final String value) { add(new Entry(index, tag, value, hash(tag, value))); @@ -1005,7 +1012,7 @@ final class SymbolTable { * Adds a bootstrap method to the BootstrapMethods attribute of this symbol table. Does nothing if * the BootstrapMethods already contains a similar bootstrap method. * - * @param bootstrapMethodHandle a bootstrap method handle. + * @param bootstrapMethodHandle a bootstrap method handle. * @param bootstrapMethodArguments the bootstrap method arguments. * @return a new or already existing Symbol with the given value. */ @@ -1032,11 +1039,11 @@ final class SymbolTable { int bootstrapMethodOffset = bootstrapMethodsAttribute.length; bootstrapMethodsAttribute.putShort( addConstantMethodHandle( - bootstrapMethodHandle.getTag(), - bootstrapMethodHandle.getOwner(), - bootstrapMethodHandle.getName(), - bootstrapMethodHandle.getDesc(), - bootstrapMethodHandle.isInterface()) + bootstrapMethodHandle.getTag(), + bootstrapMethodHandle.getOwner(), + bootstrapMethodHandle.getName(), + bootstrapMethodHandle.getDesc(), + bootstrapMethodHandle.isInterface()) .index); bootstrapMethodsAttribute.putShort(numBootstrapArguments); @@ -1061,8 +1068,9 @@ final class SymbolTable { * the BootstrapMethods already contains a similar bootstrap method (more precisely, reverts the * content of {@link #bootstrapMethods} to remove the last, duplicate bootstrap method). * - * @param offset the offset of the last bootstrap method in {@link #bootstrapMethods}, in bytes. - * @param length the length of this bootstrap method in {@link #bootstrapMethods}, in bytes. + * @param offset the offset of the last bootstrap method in {@link #bootstrapMethods}, in + * bytes. + * @param length the length of this bootstrap method in {@link #bootstrapMethods}, in bytes. * @param hashCode the hash code of this bootstrap method. * @return a new or already existing Symbol with the given value. */ @@ -1126,9 +1134,9 @@ final class SymbolTable { * Adds an {@link Frame#ITEM_UNINITIALIZED} type in the type table of this symbol table. Does * nothing if the type table already contains a similar type. * - * @param value an internal class name. - * @param bytecodeOffset the bytecode offset of the NEW instruction that created this {@link - * Frame#ITEM_UNINITIALIZED} type value. + * @param value an internal class name. + * @param bytecodeOffset the bytecode offset of the NEW instruction that created this + * {@link Frame#ITEM_UNINITIALIZED} type value. * @return the index of a new or already existing type Symbol with the given value. */ int addUninitializedType(final String value, final int bytecodeOffset) { @@ -1152,11 +1160,11 @@ final class SymbolTable { * already contains a similar type. * * @param typeTableIndex1 a {@link Symbol#TYPE_TAG} type, specified by its index in the type - * table. + * table. * @param typeTableIndex2 another {@link Symbol#TYPE_TAG} type, specified by its index in the type - * table. + * table. * @return the index of a new or already existing {@link Symbol#TYPE_TAG} type Symbol, - * corresponding to the common super class of the given types. + * corresponding to the common super class of the given types. */ int addMergedType(final int typeTableIndex1, final int typeTableIndex2) { long data = @@ -1182,9 +1190,10 @@ final class SymbolTable { * Adds the given type Symbol to {@link #typeTable}. * * @param entry a {@link Symbol#TYPE_TAG} or {@link Symbol#UNINITIALIZED_TYPE_TAG} type symbol. - * The index of this Symbol must be equal to the current value of {@link #typeCount}. + * The index of this Symbol must be equal to the current value of + * {@link #typeCount}. * @return the index in {@link #typeTable} where the given type was added, which is also equal to - * entry's index by hypothesis. + * entry's index by hypothesis. */ private int addTypeInternal(final Entry entry) { if (typeTable == null) { @@ -1249,12 +1258,14 @@ final class SymbolTable { */ private static class Entry extends Symbol { - /** The hash code of this entry. */ + /** + * The hash code of this entry. + */ final int hashCode; /** - * Another entry (and so on recursively) having the same hash code (modulo the size of {@link - * #entries}) as this one. + * Another entry (and so on recursively) having the same hash code (modulo the size of + * {@link #entries}) as this one. */ Entry next; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Type.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Type.java index 4ee985dc..1b4c231f 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Type.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/Type.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; import java.lang.reflect.Constructor; @@ -11,74 +9,120 @@ import java.lang.reflect.Method; */ public final class Type { - /** The sort of the {@code void} type. See {@link #getSort}. */ + /** + * The sort of the {@code void} type. See {@link #getSort}. + */ public static final int VOID = 0; - /** The sort of the {@code boolean} type. See {@link #getSort}. */ + /** + * The sort of the {@code boolean} type. See {@link #getSort}. + */ public static final int BOOLEAN = 1; - /** The sort of the {@code char} type. See {@link #getSort}. */ + /** + * The sort of the {@code char} type. See {@link #getSort}. + */ public static final int CHAR = 2; - /** The sort of the {@code byte} type. See {@link #getSort}. */ + /** + * The sort of the {@code byte} type. See {@link #getSort}. + */ public static final int BYTE = 3; - /** The sort of the {@code short} type. See {@link #getSort}. */ + /** + * The sort of the {@code short} type. See {@link #getSort}. + */ public static final int SHORT = 4; - /** The sort of the {@code int} type. See {@link #getSort}. */ + /** + * The sort of the {@code int} type. See {@link #getSort}. + */ public static final int INT = 5; - /** The sort of the {@code float} type. See {@link #getSort}. */ + /** + * The sort of the {@code float} type. See {@link #getSort}. + */ public static final int FLOAT = 6; - /** The sort of the {@code long} type. See {@link #getSort}. */ + /** + * The sort of the {@code long} type. See {@link #getSort}. + */ public static final int LONG = 7; - /** The sort of the {@code double} type. See {@link #getSort}. */ + /** + * The sort of the {@code double} type. See {@link #getSort}. + */ public static final int DOUBLE = 8; - /** The sort of array reference types. See {@link #getSort}. */ + /** + * The sort of array reference types. See {@link #getSort}. + */ public static final int ARRAY = 9; - /** The sort of object reference types. See {@link #getSort}. */ + /** + * The sort of object reference types. See {@link #getSort}. + */ public static final int OBJECT = 10; - /** The sort of method types. See {@link #getSort}. */ + /** + * The sort of method types. See {@link #getSort}. + */ public static final int METHOD = 11; - /** The (private) sort of object reference types represented with an internal name. */ + /** + * The (private) sort of object reference types represented with an internal name. + */ private static final int INTERNAL = 12; - /** The descriptors of the primitive types. */ + /** + * The descriptors of the primitive types. + */ private static final String PRIMITIVE_DESCRIPTORS = "VZCBSIFJD"; - /** The {@code void} type. */ + /** + * The {@code void} type. + */ public static final Type VOID_TYPE = new Type(VOID, PRIMITIVE_DESCRIPTORS, VOID, VOID + 1); - /** The {@code boolean} type. */ + /** + * The {@code boolean} type. + */ public static final Type BOOLEAN_TYPE = new Type(BOOLEAN, PRIMITIVE_DESCRIPTORS, BOOLEAN, BOOLEAN + 1); - /** The {@code char} type. */ + /** + * The {@code char} type. + */ public static final Type CHAR_TYPE = new Type(CHAR, PRIMITIVE_DESCRIPTORS, CHAR, CHAR + 1); - /** The {@code byte} type. */ + /** + * The {@code byte} type. + */ public static final Type BYTE_TYPE = new Type(BYTE, PRIMITIVE_DESCRIPTORS, BYTE, BYTE + 1); - /** The {@code short} type. */ + /** + * The {@code short} type. + */ public static final Type SHORT_TYPE = new Type(SHORT, PRIMITIVE_DESCRIPTORS, SHORT, SHORT + 1); - /** The {@code int} type. */ + /** + * The {@code int} type. + */ public static final Type INT_TYPE = new Type(INT, PRIMITIVE_DESCRIPTORS, INT, INT + 1); - /** The {@code float} type. */ + /** + * The {@code float} type. + */ public static final Type FLOAT_TYPE = new Type(FLOAT, PRIMITIVE_DESCRIPTORS, FLOAT, FLOAT + 1); - /** The {@code long} type. */ + /** + * The {@code long} type. + */ public static final Type LONG_TYPE = new Type(LONG, PRIMITIVE_DESCRIPTORS, LONG, LONG + 1); - /** The {@code double} type. */ + /** + * The {@code double} type. + */ public static final Type DOUBLE_TYPE = new Type(DOUBLE, PRIMITIVE_DESCRIPTORS, DOUBLE, DOUBLE + 1); @@ -99,34 +143,34 @@ public final class Type { * cases. * *

For {@link #OBJECT} types, this field also contains the descriptor: the characters in - * [{@link #valueBegin},{@link #valueEnd}) contain the internal name, and those in [{@link - * #valueBegin} - 1, {@link #valueEnd} + 1) contain the descriptor. + * [{@link #valueBegin},{@link #valueEnd}) contain the internal name, and those in + * [{@link #valueBegin} - 1, {@link #valueEnd} + 1) contain the descriptor. */ private final String valueBuffer; /** - * The beginning index, inclusive, of the value of this Java field or method type in {@link - * #valueBuffer}. This value is an internal name for {@link #OBJECT} and {@link #INTERNAL} types, - * and a field or method descriptor in the other cases. + * The beginning index, inclusive, of the value of this Java field or method type in + * {@link #valueBuffer}. This value is an internal name for {@link #OBJECT} and {@link #INTERNAL} + * types, and a field or method descriptor in the other cases. */ private final int valueBegin; /** - * The end index, exclusive, of the value of this Java field or method type in {@link - * #valueBuffer}. This value is an internal name for {@link #OBJECT} and {@link #INTERNAL} types, - * and a field or method descriptor in the other cases. + * The end index, exclusive, of the value of this Java field or method type in + * {@link #valueBuffer}. This value is an internal name for {@link #OBJECT} and {@link #INTERNAL} + * types, and a field or method descriptor in the other cases. */ private final int valueEnd; /** * Constructs a reference type. * - * @param sort the sort of this type, see {@link #sort}. + * @param sort the sort of this type, see {@link #sort}. * @param valueBuffer a buffer containing the value of this field or method type. - * @param valueBegin the beginning index, inclusive, of the value of this field or method type in - * valueBuffer. - * @param valueEnd the end index, exclusive, of the value of this field or method type in - * valueBuffer. + * @param valueBegin the beginning index, inclusive, of the value of this field or method type in + * valueBuffer. + * @param valueEnd the end index, exclusive, of the value of this field or method type in + * valueBuffer. */ private Type(final int sort, final String valueBuffer, final int valueBegin, final int valueEnd) { this.sort = sort; @@ -239,7 +283,7 @@ public final class Type { /** * Returns the method {@link Type} corresponding to the given argument and return types. * - * @param returnType the return type of the method. + * @param returnType the return type of the method. * @param argumentTypes the argument types of the method. * @return the method {@link Type} corresponding to the given argument and return types. */ @@ -263,7 +307,7 @@ public final class Type { * * @param methodDescriptor a method descriptor. * @return the {@link Type} values corresponding to the argument types of the given method - * descriptor. + * descriptor. */ public static Type[] getArgumentTypes(final String methodDescriptor) { // First step: compute the number of argument types in methodDescriptor. @@ -378,10 +422,10 @@ public final class Type { * Returns the {@link Type} corresponding to the given field or method descriptor. * * @param descriptorBuffer a buffer containing the field or method descriptor. - * @param descriptorBegin the beginning index, inclusive, of the field or method descriptor in - * descriptorBuffer. - * @param descriptorEnd the end index, exclusive, of the field or method descriptor in - * descriptorBuffer. + * @param descriptorBegin the beginning index, inclusive, of the field or method descriptor in + * descriptorBuffer. + * @param descriptorEnd the end index, exclusive, of the field or method descriptor in + * descriptorBuffer. * @return the {@link Type} corresponding to the given type descriptor. */ private static Type getTypeInternal( @@ -528,7 +572,7 @@ public final class Type { /** * Returns the descriptor corresponding to the given argument and return types. * - * @param returnType the return type of the method. + * @param returnType the return type of the method. * @param argumentTypes the argument types of the method. * @return the descriptor corresponding to the given argument and return types. */ @@ -579,7 +623,7 @@ public final class Type { /** * Appends the descriptor of the given class to the given string builder. * - * @param clazz the class whose descriptor must be computed. + * @param clazz the class whose descriptor must be computed. * @param stringBuilder the string builder to which the descriptor must be appended. */ private static void appendDescriptor(final Class clazz, final StringBuilder stringBuilder) { @@ -624,9 +668,9 @@ public final class Type { /** * Returns the sort of this type. * - * @return {@link #VOID}, {@link #BOOLEAN}, {@link #CHAR}, {@link #BYTE}, {@link #SHORT}, {@link - * #INT}, {@link #FLOAT}, {@link #LONG}, {@link #DOUBLE}, {@link #ARRAY}, {@link #OBJECT} or - * {@link #METHOD}. + * @return {@link #VOID}, {@link #BOOLEAN}, {@link #CHAR}, {@link #BYTE}, {@link #SHORT}, + * {@link #INT}, {@link #FLOAT}, {@link #LONG}, {@link #DOUBLE}, {@link #ARRAY}, {@link #OBJECT} + * or {@link #METHOD}. */ public int getSort() { return sort == INTERNAL ? OBJECT : sort; @@ -650,7 +694,7 @@ public final class Type { * Returns the size of values of this type. This method must not be used for method types. * * @return the size of values of this type, i.e., 2 for {@code long} and {@code double}, 0 for - * {@code void} and 1 otherwise. + * {@code void} and 1 otherwise. */ public int getSize() { switch (sort) { @@ -679,9 +723,9 @@ public final class Type { * should only be used for method types. * * @return the size of the arguments of the method (plus one for the implicit this argument), - * argumentsSize, and the size of its return value, returnSize, packed into a single int i = - * {@code (argumentsSize << 2) | returnSize} (argumentsSize is therefore equal to {@code - * i >> 2}, and returnSize to {@code i & 0x03}). + * argumentsSize, and the size of its return value, returnSize, packed into a single int i = + * {@code (argumentsSize << 2) | returnSize} (argumentsSize is therefore equal to + * {@code i >> 2}, and returnSize to {@code i & 0x03}). */ public int getArgumentsAndReturnSizes() { return getArgumentsAndReturnSizes(getDescriptor()); @@ -692,9 +736,9 @@ public final class Type { * * @param methodDescriptor a method descriptor. * @return the size of the arguments of the method (plus one for the implicit this argument), - * argumentsSize, and the size of its return value, returnSize, packed into a single int i = - * {@code (argumentsSize << 2) | returnSize} (argumentsSize is therefore equal to {@code - * i >> 2}, and returnSize to {@code i & 0x03}). + * argumentsSize, and the size of its return value, returnSize, packed into a single int i = + * {@code (argumentsSize << 2) | returnSize} (argumentsSize is therefore equal to + * {@code i >> 2}, and returnSize to {@code i & 0x03}). */ public static int getArgumentsAndReturnSizes(final String methodDescriptor) { int argumentsSize = 1; @@ -733,11 +777,11 @@ public final class Type { * method types. * * @param opcode a JVM instruction opcode. This opcode must be one of ILOAD, ISTORE, IALOAD, - * IASTORE, IADD, ISUB, IMUL, IDIV, IREM, INEG, ISHL, ISHR, IUSHR, IAND, IOR, IXOR and - * IRETURN. + * IASTORE, IADD, ISUB, IMUL, IDIV, IREM, INEG, ISHL, ISHR, IUSHR, IAND, IOR, IXOR + * and IRETURN. * @return an opcode that is similar to the given opcode, but adapted to this {@link Type}. For - * example, if this type is {@code float} and {@code opcode} is IRETURN, this method returns - * FRETURN. + * example, if this type is {@code float} and {@code opcode} is IRETURN, this method returns + * FRETURN. */ public int getOpcode(final int opcode) { if (opcode == Opcodes.IALOAD || opcode == Opcodes.IASTORE) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/TypePath.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/TypePath.java index f3e1c769..36cb6ead 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/TypePath.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/TypePath.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -8,16 +6,24 @@ package cn.universal.core.engine.asm; */ public final class TypePath { - /** A type path step that steps into the element type of an array type. See {@link #getStep}. */ + /** + * A type path step that steps into the element type of an array type. See {@link #getStep}. + */ public static final int ARRAY_ELEMENT = 0; - /** A type path step that steps into the nested type of a class type. See {@link #getStep}. */ + /** + * A type path step that steps into the nested type of a class type. See {@link #getStep}. + */ public static final int INNER_TYPE = 1; - /** A type path step that steps into the bound of a wildcard type. See {@link #getStep}. */ + /** + * A type path step that steps into the bound of a wildcard type. See {@link #getStep}. + */ public static final int WILDCARD_BOUND = 2; - /** A type path step that steps into a type argument of a generic type. See {@link #getStep}. */ + /** + * A type path step that steps into a type argument of a generic type. See {@link #getStep}. + */ public static final int TYPE_ARGUMENT = 3; /** @@ -26,20 +32,22 @@ public final class TypePath { * structure in this array is given by {@link #typePathOffset}. * * @see JVMS - * 4.7.20.2 + * href="https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.20.2">JVMS + * 4.7.20.2 */ private final byte[] typePathContainer; - /** The offset of the first byte of the type_path JVMS structure in {@link #typePathContainer}. */ + /** + * The offset of the first byte of the type_path JVMS structure in {@link #typePathContainer}. + */ private final int typePathOffset; /** * Constructs a new TypePath. * * @param typePathContainer a byte array containing a type_path JVMS structure. - * @param typePathOffset the offset of the first byte of the type_path structure in - * typePathContainer. + * @param typePathOffset the offset of the first byte of the type_path structure in + * typePathContainer. */ TypePath(final byte[] typePathContainer, final int typePathOffset) { this.typePathContainer = typePathContainer; @@ -60,8 +68,8 @@ public final class TypePath { * Returns the value of the given step of this path. * * @param index an index between 0 and {@link #getLength()}, exclusive. - * @return one of {@link #ARRAY_ELEMENT}, {@link #INNER_TYPE}, {@link #WILDCARD_BOUND}, or {@link - * #TYPE_ARGUMENT}. + * @return one of {@link #ARRAY_ELEMENT}, {@link #INNER_TYPE}, {@link #WILDCARD_BOUND}, or + * {@link #TYPE_ARGUMENT}. */ public int getStep(final int index) { // Returns the type_path_kind of the path element of the given index. @@ -85,7 +93,7 @@ public final class TypePath { * object. * * @param typePath a type path in string form, in the format used by {@link #toString()}. May be - * {@literal null} or empty. + * {@literal null} or empty. * @return the corresponding TypePath object, or {@literal null} if the path is empty. */ public static TypePath fromString(final String typePath) { @@ -127,8 +135,8 @@ public final class TypePath { /** * Returns a string representation of this type path. {@link #ARRAY_ELEMENT} steps are represented - * with '[', {@link #INNER_TYPE} steps with '.', {@link #WILDCARD_BOUND} steps with '*' and {@link - * #TYPE_ARGUMENT} steps with their type argument index in decimal form followed by ';'. + * with '[', {@link #INNER_TYPE} steps with '.', {@link #WILDCARD_BOUND} steps with '*' and + * {@link #TYPE_ARGUMENT} steps with their type argument index in decimal form followed by ';'. */ @Override public String toString() { @@ -160,7 +168,7 @@ public final class TypePath { * ByteVector. * * @param typePath a TypePath instance, or {@literal null} for empty paths. - * @param output where the type path must be put. + * @param output where the type path must be put. */ static void put(final TypePath typePath, final ByteVector output) { if (typePath == null) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/TypeReference.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/TypeReference.java index 791bf6a4..61446f7e 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/TypeReference.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/TypeReference.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm; /** @@ -11,14 +9,14 @@ package cn.universal.core.engine.asm; public class TypeReference { /** - * The sort of type references that target a type parameter of a generic class. See {@link - * #getSort}. + * The sort of type references that target a type parameter of a generic class. See + * {@link #getSort}. */ public static final int CLASS_TYPE_PARAMETER = 0x00; /** - * The sort of type references that target a type parameter of a generic method. See {@link - * #getSort}. + * The sort of type references that target a type parameter of a generic method. See + * {@link #getSort}. */ public static final int METHOD_TYPE_PARAMETER = 0x01; @@ -40,10 +38,14 @@ public class TypeReference { */ public static final int METHOD_TYPE_PARAMETER_BOUND = 0x12; - /** The sort of type references that target the type of a field. See {@link #getSort}. */ + /** + * The sort of type references that target the type of a field. See {@link #getSort}. + */ public static final int FIELD = 0x13; - /** The sort of type references that target the return type of a method. See {@link #getSort}. */ + /** + * The sort of type references that target the return type of a method. See {@link #getSort}. + */ public static final int METHOD_RETURN = 0x14; /** @@ -52,8 +54,8 @@ public class TypeReference { public static final int METHOD_RECEIVER = 0x15; /** - * The sort of type references that target the type of a formal parameter of a method. See {@link - * #getSort}. + * The sort of type references that target the type of a formal parameter of a method. See + * {@link #getSort}. */ public static final int METHOD_FORMAL_PARAMETER = 0x16; @@ -64,14 +66,14 @@ public class TypeReference { public static final int THROWS = 0x17; /** - * The sort of type references that target the type of a local variable in a method. See {@link - * #getSort}. + * The sort of type references that target the type of a local variable in a method. See + * {@link #getSort}. */ public static final int LOCAL_VARIABLE = 0x40; /** - * The sort of type references that target the type of a resource variable in a method. See {@link - * #getSort}. + * The sort of type references that target the type of a resource variable in a method. See + * {@link #getSort}. */ public static final int RESOURCE_VARIABLE = 0x41; @@ -100,8 +102,8 @@ public class TypeReference { public static final int CONSTRUCTOR_REFERENCE = 0x45; /** - * The sort of type references that target the receiver type of a method reference. See {@link - * #getSort}. + * The sort of type references that target the receiver type of a method reference. See + * {@link #getSort}. */ public static final int METHOD_REFERENCE = 0x46; @@ -142,17 +144,18 @@ public class TypeReference { * specific method {@link MethodVisitor#visitLocalVariableAnnotation}). Thus, both structures can * be stored in an int. * - *

This int field stores target_type (called the TypeReference 'sort' in the public API of this + *

This int field stores target_type (called the TypeReference 'sort' in the public API of + * this * class) in its most significant byte, followed by the target_info fields. Depending on * target_type, 1, 2 or even 3 least significant bytes of this field are unused. target_info * fields which reference bytecode offsets are set to 0 (these offsets are ignored in ClassReader, * and recomputed in MethodWriter). * * @see JVMS - * 4.7.20 + * 4.7.20 * @see JVMS - * 4.7.20.1 + * href="https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.20.1">JVMS + * 4.7.20.1 */ private final int targetTypeAndInfo; @@ -160,7 +163,7 @@ public class TypeReference { * Constructs a new TypeReference. * * @param typeRef the int encoded value of the type reference, as received in a visit method - * related to type annotations, such as {@link ClassVisitor#visitTypeAnnotation}. + * related to type annotations, such as {@link ClassVisitor#visitTypeAnnotation}. */ public TypeReference(final int typeRef) { this.targetTypeAndInfo = typeRef; @@ -169,9 +172,9 @@ public class TypeReference { /** * Returns a type reference of the given sort. * - * @param sort one of {@link #FIELD}, {@link #METHOD_RETURN}, {@link #METHOD_RECEIVER}, {@link - * #LOCAL_VARIABLE}, {@link #RESOURCE_VARIABLE}, {@link #INSTANCEOF}, {@link #NEW}, {@link - * #CONSTRUCTOR_REFERENCE}, or {@link #METHOD_REFERENCE}. + * @param sort one of {@link #FIELD}, {@link #METHOD_RETURN}, {@link #METHOD_RECEIVER}, + * {@link #LOCAL_VARIABLE}, {@link #RESOURCE_VARIABLE}, {@link #INSTANCEOF}, + * {@link #NEW}, {@link #CONSTRUCTOR_REFERENCE}, or {@link #METHOD_REFERENCE}. * @return a type reference of the given sort. */ public static TypeReference newTypeReference(final int sort) { @@ -181,7 +184,7 @@ public class TypeReference { /** * Returns a reference to a type parameter of a generic class or method. * - * @param sort one of {@link #CLASS_TYPE_PARAMETER} or {@link #METHOD_TYPE_PARAMETER}. + * @param sort one of {@link #CLASS_TYPE_PARAMETER} or {@link #METHOD_TYPE_PARAMETER}. * @param paramIndex the type parameter index. * @return a reference to the given generic class or method type parameter. */ @@ -192,7 +195,7 @@ public class TypeReference { /** * Returns a reference to a type parameter bound of a generic class or method. * - * @param sort one of {@link #CLASS_TYPE_PARAMETER} or {@link #METHOD_TYPE_PARAMETER}. + * @param sort one of {@link #CLASS_TYPE_PARAMETER} or {@link #METHOD_TYPE_PARAMETER}. * @param paramIndex the type parameter index. * @param boundIndex the type bound index within the above type parameters. * @return a reference to the given generic class or method type parameter bound. @@ -207,7 +210,7 @@ public class TypeReference { * class. * * @param itfIndex the index of an processer in the 'implements' clause of a class, or -1 to - * reference the super class of the class. + * reference the super class of the class. * @return a reference to the given super type of a class. */ public static TypeReference newSuperTypeReference(final int itfIndex) { @@ -238,7 +241,7 @@ public class TypeReference { * Returns a reference to the type of the exception declared in a 'catch' clause of a method. * * @param tryCatchBlockIndex the index of a try catch block (using the order in which they are - * visited with visitTryCatchBlock). + * visited with visitTryCatchBlock). * @return a reference to the type of the given exception. */ public static TypeReference newTryCatchReference(final int tryCatchBlockIndex) { @@ -249,9 +252,10 @@ public class TypeReference { * Returns a reference to the type of a type argument in a constructor or method call or * reference. * - * @param sort one of {@link #CAST}, {@link #CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT}, {@link - * #METHOD_INVOCATION_TYPE_ARGUMENT}, {@link #CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT}, or {@link - * #METHOD_REFERENCE_TYPE_ARGUMENT}. + * @param sort one of {@link #CAST}, {@link #CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT}, + * {@link #METHOD_INVOCATION_TYPE_ARGUMENT}, + * {@link #CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT}, or + * {@link #METHOD_REFERENCE_TYPE_ARGUMENT}. * @param argIndex the type argument index. * @return a reference to the type of the given type argument. */ @@ -262,14 +266,15 @@ public class TypeReference { /** * Returns the sort of this type reference. * - * @return one of {@link #CLASS_TYPE_PARAMETER}, {@link #METHOD_TYPE_PARAMETER}, {@link - * #CLASS_EXTENDS}, {@link #CLASS_TYPE_PARAMETER_BOUND}, {@link #METHOD_TYPE_PARAMETER_BOUND}, - * {@link #FIELD}, {@link #METHOD_RETURN}, {@link #METHOD_RECEIVER}, {@link - * #METHOD_FORMAL_PARAMETER}, {@link #THROWS}, {@link #LOCAL_VARIABLE}, {@link - * #RESOURCE_VARIABLE}, {@link #EXCEPTION_PARAMETER}, {@link #INSTANCEOF}, {@link #NEW}, - * {@link #CONSTRUCTOR_REFERENCE}, {@link #METHOD_REFERENCE}, {@link #CAST}, {@link - * #CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT}, {@link #METHOD_INVOCATION_TYPE_ARGUMENT}, {@link - * #CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT}, or {@link #METHOD_REFERENCE_TYPE_ARGUMENT}. + * @return one of {@link #CLASS_TYPE_PARAMETER}, {@link #METHOD_TYPE_PARAMETER}, + * {@link #CLASS_EXTENDS}, {@link #CLASS_TYPE_PARAMETER_BOUND}, + * {@link #METHOD_TYPE_PARAMETER_BOUND}, {@link #FIELD}, {@link #METHOD_RETURN}, + * {@link #METHOD_RECEIVER}, {@link #METHOD_FORMAL_PARAMETER}, {@link #THROWS}, + * {@link #LOCAL_VARIABLE}, {@link #RESOURCE_VARIABLE}, {@link #EXCEPTION_PARAMETER}, + * {@link #INSTANCEOF}, {@link #NEW}, {@link #CONSTRUCTOR_REFERENCE}, {@link #METHOD_REFERENCE}, + * {@link #CAST}, {@link #CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT}, + * {@link #METHOD_INVOCATION_TYPE_ARGUMENT}, {@link #CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT}, or + * {@link #METHOD_REFERENCE_TYPE_ARGUMENT}. */ public int getSort() { return targetTypeAndInfo >>> 24; @@ -277,9 +282,9 @@ public class TypeReference { /** * Returns the index of the type parameter referenced by this type reference. This method must - * only be used for type references whose sort is {@link #CLASS_TYPE_PARAMETER}, {@link - * #METHOD_TYPE_PARAMETER}, {@link #CLASS_TYPE_PARAMETER_BOUND} or {@link - * #METHOD_TYPE_PARAMETER_BOUND}. + * only be used for type references whose sort is {@link #CLASS_TYPE_PARAMETER}, + * {@link #METHOD_TYPE_PARAMETER}, {@link #CLASS_TYPE_PARAMETER_BOUND} or + * {@link #METHOD_TYPE_PARAMETER_BOUND}. * * @return a type parameter index. */ @@ -288,10 +293,10 @@ public class TypeReference { } /** - * Returns the index of the type parameter bound, within the type parameter {@link - * #getTypeParameterIndex}, referenced by this type reference. This method must only be used for - * type references whose sort is {@link #CLASS_TYPE_PARAMETER_BOUND} or {@link - * #METHOD_TYPE_PARAMETER_BOUND}. + * Returns the index of the type parameter bound, within the type parameter + * {@link #getTypeParameterIndex}, referenced by this type reference. This method must only be + * used for type references whose sort is {@link #CLASS_TYPE_PARAMETER_BOUND} or + * {@link #METHOD_TYPE_PARAMETER_BOUND}. * * @return a type parameter bound index. */ @@ -304,7 +309,7 @@ public class TypeReference { * This method must only be used for type references whose sort is {@link #CLASS_EXTENDS}. * * @return the index of an processer in the 'implements' clause of a class, or -1 if this type - * reference references the type of the super class. + * reference references the type of the super class. */ public int getSuperTypeIndex() { return (short) ((targetTypeAndInfo & 0x00FFFF00) >> 8); @@ -322,8 +327,8 @@ public class TypeReference { /** * Returns the index of the exception, in a 'throws' clause of a method, whose type is referenced - * by this type reference. This method must only be used for type references whose sort is {@link - * #THROWS}. + * by this type reference. This method must only be used for type references whose sort is + * {@link #THROWS}. * * @return the index of an exception in the 'throws' clause of a method. */ @@ -344,9 +349,9 @@ public class TypeReference { /** * Returns the index of the type argument referenced by this type reference. This method must only - * be used for type references whose sort is {@link #CAST}, {@link - * #CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT}, {@link #METHOD_INVOCATION_TYPE_ARGUMENT}, {@link - * #CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT}, or {@link #METHOD_REFERENCE_TYPE_ARGUMENT}. + * be used for type references whose sort is {@link #CAST}, + * {@link #CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT}, {@link #METHOD_INVOCATION_TYPE_ARGUMENT}, + * {@link #CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT}, or {@link #METHOD_REFERENCE_TYPE_ARGUMENT}. * * @return a type parameter index. */ @@ -367,9 +372,10 @@ public class TypeReference { /** * Puts the given target_type and target_info JVMS structures into the given ByteVector. * - * @param targetTypeAndInfo a target_type and a target_info structures encoded as in {@link - * #targetTypeAndInfo}. LOCAL_VARIABLE and RESOURCE_VARIABLE target types are not supported. - * @param output where the type reference must be put. + * @param targetTypeAndInfo a target_type and a target_info structures encoded as in + * {@link #targetTypeAndInfo}. LOCAL_VARIABLE and RESOURCE_VARIABLE + * target types are not supported. + * @param output where the type reference must be put. */ static void putTarget(final int targetTypeAndInfo, final ByteVector output) { switch (targetTypeAndInfo >>> 24) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureReader.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureReader.java index cf3b0775..e8067a52 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureReader.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureReader.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm.signature; import cn.universal.core.engine.asm.ClassVisitor; @@ -10,11 +8,13 @@ import cn.universal.core.engine.asm.MethodVisitor; * visit them with a SignatureVisitor. @Author Thomas Hallgren @Author Eric Bruneton * * @see JVMS - * 4.7.9.1 + * 4.7.9.1 */ public class SignatureReader { - /** The JVMS signature to be read. */ + /** + * The JVMS signature to be read. + */ private final String signatureValue; /** @@ -106,8 +106,8 @@ public class SignatureReader { * Makes the given visitor visit the signature of this {@link SignatureReader}. This signature is * the one specified in the constructor (see {@link #SignatureReader}). This method is intended to * be called on a {@link SignatureReader} that was created using a JavaTypeSignature, such - * as the signature parameter of the {@link ClassVisitor#visitField} or {@link - * MethodVisitor#visitLocalVariable} methods. + * as the signature parameter of the {@link ClassVisitor#visitField} or + * {@link MethodVisitor#visitLocalVariable} methods. * * @param signatureVisitor the visitor that must visit this signature. */ @@ -118,8 +118,8 @@ public class SignatureReader { /** * Parses a JavaTypeSignature and makes the given visitor visit it. * - * @param signature a string containing the signature that must be parsed. - * @param startOffset index of the first character of the signature to parsed. + * @param signature a string containing the signature that must be parsed. + * @param startOffset index of the first character of the signature to parsed. * @param signatureVisitor the visitor that must visit this signature. * @return the index of the first character after the parsed signature. */ diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureVisitor.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureVisitor.java index c675dd41..633dc6c7 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureVisitor.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureVisitor.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm.signature; import cn.universal.core.engine.asm.Opcodes; @@ -24,26 +22,33 @@ import cn.universal.core.engine.asm.Opcodes; */ public abstract class SignatureVisitor { - /** Wildcard for an "extends" type argument. */ + /** + * Wildcard for an "extends" type argument. + */ public static final char EXTENDS = '+'; - /** Wildcard for a "super" type argument. */ + /** + * Wildcard for a "super" type argument. + */ public static final char SUPER = '-'; - /** Wildcard for a normal type argument. */ + /** + * Wildcard for a normal type argument. + */ public static final char INSTANCEOF = '='; /** - * The ASM API version implemented by this visitor. The value of this field must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. + * The ASM API version implemented by this visitor. The value of this field must be one of + * {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. */ protected final int api; /** * Constructs a new {@link SignatureVisitor}. * - * @param api the ASM API version implemented by this visitor. Must be one of {@link - * Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. + * @param api the ASM API version implemented by this visitor. Must be one of + * {@link Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or + * {@link Opcodes#ASM7}. */ public SignatureVisitor(final int api) { if (api != Opcodes.ASM9 @@ -63,7 +68,8 @@ public abstract class SignatureVisitor { * * @param name the name of the formal parameter. */ - public void visitFormalTypeParameter(final String name) {} + public void visitFormalTypeParameter(final String name) { + } /** * Visits the class bound of the last visited formal type parameter. @@ -133,14 +139,16 @@ public abstract class SignatureVisitor { * * @param descriptor the descriptor of the primitive type, or 'V' for {@code void} . */ - public void visitBaseType(final char descriptor) {} + public void visitBaseType(final char descriptor) { + } /** * Visits a signature corresponding to a type variable. * * @param name the name of the type variable. */ - public void visitTypeVariable(final String name) {} + public void visitTypeVariable(final String name) { + } /** * Visits a signature corresponding to an array type. @@ -156,17 +164,22 @@ public abstract class SignatureVisitor { * * @param name the internal name of the class or processer. */ - public void visitClassType(final String name) {} + public void visitClassType(final String name) { + } /** * Visits an inner class. * * @param name the local name of the inner class in its enclosing class. */ - public void visitInnerClassType(final String name) {} + public void visitInnerClassType(final String name) { + } - /** Visits an unbounded type argument of the last visited class or inner class type. */ - public void visitTypeArgument() {} + /** + * Visits an unbounded type argument of the last visited class or inner class type. + */ + public void visitTypeArgument() { + } /** * Visits a type argument of the last visited class or inner class type. @@ -178,6 +191,9 @@ public abstract class SignatureVisitor { return this; } - /** Ends the visit of a signature corresponding to a class or processer type. */ - public void visitEnd() {} + /** + * Ends the visit of a signature corresponding to a class or processer type. + */ + public void visitEnd() { + } } diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureWriter.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureWriter.java index cd5545da..b0f9a057 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureWriter.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/asm/signature/SignatureWriter.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.asm.signature; import cn.universal.core.engine.asm.Opcodes; @@ -9,17 +7,23 @@ import cn.universal.core.engine.asm.Opcodes; * Specification (JVMS). @Author Thomas Hallgren @Author Eric Bruneton * * @see JVMS - * 4.7.9.1 + * 4.7.9.1 */ public class SignatureWriter extends SignatureVisitor { - /** The builder used to construct the visited signature. */ + /** + * The builder used to construct the visited signature. + */ private final StringBuilder stringBuilder = new StringBuilder(); - /** Whether the visited signature contains formal type parameters. */ + /** + * Whether the visited signature contains formal type parameters. + */ private boolean hasFormals; - /** Whether the visited signature contains method parameter types. */ + /** + * Whether the visited signature contains method parameter types. + */ private boolean hasParameters; /** @@ -41,7 +45,9 @@ public class SignatureWriter extends SignatureVisitor { */ private int argumentStack; - /** Constructs a new {@link SignatureWriter}. */ + /** + * Constructs a new {@link SignatureWriter}. + */ public SignatureWriter() { super(/* latest api =*/ Opcodes.ASM9); } @@ -192,7 +198,9 @@ public class SignatureWriter extends SignatureVisitor { // Utility methods // ----------------------------------------------------------------------------------------------- - /** Ends the formal type parameters section of the signature. */ + /** + * Ends the formal type parameters section of the signature. + */ private void endFormals() { if (hasFormals) { hasFormals = false; @@ -200,7 +208,9 @@ public class SignatureWriter extends SignatureVisitor { } } - /** Ends the type arguments of a class or inner class type. */ + /** + * Ends the type arguments of a class or inner class type. + */ private void endArguments() { // If the top of the stack is 'true', this means that some type arguments have been visited for // the type whose visit is now ending. We therefore need to append a '>', and to pop one element diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/CompileCache.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/CompileCache.java index b4cfcc39..4093e835 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/CompileCache.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/CompileCache.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.compile; import cn.universal.core.engine.MagicScript; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/Descriptor.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/Descriptor.java index 25267b53..4a7084fa 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/Descriptor.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/Descriptor.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.compile; import cn.universal.core.engine.asm.Type; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/MagicScriptCompileException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/MagicScriptCompileException.java index ccb3f688..ce364c07 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/MagicScriptCompileException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/MagicScriptCompileException.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.compile; public class MagicScriptCompileException extends RuntimeException { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/MagicScriptCompiler.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/MagicScriptCompiler.java index e994288c..ddd069f1 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/MagicScriptCompiler.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/compile/MagicScriptCompiler.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.compile; import cn.universal.core.engine.MagicScriptContext; @@ -36,7 +34,9 @@ import java.util.Set; import java.util.Stack; import java.util.concurrent.atomic.AtomicLong; -/** 脚本编译器 */ +/** + * 脚本编译器 + */ public class MagicScriptCompiler implements Opcodes { private static final AtomicLong COUNTER = new AtomicLong(1); @@ -45,16 +45,24 @@ public class MagicScriptCompiler implements Opcodes { private final Long id = COUNTER.getAndIncrement(); - /** < <= == === != !=== >= > 等操作符处理器 */ + /** + * < <= == === != !=== >= > 等操作符处理器 + */ private static final Handle OPERATOR_HANDLE = makeHandle(OperatorHandle.class); - /** << >> >>> & ^ | 运算 */ + /** + * << >> >>> & ^ | 运算 + */ private static final Handle BIT_HANDLE = makeHandle(BitHandle.class); - /** 方法调用、lambda调用、函数调用处理器 */ + /** + * 方法调用、lambda调用、函数调用处理器 + */ private static final Handle FUNCTION_HANDLE = makeHandle(FunctionCallHandle.class); - /** + - * / % 处理器 */ + /** + * + - * / % 处理器 + */ private static final Handle ARITHMETIC_HANDLE = makeHandle(ArithmeticHandle.class); private final Stack methodVisitors = new Stack<>(); @@ -67,9 +75,11 @@ public class MagicScriptCompiler implements Opcodes { private final Set varIndices; - /** -1 ~ 5的int值 */ + /** + * -1 ~ 5的int值 + */ private static final int[] ICONST = { - ICONST_M1, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5 + ICONST_M1, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5 }; private final List spans = new ArrayList<>(); @@ -115,7 +125,7 @@ public class MagicScriptCompiler implements Opcodes { /** * 创建方法 * - * @param access 访问属性 + * @param access 访问属性 * @param methodName 方法名 * @param descriptor 方法描述 */ @@ -133,34 +143,46 @@ public class MagicScriptCompiler implements Opcodes { return tempIndex++; } - /** 获取lambda函数下标 */ + /** + * 获取lambda函数下标 + */ public int getFunctionIndex() { return ++functionIndex; } - /** 标识continue和break位置 */ + /** + * 标识continue和break位置 + */ public MagicScriptCompiler markLabel(Label start, Label end) { - labelStack.push(new Label[] {start, end}); + labelStack.push(new Label[]{start, end}); return this; } - /** 消除标记 */ + /** + * 消除标记 + */ public MagicScriptCompiler exitLabel() { labelStack.pop(); return this; } - /** 跳转到continue位置 */ + /** + * 跳转到continue位置 + */ public MagicScriptCompiler start() { return jump(GOTO, labelStack.peek()[0]); } - /** 跳转到break位置 */ + /** + * 跳转到break位置 + */ public MagicScriptCompiler end() { return jump(GOTO, labelStack.peek()[1]); } - /** 访问AST节点 */ + /** + * 访问AST节点 + */ public MagicScriptCompiler visit(Node node) { // 对于赋值语句的特殊处理 if (node instanceof AssigmentOperation) { @@ -173,7 +195,9 @@ public class MagicScriptCompiler implements Opcodes { return compile(node, false); } - /** 编译AST节点 */ + /** + * 编译AST节点 + */ public MagicScriptCompiler compile(Node node) { return compile(node, false); } @@ -217,7 +241,7 @@ public class MagicScriptCompiler implements Opcodes { * 编译AST节点 * * @param node AST节点 - * @param pop 是否需要弹出栈顶 + * @param pop 是否需要弹出栈顶 */ public MagicScriptCompiler compile(Node node, boolean pop) { if (node == null) { @@ -269,44 +293,58 @@ public class MagicScriptCompiler implements Opcodes { return this; } - /** 访问 */ + /** + * 访问 + */ public MagicScriptCompiler visit(List nodes) { nodes.forEach(this::visit); return this; } - /** 编译 */ + /** + * 编译 + */ public MagicScriptCompiler compile(List nodes) { nodes.forEach(it -> compile(it, true)); return this; } - /** 加载this */ + /** + * 加载this + */ public MagicScriptCompiler load0() { self().visitVarInsn(ALOAD, 0); return this; } - /** 加载context */ + /** + * 加载context + */ public MagicScriptCompiler load1() { self().visitVarInsn(ALOAD, 1); return this; } - /** 加载context */ + /** + * 加载context + */ public void newArrayList() { this.typeInsn(NEW, ArrayList.class) .insn(DUP) .invoke(INVOKESPECIAL, ArrayList.class, "", void.class); } - /** 加载Variables */ + /** + * 加载Variables + */ public MagicScriptCompiler load2() { self().visitVarInsn(ALOAD, 2); return this; } - /** 加载3号变量,一般指异常(临时变量) */ + /** + * 加载3号变量,一般指异常(临时变量) + */ public MagicScriptCompiler load3() { self().visitVarInsn(ALOAD, 3); return this; @@ -317,14 +355,18 @@ public class MagicScriptCompiler implements Opcodes { return this; } - /** 加载变量 */ + /** + * 加载变量 + */ public MagicScriptCompiler load(int index) { return load2() .visitInt(index) .invoke(INVOKEVIRTUAL, Variables.class, "getValue", Object.class, int.class); } - /** 加载变量 */ + /** + * 加载变量 + */ public MagicScriptCompiler load(VarIndex varIndex) { return load(varIndex.getIndex()); } @@ -357,13 +399,17 @@ public class MagicScriptCompiler implements Opcodes { return this; } - /** 跳转 */ + /** + * 跳转 + */ public MagicScriptCompiler jump(int opcode, Label label) { self().visitJumpInsn(opcode, label); return this; } - /** 移除变量 */ + /** + * 移除变量 + */ public MagicScriptCompiler remove(VarIndex varIndex) { if (varIndex == null) { return this; @@ -371,7 +417,9 @@ public class MagicScriptCompiler implements Opcodes { return remove(varIndex.getName()); } - /** 移除变量 */ + /** + * 移除变量 + */ public MagicScriptCompiler remove(String name) { List varList = vars.peek(); int index = varList.indexOf(name); @@ -381,41 +429,55 @@ public class MagicScriptCompiler implements Opcodes { return this; } - /** 配合pre_store使用,保存至数组中 */ + /** + * 配合pre_store使用,保存至数组中 + */ public MagicScriptCompiler store() { return invoke(INVOKEVIRTUAL, Variables.class, "setValue", void.class, int.class, Object.class); } - /** 配合pre_store使用,保存至数组中 */ + /** + * 配合pre_store使用,保存至数组中 + */ public MagicScriptCompiler store(VarIndex varIndex) { return varIndex.isScoped() ? scopeStore() : store(); } - /** 配合pre_store使用,保存至数组中 */ + /** + * 配合pre_store使用,保存至数组中 + */ public MagicScriptCompiler scopeStore() { return invoke( INVOKEVIRTUAL, Variables.class, "setScopeValue", void.class, int.class, Object.class); } - /** 保存变量 */ + /** + * 保存变量 + */ public MagicScriptCompiler store(int index) { self().visitVarInsn(ASTORE, index); return this; } - /** 保存变量 */ + /** + * 保存变量 + */ public MagicScriptCompiler frame( int type, int numLocal, Object[] local, int numStack, Object[] stack) { self().visitFrame(type, numLocal, local, numStack, stack); return this; } - /** 写变量前的准备 */ + /** + * 写变量前的准备 + */ public MagicScriptCompiler pre_store(int index) { return load2().visitInt(index); } - /** 写变量前的准备 */ + /** + * 写变量前的准备 + */ public MagicScriptCompiler pre_store(VarIndex varIndex) { return pre_store(varIndex.getIndex()); } @@ -507,7 +569,7 @@ public class MagicScriptCompiler implements Opcodes { * invokedynamic调用 * * @param methodName 方法名 - * @param arguments 参数个数 + * @param arguments 参数个数 */ public MagicScriptCompiler call(String methodName, int arguments) { self() @@ -534,12 +596,16 @@ public class MagicScriptCompiler implements Opcodes { return this; } - /** 将int值装箱 */ + /** + * 将int值装箱 + */ public MagicScriptCompiler asInteger() { return invoke(INVOKESTATIC, Integer.class, "valueOf", Integer.class, int.class); } - /** 将boolean值装箱 */ + /** + * 将boolean值装箱 + */ public MagicScriptCompiler asBoolean() { return invoke(INVOKESTATIC, Boolean.class, "valueOf", Boolean.class, boolean.class); } @@ -547,10 +613,10 @@ public class MagicScriptCompiler implements Opcodes { /** * 调用方法 * - * @param opcode 调用类型 - * @param target 目标类 - * @param method 方法名 - * @param returnType 返回值类型 + * @param opcode 调用类型 + * @param target 目标类 + * @param method 方法名 + * @param returnType 返回值类型 * @param argumentTypes 参数类型 */ public MagicScriptCompiler invoke( @@ -561,11 +627,11 @@ public class MagicScriptCompiler implements Opcodes { /** * 调用方法 * - * @param opcode 调用类型 - * @param target 目标类 - * @param method 方法名 - * @param isInterface 是否是接口 - * @param returnType 返回值类型 + * @param opcode 调用类型 + * @param target 目标类 + * @param method 方法名 + * @param isInterface 是否是接口 + * @param returnType 返回值类型 * @param argumentTypes 参数类型 */ public MagicScriptCompiler invoke( @@ -599,7 +665,9 @@ public class MagicScriptCompiler implements Opcodes { self().visitIntInsn(opcode, operand); } - /** 编译数组 */ + /** + * 编译数组 + */ public MagicScriptCompiler newArray(List values) { int size = values.size(); visitInt(size).typeInsn(ANEWARRAY, Object.class); @@ -609,7 +677,9 @@ public class MagicScriptCompiler implements Opcodes { return this; } - /** 编译int值 */ + /** + * 编译int值 + */ public MagicScriptCompiler visitInt(int value) { if (value >= -1 && value <= 5) { insn(ICONST[value + 1]); @@ -746,7 +816,9 @@ public class MagicScriptCompiler implements Opcodes { return classWriter.toByteArray(); } - /** 获取类名 */ + /** + * 获取类名 + */ public String getClassName() { return "MagicScript_" + id; } diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/constant/SafeRule.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/constant/SafeRule.java index 243b34fe..dcb156a4 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/constant/SafeRule.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/constant/SafeRule.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.constant; import java.util.Set; @@ -8,7 +6,6 @@ import java.util.stream.Stream; /** * @Author Aleo - * * @version 1.0 * @since 2023/5/19 */ diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/BooleanImplicitConvert.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/BooleanImplicitConvert.java index b367dcd7..4f66b854 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/BooleanImplicitConvert.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/BooleanImplicitConvert.java @@ -1,11 +1,11 @@ - - package cn.universal.core.engine.convert; import cn.universal.core.engine.parsing.ast.literal.BooleanLiteral; import cn.universal.core.engine.runtime.Variables; -/** 任意值到boolean类型的隐式转换 */ +/** + * 任意值到boolean类型的隐式转换 + */ public class BooleanImplicitConvert implements ClassImplicitConvert { @Override diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/ClassImplicitConvert.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/ClassImplicitConvert.java index 081eefc4..808f30f3 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/ClassImplicitConvert.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/ClassImplicitConvert.java @@ -1,19 +1,23 @@ - - package cn.universal.core.engine.convert; import cn.universal.core.engine.runtime.Variables; public interface ClassImplicitConvert { - /** 转换顺序 */ + /** + * 转换顺序 + */ default int sort() { return Integer.MAX_VALUE; } - /** 是否支持隐式自动转换 */ + /** + * 是否支持隐式自动转换 + */ boolean support(Class from, Class to); - /** 转换 */ + /** + * 转换 + */ Object convert(Variables variables, Object source, Class target); } diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/CollectionImplicitConvert.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/CollectionImplicitConvert.java index 479f1583..aee7ab71 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/CollectionImplicitConvert.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/CollectionImplicitConvert.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.convert; import cn.universal.core.engine.functions.StreamExtension; @@ -11,7 +9,9 @@ import java.util.Collection; import java.util.Enumeration; import java.util.Iterator; -/** 集合、数组隐式转换 */ +/** + * 集合、数组隐式转换 + */ public class CollectionImplicitConvert implements ClassImplicitConvert { private Class fromClazz; @@ -21,13 +21,13 @@ public class CollectionImplicitConvert implements ClassImplicitConvert { @Override public boolean support(Class from, Class to) { if ((from.isArray() - || Collection.class.isAssignableFrom(from) - || Iterator.class.isAssignableFrom(from) - || Enumeration.class.isAssignableFrom(from)) + || Collection.class.isAssignableFrom(from) + || Iterator.class.isAssignableFrom(from) + || Enumeration.class.isAssignableFrom(from)) && (to.isArray() - || Collection.class.isAssignableFrom(to) - || Iterator.class.isAssignableFrom(to) - || Enumeration.class.isAssignableFrom(to))) { + || Collection.class.isAssignableFrom(to) + || Iterator.class.isAssignableFrom(to) + || Enumeration.class.isAssignableFrom(to))) { return (fromClazz = getGenericType(from)) != null && !JavaReflection.isPrimitiveAssignableFrom(fromClazz, fromClazz) && (toClazz = getGenericType(to)) != null diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/FunctionalImplicitConvert.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/FunctionalImplicitConvert.java index e3f76b76..f5246940 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/FunctionalImplicitConvert.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/FunctionalImplicitConvert.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.convert; import cn.universal.core.engine.runtime.Variables; @@ -8,7 +6,9 @@ import java.lang.reflect.Modifier; import java.lang.reflect.Proxy; import java.util.function.Function; -/** 脚本内部lambda到Java函数式的转换 */ +/** + * 脚本内部lambda到Java函数式的转换 + */ public class FunctionalImplicitConvert implements ClassImplicitConvert { private final ClassLoader classLoader = FunctionalImplicitConvert.class.getClassLoader(); @@ -33,7 +33,7 @@ public class FunctionalImplicitConvert implements ClassImplicitConvert { if (aClass.isArray() && aClass.getComponentType() == Object.class) { param = (Object[]) args; } else { - param = new Object[] {args}; + param = new Object[]{args}; } } return function.apply(variables, param); @@ -41,7 +41,7 @@ public class FunctionalImplicitConvert implements ClassImplicitConvert { } return Proxy.newProxyInstance( classLoader, - new Class[] {target}, + new Class[]{target}, (proxy, method, args) -> { if (Modifier.isAbstract(method.getModifiers())) { return function.apply(variables, args); diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/MapImplicitConvert.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/MapImplicitConvert.java index 509634b4..07d779e7 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/MapImplicitConvert.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/convert/MapImplicitConvert.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.convert; import cn.universal.core.engine.functions.MapExtension; @@ -10,7 +8,9 @@ import java.util.Enumeration; import java.util.Iterator; import java.util.Map; -/** Map到Bean的隐式转换 */ +/** + * Map到Bean的隐式转换 + */ public class MapImplicitConvert implements ClassImplicitConvert { @Override diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/DebugTimeoutException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/DebugTimeoutException.java index 176516c1..8189193e 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/DebugTimeoutException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/DebugTimeoutException.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.exception; public class DebugTimeoutException extends RuntimeException { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/ExceptionUtils.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/ExceptionUtils.java index cb4a8b3b..5036d419 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/ExceptionUtils.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/ExceptionUtils.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.exception; public class ExceptionUtils { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicExitException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicExitException.java index e3090f12..42b26d11 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicExitException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicExitException.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.exception; import cn.universal.core.engine.runtime.ExitValue; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptAssertException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptAssertException.java index fd2af786..57177551 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptAssertException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptAssertException.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.exception; public class MagicScriptAssertException extends RuntimeException { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptException.java index e299302d..9884a2d9 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptException.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.exception; import cn.universal.core.engine.parsing.Span; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptRuntimeException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptRuntimeException.java index e310f1e1..4718dcef 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptRuntimeException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/MagicScriptRuntimeException.java @@ -1,10 +1,9 @@ - - package cn.universal.core.engine.exception; public class MagicScriptRuntimeException extends RuntimeException { - public MagicScriptRuntimeException() {} + public MagicScriptRuntimeException() { + } public MagicScriptRuntimeException(String message) { super(message); diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/RegexpLiteralException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/RegexpLiteralException.java index 7c7c81ad..f498131a 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/RegexpLiteralException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/RegexpLiteralException.java @@ -1,5 +1,5 @@ - - package cn.universal.core.engine.exception; -public class RegexpLiteralException extends RuntimeException {} +public class RegexpLiteralException extends RuntimeException { + +} diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/ResourceNotFoundException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/ResourceNotFoundException.java index 020ba27a..3abfd9cc 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/ResourceNotFoundException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/ResourceNotFoundException.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.exception; public class ResourceNotFoundException extends RuntimeException { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/StringLiteralException.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/StringLiteralException.java index a208dbaa..b2b0d697 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/StringLiteralException.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/exception/StringLiteralException.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.exception; public class StringLiteralException extends RuntimeException { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ArrayFunctions.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ArrayFunctions.java index fc383119..f2292f1f 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ArrayFunctions.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ArrayFunctions.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.functions; import cn.universal.core.engine.annotation.Comment; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ClassExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ClassExtension.java index 67bcd5a8..7e36a03b 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ClassExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ClassExtension.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.functions; import cn.universal.core.engine.annotation.Comment; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/CollectionFunctions.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/CollectionFunctions.java index acb396b0..ca07af8b 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/CollectionFunctions.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/CollectionFunctions.java @@ -1,12 +1,12 @@ - - package cn.universal.core.engine.functions; import cn.universal.core.engine.annotation.Comment; import cn.universal.core.engine.annotation.Function; import java.util.Iterator; -/** 集合相关函数 */ +/** + * 集合相关函数 + */ public class CollectionFunctions { @Function diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DateExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DateExtension.java index 4f2967e4..56d72174 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DateExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DateExtension.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.functions; import cn.universal.core.engine.annotation.Comment; @@ -8,7 +6,9 @@ import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.util.Date; -/** Date扩展 */ +/** + * Date扩展 + */ public class DateExtension { private static final ZoneId SYSTEM_ZONE_ID = ZoneId.systemDefault(); diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicAttribute.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicAttribute.java index 0fba4cc3..072140f9 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicAttribute.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicAttribute.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.functions; import cn.universal.core.engine.exception.MagicScriptRuntimeException; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicMethod.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicMethod.java index 416060a9..915a14d3 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicMethod.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicMethod.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.functions; import java.util.List; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicModuleImport.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicModuleImport.java index 4b5cca1f..5e3d14e3 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicModuleImport.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/DynamicModuleImport.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.functions; import cn.universal.core.engine.MagicScriptContext; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ExtensionMethod.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ExtensionMethod.java index 82c1ff8d..6917586c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ExtensionMethod.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ExtensionMethod.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.functions; import java.util.Collections; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/MagicScriptFunctions.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/MagicScriptFunctions.java index e06895c7..436d75cf 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/MagicScriptFunctions.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/MagicScriptFunctions.java @@ -1,12 +1,12 @@ - - package cn.universal.core.engine.functions; import cn.universal.core.engine.annotation.Comment; import cn.universal.core.engine.annotation.Function; import java.util.UUID; -/** 脚本能力扩展 */ +/** + * 脚本能力扩展 + */ public class MagicScriptFunctions { @Comment("生成uuid字符串,不包含`-`") diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/MapExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/MapExtension.java index 839adb9b..1349aa93 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/MapExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/MapExtension.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.functions; import cn.universal.core.engine.annotation.Comment; @@ -43,9 +41,9 @@ public class MapExtension { public static List asList( Map source, @Comment(name = "mapping", value = "映射函数,如:(key,value,source)=>{'k' : key,'v' : value}") - Function mapping) { + Function mapping) { List result = new ArrayList<>(); - source.forEach((key, value) -> result.add(mapping.apply(new Object[] {key, value, source}))); + source.forEach((key, value) -> result.add(mapping.apply(new Object[]{key, value, source}))); return result; } @@ -77,8 +75,8 @@ public class MapExtension { public Map each( Map source, @Comment(name = "function", value = "循环函数,如:(key,value,source)=>map['xx'] = key;") - Function function) { - source.forEach((key, value) -> function.apply(new Object[] {key, value, source})); + Function function) { + source.forEach((key, value) -> function.apply(new Object[]{key, value, source})); return source; } @@ -126,12 +124,12 @@ public class MapExtension { Map source, @Comment(name = "separator", value = "key与value之间的连接符,如=") String separator, @Comment(name = "mapping", value = "转换方法,如:(key,value)=>key + '=' + value || ''") - Function mapping) { + Function mapping) { Set> entries = source.entrySet(); StringBuilder builder = new StringBuilder(); for (Map.Entry entry : entries) { builder.append( - Objects.toString(mapping.apply(new Object[] {entry.getKey(), entry.getValue()}), "")); + Objects.toString(mapping.apply(new Object[]{entry.getKey(), entry.getValue()}), "")); builder.append(separator); } if (entries.size() > 0) { @@ -165,7 +163,7 @@ public class MapExtension { public Map sort( Map source, @Comment(name = "comparator", value = "比较器,如:(k1,k2,v1,v2)=>k1.compareTo(k2);") - Function comparator) { + Function comparator) { Set keys = source.keySet(); Map sortedMap = new LinkedHashMap<>(); keys.stream() @@ -173,7 +171,7 @@ public class MapExtension { (Comparator) (o1, o2) -> ObjectConvertExtension.asInt( - comparator.apply(new Object[] {o1, o2, source.get(o1), source.get(o2)}), 0)) + comparator.apply(new Object[]{o1, o2, source.get(o1), source.get(o2)}), 0)) .forEach( key -> { sortedMap.put(key, source.get(key)); @@ -204,7 +202,7 @@ public class MapExtension { Map result = new LinkedHashMap<>(); Set> entries = source.entrySet(); for (Map.Entry entry : entries) { - result.put(functional.apply(new Object[] {entry.getKey()}), entry.getValue()); + result.put(functional.apply(new Object[]{entry.getKey()}), entry.getValue()); } return result; } diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/NumberExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/NumberExtension.java index 7e25c0dc..4d50b4d9 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/NumberExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/NumberExtension.java @@ -1,16 +1,17 @@ - - package cn.universal.core.engine.functions; import cn.universal.core.engine.annotation.Comment; import java.math.BigDecimal; import java.math.RoundingMode; -/** Number类型扩展 */ +/** + * Number类型扩展 + */ public class NumberExtension { @Comment("四舍五入保留N位小数") - public static double round(Number number, @Comment(name = "num", value = "规定小数的位数") int num) { + public static double round(Number number, + @Comment(name = "num", value = "规定小数的位数") int num) { return new BigDecimal("" + number.doubleValue()) .setScale(num, RoundingMode.HALF_UP) .doubleValue(); @@ -37,7 +38,8 @@ public class NumberExtension { } @Comment("转为百分比") - public static String asPercent(Number number, @Comment(name = "num", value = "规定小数的位数") int num) { + public static String asPercent(Number number, + @Comment(name = "num", value = "规定小数的位数") int num) { return new BigDecimal(number.doubleValue() * 100).setScale(num, RoundingMode.HALF_UP).toString() + "%"; } diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ObjectConvertExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ObjectConvertExtension.java index 3f1404df..1ae0d085 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ObjectConvertExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ObjectConvertExtension.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.functions; import cn.universal.core.engine.annotation.Comment; @@ -8,7 +6,9 @@ import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; -/** 类型转换 */ +/** + * 类型转换 + */ public class ObjectConvertExtension { /** @@ -33,7 +33,8 @@ public class ObjectConvertExtension { */ @Comment("将对象转为double类型") public static double asDouble( - Object val, @Comment(name = "defaultValue", value = "转换失败时的默认值") double defaultValue) { + Object val, + @Comment(name = "defaultValue", value = "转换失败时的默认值") double defaultValue) { try { return asDecimal(val).doubleValue(); } catch (Exception e) { @@ -56,19 +57,25 @@ public class ObjectConvertExtension { } } - /** 转String */ + /** + * 转String + */ @Comment("将对象转为String类型") public static String asString(Object val) { return asString(val, null); } - /** 转Date */ + /** + * 转Date + */ @Comment("将对象转为Date类型,默认字符串格式为yyyy-MM-dd HH:mm:ss") public static Date asDate(Object val) { return asDate(val, "yyyy-MM-dd HH:mm:ss"); } - /** 转BigDecimal */ + /** + * 转BigDecimal + */ @Comment("将对象转为BigDecimal类型") public static BigDecimal asDecimal(Object val) { if (val instanceof BigDecimal) { @@ -77,10 +84,13 @@ public class ObjectConvertExtension { return new BigDecimal(asString(val)); } - /** 转BigDecimal */ + /** + * 转BigDecimal + */ @Comment("将对象转为BigDecimal类型") public static BigDecimal asDecimal( - Object val, @Comment(name = "defaultVal", value = "转换失败时的默认值") BigDecimal defaultVal) { + Object val, + @Comment(name = "defaultVal", value = "转换失败时的默认值") BigDecimal defaultVal) { if (val instanceof BigDecimal) { return (BigDecimal) val; } @@ -91,10 +101,13 @@ public class ObjectConvertExtension { } } - /** 转Date */ + /** + * 转Date + */ @Comment("将对象转为Date类型,支持String、10位、13位时间戳") public static Date asDate( - Object val, @Comment(name = "format", value = "日期格式,如yyyy-MM-dd HH:mm:ss") String format) { + Object val, + @Comment(name = "format", value = "日期格式,如yyyy-MM-dd HH:mm:ss") String format) { if (val == null) { return null; } @@ -127,29 +140,38 @@ public class ObjectConvertExtension { */ @Comment("将对象转为String类型") public static String asString( - Object val, @Comment(name = "defaultValue", value = "转换失败时的默认值") String defaultValue) { + Object val, + @Comment(name = "defaultValue", value = "转换失败时的默认值") String defaultValue) { return val == null ? defaultValue : val.toString(); } - /** 转int */ + /** + * 转int + */ @Comment("将值转换为int类型,转换失败时为0") public int asInt(Object val) { return asInt(val, 0); } - /** 转double */ + /** + * 转double + */ @Comment("将对象转为double类型,转换失败时为0.0") public double asDouble(Object val) { return asDouble(val, 0.0); } - /** 转long */ + /** + * 转long + */ @Comment("将对象转为long类型,转换失败时为0L") public long asLong(Object val) { return asLong(val, 0L); } - /** 转byte */ + /** + * 转byte + */ @Comment("将对象转为byte类型,转换失败时默认为0") public byte asByte(Object val) { return asByte(val, (byte) 0); @@ -170,7 +192,9 @@ public class ObjectConvertExtension { } } - /** 转short */ + /** + * 转short + */ @Comment("将对象转为short类型,转换失败时默认为0") public short asShort(Object val) { return asShort(val, (short) 0); @@ -183,7 +207,8 @@ public class ObjectConvertExtension { */ @Comment("将对象转为short类型") public short asShort( - Object val, @Comment(name = "defaultValue", value = "转换失败时的默认值") short defaultValue) { + Object val, + @Comment(name = "defaultValue", value = "转换失败时的默认值") short defaultValue) { try { return asDecimal(val).shortValue(); } catch (Exception e) { @@ -191,7 +216,9 @@ public class ObjectConvertExtension { } } - /** 转float */ + /** + * 转float + */ @Comment("将对象转为float类型,转换失败默认为0.0f") public float asFloat(Object val) { return asFloat(val, 0.0f); @@ -204,7 +231,8 @@ public class ObjectConvertExtension { */ @Comment("将对象转为float类型") public float asFloat( - Object val, @Comment(name = "defaultValue", value = "转换失败时的默认值") float defaultValue) { + Object val, + @Comment(name = "defaultValue", value = "转换失败时的默认值") float defaultValue) { try { return asDecimal(val).floatValue(); } catch (Exception e) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ObjectTypeConditionExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ObjectTypeConditionExtension.java index 032409d7..c1a07a6f 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ObjectTypeConditionExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/ObjectTypeConditionExtension.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.functions; import cn.universal.core.engine.annotation.Comment; @@ -9,19 +7,26 @@ import java.util.Date; import java.util.List; import java.util.Map; -/** 类型判断 */ +/** + * 类型判断 + */ public class ObjectTypeConditionExtension { - /** 判断是否是目标类型 */ + /** + * 判断是否是目标类型 + */ @Comment("判断对象是否为指定类型的对象") - public static boolean is(Object target, @Comment(name = "clazz", value = "目标类型") Class clazz) { + public static boolean is(Object target, + @Comment(name = "clazz", value = "目标类型") Class clazz) { if (target == null || clazz == null) { return false; } return clazz.isAssignableFrom(target.getClass()); } - /** 判断是否是数组 */ + /** + * 判断是否是数组 + */ @Comment("判断对象是否是数组") public static boolean isArray(Object target) { if (target instanceof Class) { @@ -30,7 +35,9 @@ public class ObjectTypeConditionExtension { return target.getClass().isArray(); } - /** 判断是否是集合 */ + /** + * 判断是否是集合 + */ @Comment("判断对象是否是集合") public static boolean isCollection(Object target) { if (target instanceof Class) { @@ -39,7 +46,9 @@ public class ObjectTypeConditionExtension { return Collection.class.isAssignableFrom(target.getClass()); } - /** 判断是否是Map */ + /** + * 判断是否是Map + */ @Comment("判断对象是否是Map") public static boolean isMap(Object target) { if (target instanceof Class) { @@ -48,14 +57,16 @@ public class ObjectTypeConditionExtension { return Map.class.isAssignableFrom(target.getClass()); } - /** 判断是否是目标类型 */ + /** + * 判断是否是目标类型 + */ @Comment("判断对象是否为指定类型的对象,type为null时 返回false,支持类名缩写") public boolean is( Object target, @Comment( - name = "type", - value = "类名或全类名或string、int、double、float、long、byte、short、bigdecimal、boolean") - String type) { + name = "type", + value = "类名或全类名或string、int、double、float、long、byte、short、bigdecimal、boolean") + String type) { if (type == null) { return false; } @@ -95,61 +106,81 @@ public class ObjectTypeConditionExtension { return "decimal".equalsIgnoreCase(type) && clazz == BigDecimal.class; } - /** 判断是否是String */ + /** + * 判断是否是String + */ @Comment("判断对象是否是String类型") public boolean isString(Object target) { return is(target, String.class); } - /** 判断是否是int */ + /** + * 判断是否是int + */ @Comment("判断对象是否是int类型") public boolean isInt(Object target) { return is(target, Integer.class); } - /** 判断是否是double */ + /** + * 判断是否是double + */ @Comment("判断对象是否是double类型") public boolean isDouble(Object target) { return is(target, Double.class); } - /** 判断是否是long */ + /** + * 判断是否是long + */ @Comment("判断对象是否是long类型") public boolean isLong(Object target) { return is(target, Long.class); } - /** 判断是否是byte */ + /** + * 判断是否是byte + */ @Comment("判断对象是否是byte类型") public boolean isByte(Object target) { return is(target, Byte.class); } - /** 判断是否是short */ + /** + * 判断是否是short + */ @Comment("判断对象是否是short类型") public boolean isShort(Object target) { return is(target, Short.class); } - /** 判断是否是boolean */ + /** + * 判断是否是boolean + */ @Comment("判断对象是否是boolean类型") public boolean isBoolean(Object target) { return is(target, Boolean.class); } - /** 判断是否是BigDecimal */ + /** + * 判断是否是BigDecimal + */ @Comment("判断对象是否是BigDecimal类型") public boolean isDecimal(Object target) { return is(target, BigDecimal.class); } - /** 判断是否是Date */ + /** + * 判断是否是Date + */ @Comment("判断对象是否是Date类型") public boolean isDate(Object target) { return is(target, Date.class); } - /** 判断是否是List */ + /** + * 判断是否是List + */ @Comment("判断对象是否是List") public boolean isList(Object target) { if (target instanceof Class) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/PatternExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/PatternExtension.java index 095e0a37..b8ed0628 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/PatternExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/PatternExtension.java @@ -1,15 +1,16 @@ - - package cn.universal.core.engine.functions; import cn.universal.core.engine.annotation.Comment; import java.util.regex.Pattern; -/** Pattern 扩展 */ +/** + * Pattern 扩展 + */ public class PatternExtension { @Comment("校验文本是否符合正则") - public boolean test(Pattern pattern, @Comment(name = "source", value = "目标字符串") String source) { + public boolean test(Pattern pattern, + @Comment(name = "source", value = "目标字符串") String source) { return source != null && pattern.matcher(source).find(); } } diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StreamExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StreamExtension.java index c5873714..17d6d8e2 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StreamExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StreamExtension.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.functions; import cn.universal.core.engine.annotation.Comment; @@ -28,7 +26,9 @@ import java.util.stream.Stream; public class StreamExtension { - /** 将对象转为List */ + /** + * 将对象转为List + */ @Comment("将对象转为List") public static List arrayLikeToList(Object arrayLike) { if (arrayLike == null) { @@ -54,7 +54,9 @@ public class StreamExtension { throw new MagicScriptException("不支持的类型:" + arrayLike.getClass()); } - /** 将list拼接起来 */ + /** + * 将list拼接起来 + */ @Comment("将集合使用连接符拼接起来") public static String join( Object target, @Comment(name = "separator", value = "拼接符,如`,`") String separator) { @@ -173,12 +175,12 @@ public class StreamExtension { public Object map( Object target, @Comment(name = "function", value = "转换函数,如提取属性`(item)=>item.xxx`") - Function function) { + Function function) { List objects = arrayLikeToList(target); List results = new ArrayList<>(objects.size()); for (int i = 0, len = objects.size(); i < len; i++) { Object object = objects.get(i); - results.add(function.apply(new Object[] {object, i, len})); + results.add(function.apply(new Object[]{object, i, len})); } return toOriginType(target, results); } @@ -192,12 +194,12 @@ public class StreamExtension { public Object filter( Object target, @Comment(name = "function", value = "过滤条件,如`(item)=>item.xxx == 1`") - Function function) { + Function function) { List objects = arrayLikeToList(target); List results = new ArrayList<>(objects.size()); for (int i = 0, len = objects.size(); i < len; i++) { Object object = objects.get(i); - if (BooleanLiteral.isTrue(function.apply(new Object[] {object, i, len}))) { + if (BooleanLiteral.isTrue(function.apply(new Object[]{object, i, len}))) { results.add(object); } } @@ -208,11 +210,11 @@ public class StreamExtension { public Object find( Object target, @Comment(name = "function", value = "匹配条件,如`(item)=>item.xxx == 1`") - Function function) { + Function function) { List objects = arrayLikeToList(target); for (int i = 0, len = objects.size(); i < len; i++) { Object object = objects.get(i); - if (BooleanLiteral.isTrue(function.apply(new Object[] {object, i, len}))) { + if (BooleanLiteral.isTrue(function.apply(new Object[]{object, i, len}))) { return object; } } @@ -223,11 +225,11 @@ public class StreamExtension { public int findIndex( Object target, @Comment(name = "function", value = "匹配条件,如`(item)=>item.xxx == 1`") - Function function) { + Function function) { List objects = arrayLikeToList(target); for (int i = 0, len = objects.size(); i < len; i++) { Object object = objects.get(i); - if (BooleanLiteral.isTrue(function.apply(new Object[] {object, i, len}))) { + if (BooleanLiteral.isTrue(function.apply(new Object[]{object, i, len}))) { return i; } } @@ -255,7 +257,7 @@ public class StreamExtension { Map map = new LinkedHashMap<>(size); for (int i = 0; i < size; i++) { Object item = target.get(i); - Object[] parameters = new Object[] {item, i, size}; + Object[] parameters = new Object[]{item, i, size}; map.put(mappingKey.apply(parameters), mappingValue.apply(parameters)); } return map; @@ -277,30 +279,34 @@ public class StreamExtension { public Object each( Object target, @Comment(name = "function", value = "循环函数,如循环添加属性`(item)=>{item.xxx = 'newVal'}`") - Function function) { + Function function) { List objects = arrayLikeToList(target); List results = new ArrayList<>(objects.size()); for (int i = 0, len = objects.size(); i < len; i++) { Object object = objects.get(i); - function.apply(new Object[] {object, i, len}); + function.apply(new Object[]{object, i, len}); results.add(object); } return toOriginType(target, results); } - /** 排序 */ + /** + * 排序 + */ @Comment(value = "将集合进行排序,并返回新集合", origin = true) public Object sort( Object target, @Comment(name = "function", value = "排序函数,如从大到小`(a,b)=>a-b`") - Function function) { + Function function) { List objects = arrayLikeToList(target); objects.sort( - (o1, o2) -> ObjectConvertExtension.asInt(function.apply(new Object[] {o1, o2}), 0)); + (o1, o2) -> ObjectConvertExtension.asInt(function.apply(new Object[]{o1, o2}), 0)); return toOriginType(target, objects); } - /** 反转 */ + /** + * 反转 + */ @Comment(value = "将集合进行反转操作", origin = true) public Object reserve(Object target) { List objects = arrayLikeToList(target); @@ -308,7 +314,9 @@ public class StreamExtension { return toOriginType(target, objects); } - /** 将list打乱 */ + /** + * 将list打乱 + */ @Comment(value = "将集合的顺序打乱", origin = true) public Object shuffle(Object target) { List objects = arrayLikeToList(target); @@ -344,12 +352,12 @@ public class StreamExtension { public Object distinct( Object target, @Comment(name = "condition", value = "去重转换器,如根据id去重 `item=>item.id`") - Function condition) { + Function condition) { List list = arrayLikeToList(target); List result = new ArrayList<>(list.size()); Set sets = new LinkedHashSet<>(list.size()); for (Object e : list) { - Object res = condition.apply(new Object[] {e}); + Object res = condition.apply(new Object[]{e}); if (!sets.contains(res)) { sets.add(res); result.add(e); @@ -358,13 +366,17 @@ public class StreamExtension { return toOriginType(target, result); } - /** 将list拼接起来 */ + /** + * 将list拼接起来 + */ @Comment("将集合使用`,`拼接起来") public String join(Object target) { return join(target, ","); } - /** 取最大值 */ + /** + * 取最大值 + */ @Comment("取出集合最大值,如果找不到返回`null`") public Object max(Object target) { return arrayLikeToList(target).stream() @@ -373,7 +385,9 @@ public class StreamExtension { .orElse(null); } - /** 取最小值 */ + /** + * 取最小值 + */ @Comment("取出集合最小值,如果找不到返回`null`") public Object min(Object target) { return arrayLikeToList(target).stream() @@ -382,7 +396,9 @@ public class StreamExtension { .orElse(null); } - /** 取平均值 */ + /** + * 取平均值 + */ @Comment("取出集合平均值,如果无法计算返回`null`") public Double avg(Object target) { OptionalDouble average = @@ -393,7 +409,9 @@ public class StreamExtension { return average.isPresent() ? average.getAsDouble() : null; } - /** 累计求和 */ + /** + * 累计求和 + */ @Comment("对集合进行累加操作") public Number sum(Object target) { return arrayLikeToList(target).stream() @@ -411,7 +429,7 @@ public class StreamExtension { public Map> group( Object target, @Comment(name = "condition", value = "分组条件,如`item=>item.xxx + '_' + item.yyy`") - Function condition) { + Function condition) { return arrayLikeToList(target).stream() .collect( Collectors.groupingBy( @@ -424,15 +442,15 @@ public class StreamExtension { * 分组 * * @param condition 分组条件 - * @param mapping 结果映射 + * @param mapping 结果映射 */ @Comment("对集合进行分组并转换") public Map group( Object target, @Comment(name = "condition", value = "分组条件,如`item=>item.xxx + '_' + item.yyy`") - Function condition, + Function condition, @Comment(name = "mapping", value = "转换函数,如分组求和`(list)=>list.sum()`") - Function mapping) { + Function mapping) { return arrayLikeToList(target).stream() .collect( Collectors.groupingBy( @@ -445,8 +463,8 @@ public class StreamExtension { /** * 合并两个集合,类似sql join 操作 * - * @param source 左表 - * @param target 右表 + * @param source 左表 + * @param target 右表 * @param condition 条件 */ @Comment("将两个集合关联起来") @@ -454,7 +472,7 @@ public class StreamExtension { Object source, @Comment(name = "target", value = "另一个集合") Object target, @Comment(name = "condition", value = "关联条件,如:`(left,right)=>left.xxx = right.xxx`") - Function condition) { + Function condition) { return join( source, target, @@ -476,19 +494,19 @@ public class StreamExtension { /** * 合并两个集合,类似 sql join 操作 * - * @param source 左表 - * @param target 右表 + * @param source 左表 + * @param target 右表 * @param condition 条件 - * @param mapping 映射 + * @param mapping 映射 */ @Comment("将两个集合关联并转换") public List join( Object source, @Comment(name = "target", value = "另一个集合") Object target, @Comment(name = "condition", value = "关联条件,如:`(left,right)=>left.xxx == right.xxx`") - Function condition, + Function condition, @Comment(name = "mapping", value = "映射函数,如:`(left,right)=>{xxx : left.xxx, yyy : right.yyy}`") - Function mapping) { + Function mapping) { if (target == null) { return null; } @@ -532,7 +550,7 @@ public class StreamExtension { @Comment(name = "condition", value = "判断条件") Function condition) { List objects = arrayLikeToList(source); for (int i = 0, size = objects.size(); i < size; i++) { - if (!BooleanLiteral.isTrue(condition.apply(new Object[] {objects.get(i), i}))) { + if (!BooleanLiteral.isTrue(condition.apply(new Object[]{objects.get(i), i}))) { return false; } } @@ -545,7 +563,7 @@ public class StreamExtension { @Comment(name = "condition", value = "判断条件") Function condition) { List objects = arrayLikeToList(source); for (int i = 0, size = objects.size(); i < size; i++) { - if (BooleanLiteral.isTrue(condition.apply(new Object[] {objects.get(i), i}))) { + if (BooleanLiteral.isTrue(condition.apply(new Object[]{objects.get(i), i}))) { return true; } } @@ -567,7 +585,7 @@ public class StreamExtension { public Object reduce( Object source, @Comment(name = "reduceFunction", value = "处理函数,如累加计算:`(val,item)=>val + item`") - Function reduceFunction) { + Function reduceFunction) { List objects = arrayLikeToList(source); if (objects.isEmpty()) { return null; @@ -578,7 +596,7 @@ public class StreamExtension { } Object result = objects.get(0); for (int i = 1; i < size; i++) { - result = reduceFunction.apply(new Object[] {result, objects.get(i)}); + result = reduceFunction.apply(new Object[]{result, objects.get(i)}); } return result; } diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StringExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StringExtension.java index 6a327604..35033e5b 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StringExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StringExtension.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.functions; import cn.universal.core.engine.annotation.Comment; @@ -8,11 +6,14 @@ import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; -/** String 扩展 */ +/** + * String 扩展 + */ public class StringExtension { @Comment("校验文本是否符合正则") - public boolean match(String source, @Comment(name = "pattern", value = "正则表达式") Pattern pattern) { + public boolean match(String source, + @Comment(name = "pattern", value = "正则表达式") Pattern pattern) { return pattern.matcher(source).find(); } diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StringFunctions.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StringFunctions.java index a4644578..363a4d9c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StringFunctions.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/StringFunctions.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.functions; import cn.universal.core.engine.annotation.Comment; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/TemporalAccessorExtension.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/TemporalAccessorExtension.java index 787a40fc..3fbe992b 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/TemporalAccessorExtension.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/TemporalAccessorExtension.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.functions; import cn.universal.core.engine.annotation.Comment; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/AggregationFunctions.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/AggregationFunctions.java index 2690d1ef..b5caf78e 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/AggregationFunctions.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/AggregationFunctions.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.functions.linq; import cn.universal.core.engine.annotation.Comment; @@ -11,7 +9,9 @@ import java.util.Map; import java.util.OptionalDouble; import java.util.function.BinaryOperator; -/** 聚合函数 */ +/** + * 聚合函数 + */ public class AggregationFunctions { @Function diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/LinqFunctions.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/LinqFunctions.java index 87cf1b6a..ccd0f25a 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/LinqFunctions.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/LinqFunctions.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.functions.linq; import cn.universal.core.engine.annotation.Comment; @@ -9,7 +7,9 @@ import cn.universal.core.engine.functions.TemporalAccessorExtension; import java.time.temporal.TemporalAccessor; import java.util.Date; -/** Linq中的函数 */ +/** + * Linq中的函数 + */ public class LinqFunctions { @Function diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/MathFunctions.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/MathFunctions.java index 3de5e4f6..d96fb484 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/MathFunctions.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/functions/linq/MathFunctions.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.functions.linq; import cn.universal.core.engine.annotation.Comment; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/CharacterStream.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/CharacterStream.java index e6affef2..3c81aca5 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/CharacterStream.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/CharacterStream.java @@ -1,8 +1,8 @@ - - package cn.universal.core.engine.parsing; -/** 对字符串进行封装,提供匹配、跳过方法,方便词法解析。 */ +/** + * 对字符串进行封装,提供匹配、跳过方法,方便词法解析。 + */ public class CharacterStream { private final String source; @@ -39,23 +39,29 @@ public class CharacterStream { * 截取字符串 * * @param startIndex 开始位置 - * @param endIndex 结束位置 + * @param endIndex 结束位置 */ public String substring(int startIndex, int endIndex) { return this.source.substring(startIndex, endIndex); } - /** 是否有下一个字符 */ + /** + * 是否有下一个字符 + */ public boolean hasMore() { return index < end; } - /** 根据开始位置、结束位置返回Span */ + /** + * 根据开始位置、结束位置返回Span + */ public Span getSpan(int start, int end) { return new Span(this.source, start, end); } - /** 返回下一个字符 */ + /** + * 返回下一个字符 + */ public char consume() { if (!hasMore()) { throw new RuntimeException("No more characters in stream."); @@ -63,7 +69,9 @@ public class CharacterStream { return source.charAt(index++); } - /** 返回是否是以给定的字符串开头 */ + /** + * 返回是否是以给定的字符串开头 + */ public boolean match(String needle, boolean consume) { int needleLength = needle.length(); if (needleLength + index > end) { @@ -98,7 +106,9 @@ public class CharacterStream { return false; } - /** 返回是否是数字 */ + /** + * 返回是否是数字 + */ public boolean matchDigit(boolean consume) { if (index >= end) { return false; @@ -113,7 +123,9 @@ public class CharacterStream { return false; } - /** 返回是否以标识符开头 */ + /** + * 返回是否以标识符开头 + */ public boolean matchIdentifierStart(boolean consume) { if (index >= end) { return false; @@ -147,7 +159,9 @@ public class CharacterStream { return false; } - /** 跳过一行 */ + /** + * 跳过一行 + */ public void skipLine() { while (index < end) { if (source.charAt(index++) == '\n') { @@ -156,7 +170,9 @@ public class CharacterStream { } } - /** 直到给定的字符串之前全部跳过 */ + /** + * 直到给定的字符串之前全部跳过 + */ public boolean skipUntil(String chars) { while (index < end) { boolean matched = true; @@ -174,7 +190,9 @@ public class CharacterStream { return false; } - /** 跳过空白字符 */ + /** + * 跳过空白字符 + */ public void skipWhiteSpace() { while (index < end) { char c = source.charAt(index); @@ -186,17 +204,23 @@ public class CharacterStream { } } - /** 记录当前位置为Span的开始位置 */ + /** + * 记录当前位置为Span的开始位置 + */ public void startSpan() { spanStart = index; } - /** 根据当前位置返回Span */ + /** + * 根据当前位置返回Span + */ public Span endSpan() { return new Span(source, spanStart, index); } - /** 根据当前位置 - offset 返回 Span */ + /** + * 根据当前位置 - offset 返回 Span + */ public Span endSpan(int offset) { return new Span(source, spanStart, index + offset); } @@ -205,12 +229,16 @@ public class CharacterStream { return new Span(source, start, end); } - /** 返回当前位置 */ + /** + * 返回当前位置 + */ public int getPosition() { return index; } - /** 重置当前位置 */ + /** + * 重置当前位置 + */ public void reset(int position) { index = position; } diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/GenericTokenParser.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/GenericTokenParser.java index 825cb591..37d390e3 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/GenericTokenParser.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/GenericTokenParser.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing; import java.util.function.Function; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/LiteralToken.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/LiteralToken.java index 3bab9822..5b12e6a9 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/LiteralToken.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/LiteralToken.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing; public class LiteralToken extends Token { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Parser.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Parser.java index fb053d77..6a6c0b2b 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Parser.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Parser.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing; import static cn.universal.core.engine.parsing.TokenType.And; @@ -130,67 +128,69 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Set; -/** 语法解析器 */ +/** + * 语法解析器 + */ public class Parser { public static final String ANONYMOUS_VARIABLE = "-anonymous"; private static final TokenType[][] BINARY_OPERATOR_PRECEDENCE = - new TokenType[][] { - new TokenType[] {Assignment}, - new TokenType[] { - RShift2Equal, - RShiftEqual, - LShiftEqual, - XorEqual, - BitOrEqual, - BitAndEqual, - PercentEqual, - ForwardSlashEqual, - AsteriskEqual, - MinusEqual, - PlusEqual - }, - new TokenType[] {Or, SqlOr}, - new TokenType[] {And, SqlAnd}, - new TokenType[] {BitOr}, - new TokenType[] {Xor}, - new TokenType[] {BitAnd}, - new TokenType[] {EqualEqualEqual, Equal, NotEqualEqual, NotEqual, SqlNotEqual}, - new TokenType[] {Less, LessEqual, Greater, GreaterEqual, InstanceOf}, - new TokenType[] {Plus, Minus}, - new TokenType[] {LShift, RShift, Rshift2}, - new TokenType[] {Asterisk, ForwardSlash, Percentage} + new TokenType[][]{ + new TokenType[]{Assignment}, + new TokenType[]{ + RShift2Equal, + RShiftEqual, + LShiftEqual, + XorEqual, + BitOrEqual, + BitAndEqual, + PercentEqual, + ForwardSlashEqual, + AsteriskEqual, + MinusEqual, + PlusEqual + }, + new TokenType[]{Or, SqlOr}, + new TokenType[]{And, SqlAnd}, + new TokenType[]{BitOr}, + new TokenType[]{Xor}, + new TokenType[]{BitAnd}, + new TokenType[]{EqualEqualEqual, Equal, NotEqualEqual, NotEqual, SqlNotEqual}, + new TokenType[]{Less, LessEqual, Greater, GreaterEqual, InstanceOf}, + new TokenType[]{Plus, Minus}, + new TokenType[]{LShift, RShift, Rshift2}, + new TokenType[]{Asterisk, ForwardSlash, Percentage} }; private static final TokenType[][] LINQ_BINARY_OPERATOR_PRECEDENCE = - new TokenType[][] { - new TokenType[] { - RShift2Equal, - RShiftEqual, - LShiftEqual, - XorEqual, - BitOrEqual, - BitAndEqual, - PercentEqual, - ForwardSlashEqual, - AsteriskEqual, - MinusEqual, - PlusEqual - }, - new TokenType[] {Or, SqlOr}, - new TokenType[] {And, SqlAnd}, - new TokenType[] {BitOr}, - new TokenType[] {Xor}, - new TokenType[] {BitAnd}, - new TokenType[] {Assignment, EqualEqualEqual, Equal, NotEqualEqual, NotEqual, SqlNotEqual}, - new TokenType[] {Less, LessEqual, Greater, GreaterEqual, InstanceOf}, - new TokenType[] {Plus, Minus}, - new TokenType[] {LShift, RShift, Rshift2}, - new TokenType[] {ForwardSlash, Asterisk, Percentage} + new TokenType[][]{ + new TokenType[]{ + RShift2Equal, + RShiftEqual, + LShiftEqual, + XorEqual, + BitOrEqual, + BitAndEqual, + PercentEqual, + ForwardSlashEqual, + AsteriskEqual, + MinusEqual, + PlusEqual + }, + new TokenType[]{Or, SqlOr}, + new TokenType[]{And, SqlAnd}, + new TokenType[]{BitOr}, + new TokenType[]{Xor}, + new TokenType[]{BitAnd}, + new TokenType[]{Assignment, EqualEqualEqual, Equal, NotEqualEqual, NotEqual, SqlNotEqual}, + new TokenType[]{Less, LessEqual, Greater, GreaterEqual, InstanceOf}, + new TokenType[]{Plus, Minus}, + new TokenType[]{LShift, RShift, Rshift2}, + new TokenType[]{ForwardSlash, Asterisk, Percentage} }; private static final TokenType[] UNARY_OPERATORS = - new TokenType[] { - MinusMinus, PlusPlus, BitNot, - Minus, Plus, Not + new TokenType[]{ + MinusMinus, PlusPlus, BitNot, + Minus, Plus, Not }; private static final List KEYWORDS = Arrays.asList( @@ -302,7 +302,8 @@ public class Parser { } } // consume semi-colons as statement delimiters - while (stream.match(";", true)) {} + while (stream.match(";", true)) { + } return result; } @@ -1261,7 +1262,9 @@ public class Parser { return target; } - /** Does not consume the closing parentheses. */ + /** + * Does not consume the closing parentheses. + */ private List parseArguments() { stream.expect(LeftParantheses); List arguments = new ArrayList(); diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/RegexpToken.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/RegexpToken.java index cf81c781..3caf632c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/RegexpToken.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/RegexpToken.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing; public class RegexpToken extends Token { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Span.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Span.java index fab91047..61bb552c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Span.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Span.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing; import java.util.Objects; @@ -9,16 +7,24 @@ import java.util.Objects; */ public class Span { - /** the source string this span refers to */ + /** + * the source string this span refers to + */ private final String source; - /** Cached String instance to reduce pressure on GC */ + /** + * Cached String instance to reduce pressure on GC + */ private final String cachedText; - /** start index in source string, starting at 0 */ + /** + * start index in source string, starting at 0 + */ private final int start; - /** end index in source string, exclusive, starting at 0 */ + /** + * end index in source string, exclusive, starting at 0 + */ private final int end; private Line line; @@ -70,22 +76,30 @@ public class Span { this.cachedText = source.substring(this.start, this.end); } - /** Returns the text referenced by this span */ + /** + * Returns the text referenced by this span + */ public String getText() { return cachedText; } - /** Returns the index of the first character of this span. */ + /** + * Returns the index of the first character of this span. + */ public int getStart() { return start; } - /** Returns the index of the last character of this span plus 1. */ + /** + * Returns the index of the last character of this span plus 1. + */ public int getEnd() { return end; } - /** Returns the source string this span references. */ + /** + * Returns the source string this span references. + */ public String getSource() { return source; } @@ -177,7 +191,9 @@ public class Span { return Objects.hash(source, cachedText, start, end, line); } - /** A line within a Source */ + /** + * A line within a Source + */ public static class Line { private final String source; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Token.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Token.java index 538094c5..8376bc3e 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Token.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Token.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing; public class Token { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/TokenStream.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/TokenStream.java index 1a0a476e..26e1eb56 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/TokenStream.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/TokenStream.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing; import cn.universal.core.engine.MagicScriptError; @@ -7,7 +5,9 @@ import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; -/** 对List进行封装,提供匹配相关方法,方便语法解析 */ +/** + * 对List进行封装,提供匹配相关方法,方便语法解析 + */ public class TokenStream { private final List tokens; @@ -22,32 +22,44 @@ public class TokenStream { this.end = tokens.size(); } - /** 当前是否可读 */ + /** + * 当前是否可读 + */ public boolean hasMore() { return index < end; } - /** 是否有下一个Token */ + /** + * 是否有下一个Token + */ public boolean hasNext() { return index + 1 < end; } - /** 是否有前一个Token */ + /** + * 是否有前一个Token + */ public boolean hasPrev() { return index > 0; } - /** 标记当前位置,和resetIndex搭配使用。 */ + /** + * 标记当前位置,和resetIndex搭配使用。 + */ public int makeIndex() { return index; } - /** 重置当前位置,和makeIndex搭配使用 */ + /** + * 重置当前位置,和makeIndex搭配使用 + */ public void resetIndex(int index) { this.index = index; } - /** 无条件消耗掉当前Token */ + /** + * 无条件消耗掉当前Token + */ public Token consume() { if (!hasMore()) { throw new RuntimeException("流已经遍历完毕"); @@ -55,7 +67,9 @@ public class TokenStream { return tokens.get(index++); } - /** 获取下一个Token并改变当前位置 */ + /** + * 获取下一个Token并改变当前位置 + */ public Token next() { if (!hasMore()) { throw new RuntimeException("流已经遍历完毕"); @@ -63,7 +77,9 @@ public class TokenStream { return tokens.get(++index); } - /** 获取前一个Token并改变当前位置 */ + /** + * 获取前一个Token并改变当前位置 + */ public Token prev() { if (index == 0) { throw new RuntimeException("流已经遍历完毕"); @@ -71,7 +87,9 @@ public class TokenStream { return tokens.get(--index); } - /** 获取前一个Token,不改变当前位置 */ + /** + * 获取前一个Token,不改变当前位置 + */ public Token getPrev() { if (index == 0) { throw new RuntimeException("流已经遍历完毕"); @@ -79,7 +97,9 @@ public class TokenStream { return tokens.get(index - 1); } - /** 期待下一个Token是给定的类型中之一 */ + /** + * 期待下一个Token是给定的类型中之一 + */ public Token expect(TokenType... types) { if (!match(true, types)) { Token token = index < tokens.size() ? tokens.get(index) : null; @@ -105,7 +125,9 @@ public class TokenStream { } } - /** 获取全部注释 */ + /** + * 获取全部注释 + */ public List comments() { return tokens.stream() .filter(it -> it.getType() == TokenType.Comment) @@ -113,7 +135,9 @@ public class TokenStream { .collect(Collectors.toList()); } - /** 期待下一个Token为指定类型 */ + /** + * 期待下一个Token为指定类型 + */ public Token expect(TokenType type) { if (!match(type, true)) { Token token = index < tokens.size() ? tokens.get(index) : null; @@ -121,7 +145,8 @@ public class TokenStream { if (span == null) { MagicScriptError.error("期待 '" + type.getError() + "', 但是流已经遍历完毕", this); } else { - MagicScriptError.error("期待 '" + type.getError() + "', 获得 '" + token.getText() + "'", span); + MagicScriptError.error("期待 '" + type.getError() + "', 获得 '" + token.getText() + "'", + span); } return null; // 执行不到这里 } else { @@ -129,7 +154,9 @@ public class TokenStream { } } - /** 期待匹配字符串 */ + /** + * 期待匹配字符串 + */ public Token expect(String text) { return expect(text, false); } @@ -185,7 +212,7 @@ public class TokenStream { /** * 匹配指定字符串 * - * @param consume 匹配成功后是否改变当前位置 + * @param consume 匹配成功后是否改变当前位置 * @param ignoreCase 是否忽略大小写 */ public boolean match(List texts, boolean consume, boolean ignoreCase) { @@ -200,7 +227,7 @@ public class TokenStream { /** * 匹配指定字符串 * - * @param consume 匹配成功后是否改变当前位置 + * @param consume 匹配成功后是否改变当前位置 * @param ignoreCase 是否忽略大小写 */ public boolean match(String text, boolean consume, boolean ignoreCase) { @@ -252,7 +279,7 @@ public class TokenStream { /** * 匹配指定字符串 * - * @param consume 匹配成功后是否改变当前位置 + * @param consume 匹配成功后是否改变当前位置 * @param ignoreCase 是否忽略大小写 */ public boolean match(boolean consume, boolean ignoreCase, String... tokenTexts) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/TokenType.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/TokenType.java index a6403186..6aae2da1 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/TokenType.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/TokenType.java @@ -1,10 +1,10 @@ - - package cn.universal.core.engine.parsing; import java.util.Arrays; -/** Token类型 */ +/** + * Token类型 + */ public enum TokenType { // @off Spread("...", "..."), diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Tokenizer.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Tokenizer.java index ec489e17..13887598 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Tokenizer.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/Tokenizer.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing; import cn.universal.core.engine.MagicScriptError; @@ -107,17 +105,20 @@ public class Tokenizer { if (stream.match("```", true)) { stream.startSpan(); if (stream.matchIdentifierStart(true)) { - while (stream.matchIdentifierPart(true)) {} + while (stream.matchIdentifierPart(true)) { + } Span language = stream.endSpan(); tokens.add(new Token(TokenType.Language, language)); stream.startSpan(); if (!stream.skipUntil("```")) { - MagicScriptError.error("```需要以```结尾", stream.endSpan(), new StringLiteralException()); + MagicScriptError.error("```需要以```结尾", stream.endSpan(), + new StringLiteralException()); } tokens.add(new Token(TokenType.Language, stream.endSpan(-3))); return true; } else { - MagicScriptError.error("```后需要标识语言类型", stream.endSpan(), new StringLiteralException()); + MagicScriptError.error("```后需要标识语言类型", stream.endSpan(), + new StringLiteralException()); } } return false; @@ -152,7 +153,8 @@ public class Tokenizer { stream.consume(); } if (!matchedEndQuote) { - MagicScriptError.error("模板字符串没有结束符`", stream.endSpan(), new StringLiteralException()); + MagicScriptError.error("模板字符串没有结束符`", stream.endSpan(), + new StringLiteralException()); } Span stringSpan = stream.endSpan(begin, stream.getPosition()); int end = stream.getPosition() - 1; @@ -169,7 +171,8 @@ public class Tokenizer { private static boolean tokenizerIdentifier(CharacterStream stream, List tokens) { if (stream.matchIdentifierStart(true)) { stream.startSpan(); - while (stream.matchIdentifierPart(true)) {} + while (stream.matchIdentifierPart(true)) { + } Span identifierSpan = stream.endSpan(); identifierSpan = stream.getSpan(identifierSpan.getStart() - 1, identifierSpan.getEnd()); if ("true".equals(identifierSpan.getText()) || "false".equals(identifierSpan.getText())) { @@ -218,7 +221,8 @@ public class Tokenizer { if (stream.matchAny(true, "x", "X")) { // 0x 16进制 while (stream.matchDigit(true) || stream.matchAny( - true, "A", "B", "C", "D", "E", "F", "a", "b", "c", "d", "e", "f", "_")) {} + true, "A", "B", "C", "D", "E", "F", "a", "b", "c", "d", "e", "f", "_")) { + } if (stream.matchAny(true, "L", "l")) { Span span = stream.endSpan(); String text = span.getText(); @@ -232,7 +236,8 @@ public class Tokenizer { tokens.add(autoNumberType(stream.endSpan(), 16)); return true; } else if (stream.matchAny(true, "b", "B")) { // 二进制 - while (stream.matchAny(true, "0", "1", "_")) {} + while (stream.matchAny(true, "0", "1", "_")) { + } if (stream.matchAny(true, "L", "l")) { Span span = stream.endSpan(); String text = span.getText(); @@ -251,10 +256,12 @@ public class Tokenizer { if (stream.matchDigit(false)) { TokenType type = TokenType.IntegerLiteral; stream.startSpan(); - while (stream.matchDigit(true) || stream.match("_", true)) {} + while (stream.matchDigit(true) || stream.match("_", true)) { + } if (stream.match(TokenType.Period.getLiteral(), true)) { type = TokenType.DoubleLiteral; - while (stream.matchDigit(true) || stream.match("_", true)) {} + while (stream.matchDigit(true) || stream.match("_", true)) { + } } if (stream.matchAny(true, "b", "B")) { if (type == TokenType.DoubleLiteral) { @@ -322,7 +329,8 @@ public class Tokenizer { } if (!matchedEndQuote) { MagicScriptError.error( - "字符串没有结束符" + tokenType.getError(), stream.endSpan(), new StringLiteralException()); + "字符串没有结束符" + tokenType.getError(), stream.endSpan(), + new StringLiteralException()); } Span stringSpan = stream.endSpan(); stringSpan = diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/VarIndex.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/VarIndex.java index b695b6d6..ea5f130f 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/VarIndex.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/VarIndex.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing; import java.util.Objects; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/VarScope.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/VarScope.java index faaef8ff..46b33ca0 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/VarScope.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/VarScope.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing; import java.util.ArrayList; @@ -12,7 +10,8 @@ public class VarScope extends ArrayList { this.parent = parent; } - public VarScope() {} + public VarScope() { + } public VarScope push() { return new VarScope(this); diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/BinaryOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/BinaryOperation.java index 874ca051..b2d7475c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/BinaryOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/BinaryOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast; import cn.universal.core.engine.MagicScriptError; @@ -48,7 +46,8 @@ public abstract class BinaryOperation extends Expression { if (operator.getType().isModifiable() && left instanceof VariableAccess && ((VariableAccess) left).getVarIndex().isReadonly()) { - MagicScriptError.error("const定义的变量不能被修改", new Span(left.getSpan(), right.getSpan())); + MagicScriptError.error("const定义的变量不能被修改", + new Span(left.getSpan(), right.getSpan())); } Expression expression = null; Span span = new Span(left.getSpan(), right.getSpan()); @@ -169,7 +168,9 @@ public abstract class BinaryOperation extends Expression { return expression; } - /** 比较两个值 1 左边大 0 相等 -1 右边大 -2 无法比较 */ + /** + * 比较两个值 1 左边大 0 相等 -1 右边大 -2 无法比较 + */ public static int compare(Object left, Object right) { if (left == null && right == null) { return -2; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Expression.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Expression.java index a630272a..7eab158c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Expression.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Expression.java @@ -1,10 +1,10 @@ - - package cn.universal.core.engine.parsing.ast; import cn.universal.core.engine.parsing.Span; -/** 表达式 */ +/** + * 表达式 + */ public abstract class Expression extends Node { public Expression(Span span) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/LanguageExpression.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/LanguageExpression.java index 4652d133..66851a77 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/LanguageExpression.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/LanguageExpression.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast; import cn.universal.core.engine.MagicScriptContext; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Literal.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Literal.java index 967f66e3..fcd77a46 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Literal.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Literal.java @@ -1,11 +1,11 @@ - - package cn.universal.core.engine.parsing.ast; import cn.universal.core.engine.compile.MagicScriptCompiler; import cn.universal.core.engine.parsing.Span; -/** 常量 */ +/** + * 常量 + */ public abstract class Literal extends Expression { protected Object value = null; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Node.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Node.java index f0c77f84..c79f02aa 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Node.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/Node.java @@ -1,18 +1,22 @@ - - package cn.universal.core.engine.parsing.ast; import cn.universal.core.engine.asm.Opcodes; import cn.universal.core.engine.compile.MagicScriptCompiler; import cn.universal.core.engine.parsing.Span; -/** 节点 */ +/** + * 节点 + */ public abstract class Node implements Opcodes { - /** 对应的文本 */ + /** + * 对应的文本 + */ private final Span span; - /** 在Linq中 */ + /** + * 在Linq中 + */ private boolean inLinq; public Node(Span span) { @@ -32,7 +36,8 @@ public abstract class Node implements Opcodes { return getClass().getSimpleName() + ":" + span.getText(); } - public void visitMethod(MagicScriptCompiler compiler) {} + public void visitMethod(MagicScriptCompiler compiler) { + } public void compile(MagicScriptCompiler compiler) { throw new UnsupportedOperationException(this.getClass().getSimpleName() + "不支持编译"); diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/TernaryOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/TernaryOperation.java index 7afca909..fd50415a 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/TernaryOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/TernaryOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast; import cn.universal.core.engine.asm.Label; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/UnaryOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/UnaryOperation.java index e3e520b3..57014d1e 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/UnaryOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/UnaryOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast; import cn.universal.core.engine.MagicScriptError; @@ -12,7 +10,9 @@ import cn.universal.core.engine.runtime.handle.BitHandle; import cn.universal.core.engine.runtime.handle.OperatorHandle; import java.util.function.Supplier; -/** 一元操作符 */ +/** + * 一元操作符 + */ public class UnaryOperation extends Expression { private final UnaryOperator operator; @@ -110,22 +110,34 @@ public class UnaryOperation extends Expression { } public enum UnaryOperator { - /** ! */ + /** + * ! + */ Not, - /** - */ + /** + * - + */ Negate, - /** + */ + /** + * + + */ Positive, - /** ++ */ + /** + * ++ + */ PlusPlus, - /** -- */ + /** + * -- + */ MinusMinus, - /** ~ */ + /** + * ~ + */ BitNot; public static UnaryOperator getOperator(Token op) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/VariableSetter.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/VariableSetter.java index 5dacb539..2d6d8d3c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/VariableSetter.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/VariableSetter.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast; import cn.universal.core.engine.compile.MagicScriptCompiler; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AddOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AddOperation.java index 184054c0..e0966077 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AddOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AddOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -7,7 +5,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; -/** + 运算 */ +/** + * + 运算 + */ public class AddOperation extends BinaryOperation { public AddOperation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AndOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AndOperation.java index 1cbed993..420b20e1 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AndOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AndOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.asm.Label; @@ -9,7 +7,9 @@ import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; import cn.universal.core.engine.runtime.handle.OperatorHandle; -/** && 操作 */ +/** + * && 操作 + */ public class AndOperation extends BinaryOperation { public AndOperation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AssigmentOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AssigmentOperation.java index 33ffce52..5ab4ba07 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AssigmentOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/AssigmentOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.MagicScriptError; @@ -10,7 +8,9 @@ import cn.universal.core.engine.parsing.ast.Expression; import cn.universal.core.engine.parsing.ast.VariableSetter; import cn.universal.core.engine.parsing.ast.statement.VariableAccess; -/** = 操作 */ +/** + * = 操作 + */ public class AssigmentOperation extends BinaryOperation { public AssigmentOperation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/BitAndOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/BitAndOperation.java index c61140c4..1d6c179a 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/BitAndOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/BitAndOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -7,7 +5,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; -/** & */ +/** + * & + */ public class BitAndOperation extends BinaryOperation { public BitAndOperation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/BitOrOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/BitOrOperation.java index aa430bd5..8156f8d4 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/BitOrOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/BitOrOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -7,7 +5,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; -/** | */ +/** + * | + */ public class BitOrOperation extends BinaryOperation { public BitOrOperation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/DivisionOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/DivisionOperation.java index 64de5263..2d41d0d4 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/DivisionOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/DivisionOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -7,7 +5,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; -/** / 操作 */ +/** + * / 操作 + */ public class DivisionOperation extends BinaryOperation { public DivisionOperation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/EqualOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/EqualOperation.java index ee785806..073c2419 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/EqualOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/EqualOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -7,7 +5,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; -/** ==、===操作 */ +/** + * ==、===操作 + */ public class EqualOperation extends BinaryOperation { protected final boolean accurate; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/GreaterEqualOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/GreaterEqualOperation.java index 5f63bdd2..ec1d3a72 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/GreaterEqualOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/GreaterEqualOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -7,7 +5,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; -/** >=操作 */ +/** + * >=操作 + */ public class GreaterEqualOperation extends BinaryOperation { public GreaterEqualOperation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/GreaterOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/GreaterOperation.java index 21da91f0..c80b06db 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/GreaterOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/GreaterOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -7,7 +5,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; -/** > 运算 */ +/** + * > 运算 + */ public class GreaterOperation extends BinaryOperation { public GreaterOperation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/InstanceofOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/InstanceofOperation.java index a87476cc..3b0b7afb 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/InstanceofOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/InstanceofOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -8,7 +6,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; -/** instanceof */ +/** + * instanceof + */ public class InstanceofOperation extends BinaryOperation { public InstanceofOperation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LShiftOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LShiftOperation.java index 0fdde7e1..97be1ff6 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LShiftOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LShiftOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -7,7 +5,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; -/** << */ +/** + * << + */ public class LShiftOperation extends BinaryOperation { public LShiftOperation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LessEqualOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LessEqualOperation.java index 63b05003..f779c21b 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LessEqualOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LessEqualOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -7,7 +5,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; -/** <= 运算 */ +/** + * <= 运算 + */ public class LessEqualOperation extends BinaryOperation { public LessEqualOperation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LessOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LessOperation.java index 556f61ca..63bdd0a1 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LessOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/LessOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -7,7 +5,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; -/** < */ +/** + * < + */ public class LessOperation extends BinaryOperation { public LessOperation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/ModuloOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/ModuloOperation.java index 11aff1ca..68525a6b 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/ModuloOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/ModuloOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -7,7 +5,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; -/** % 运算 */ +/** + * % 运算 + */ public class ModuloOperation extends BinaryOperation { public ModuloOperation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/MultiplicationOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/MultiplicationOperation.java index d04c9202..9069cea5 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/MultiplicationOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/MultiplicationOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -7,7 +5,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; -/** * 运算 */ +/** + * 运算 + */ public class MultiplicationOperation extends BinaryOperation { public MultiplicationOperation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/NotEqualOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/NotEqualOperation.java index 6181b124..a4f044e9 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/NotEqualOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/NotEqualOperation.java @@ -1,12 +1,12 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.compile.MagicScriptCompiler; import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.Expression; -/** !=、!==操作 */ +/** + * !=、!==操作 + */ public class NotEqualOperation extends EqualOperation { public NotEqualOperation( diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/OrOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/OrOperation.java index af7730b6..ea974bc8 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/OrOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/OrOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.asm.Label; @@ -9,7 +7,9 @@ import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; import cn.universal.core.engine.runtime.handle.OperatorHandle; -/** || 操作 */ +/** + * || 操作 + */ public class OrOperation extends BinaryOperation { public OrOperation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/RShift2Operation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/RShift2Operation.java index d280331f..869e969a 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/RShift2Operation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/RShift2Operation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -7,7 +5,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; -/** >>> */ +/** + * >>> + */ public class RShift2Operation extends BinaryOperation { public RShift2Operation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/RShiftOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/RShiftOperation.java index 1326faa6..5ba0d0d9 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/RShiftOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/RShiftOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -7,7 +5,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; -/** >> */ +/** + * >> + */ public class RShiftOperation extends BinaryOperation { public RShiftOperation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/SubtractionOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/SubtractionOperation.java index db5a01ed..a9c270e3 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/SubtractionOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/SubtractionOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -7,7 +5,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; -/** - 操作 */ +/** + * - 操作 + */ public class SubtractionOperation extends BinaryOperation { public SubtractionOperation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/XorOperation.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/XorOperation.java index 66944484..e7a4696b 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/XorOperation.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/binary/XorOperation.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.binary; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -7,7 +5,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.BinaryOperation; import cn.universal.core.engine.parsing.ast.Expression; -/** ^ */ +/** + * ^ + */ public class XorOperation extends BinaryOperation { public XorOperation(Expression leftOperand, Span span, Expression rightOperand) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqExpression.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqExpression.java index 15773c40..08957a77 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqExpression.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqExpression.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.linq; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -33,7 +31,7 @@ public class LinqExpression extends Expression { compiler .compile( expression instanceof MemberAccess - && ((MemberAccess) expression).isWhole() + && ((MemberAccess) expression).isWhole() ? ((MemberAccess) expression).getObject() : expression) .insn(ARETURN)); diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqField.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqField.java index ee0a3a50..eeefc0c1 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqField.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqField.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.linq; import cn.universal.core.engine.parsing.Span; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqJoin.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqJoin.java index 404419c6..8a0c5c58 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqJoin.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqJoin.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.linq; import cn.universal.core.engine.compile.MagicScriptCompiler; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqOrder.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqOrder.java index 0ebfa9dc..6443e74e 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqOrder.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqOrder.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.linq; import cn.universal.core.engine.parsing.Span; @@ -8,7 +6,9 @@ import cn.universal.core.engine.parsing.ast.Expression; public class LinqOrder extends LinqField { - /** 1 正序 -1 倒序 */ + /** + * 1 正序 -1 倒序 + */ private final int order; public LinqOrder(Span span, Expression expression, VarIndex alias, int order) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqSelect.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqSelect.java index b6af07cb..44867125 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqSelect.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/LinqSelect.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.linq; import cn.universal.core.engine.MagicScriptError; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/WholeLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/WholeLiteral.java index e686a5b0..11279e2e 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/WholeLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/linq/WholeLiteral.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.linq; import cn.universal.core.engine.compile.MagicScriptCompiler; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/BigDecimalLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/BigDecimalLiteral.java index fbb89f40..26fc93d5 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/BigDecimalLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/BigDecimalLiteral.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.literal; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -7,7 +5,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.Literal; import java.math.BigDecimal; -/** int常量 */ +/** + * int常量 + */ public class BigDecimalLiteral extends Literal { public BigDecimalLiteral(Span literal) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/BooleanLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/BooleanLiteral.java index 88327a62..565a8276 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/BooleanLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/BooleanLiteral.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.literal; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -9,7 +7,9 @@ import java.lang.reflect.Array; import java.util.Collection; import java.util.Map; -/** boolean常量 */ +/** + * boolean常量 + */ public class BooleanLiteral extends Literal { public BooleanLiteral(Span literal) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ByteLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ByteLiteral.java index 2f110367..e3912974 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ByteLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ByteLiteral.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.literal; import cn.universal.core.engine.MagicScriptError; @@ -7,7 +5,9 @@ import cn.universal.core.engine.compile.MagicScriptCompiler; import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.Literal; -/** byte常量 */ +/** + * byte常量 + */ public class ByteLiteral extends Literal { private byte value; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/DoubleLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/DoubleLiteral.java index 5a84d549..4112f9eb 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/DoubleLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/DoubleLiteral.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.literal; import cn.universal.core.engine.MagicScriptError; @@ -7,7 +5,9 @@ import cn.universal.core.engine.compile.MagicScriptCompiler; import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.Literal; -/** double常量 */ +/** + * double常量 + */ public class DoubleLiteral extends Literal { public DoubleLiteral(Span literal) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/FloatLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/FloatLiteral.java index 2820903c..c4ee74cf 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/FloatLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/FloatLiteral.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.literal; import cn.universal.core.engine.MagicScriptError; @@ -7,7 +5,9 @@ import cn.universal.core.engine.compile.MagicScriptCompiler; import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.Literal; -/** float常量 */ +/** + * float常量 + */ public class FloatLiteral extends Literal { public FloatLiteral(Span literal) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/IntegerLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/IntegerLiteral.java index 33019afc..ac15e558 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/IntegerLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/IntegerLiteral.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.literal; import cn.universal.core.engine.MagicScriptError; @@ -7,7 +5,9 @@ import cn.universal.core.engine.compile.MagicScriptCompiler; import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.Literal; -/** int常量 */ +/** + * int常量 + */ public class IntegerLiteral extends Literal { public IntegerLiteral(Span literal) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ListLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ListLiteral.java index 92badb14..d2ddfa62 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ListLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ListLiteral.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.literal; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -9,7 +7,9 @@ import cn.universal.core.engine.parsing.ast.Literal; import cn.universal.core.engine.parsing.ast.statement.Spread; import java.util.List; -/** List常量 */ +/** + * List常量 + */ public class ListLiteral extends Literal { public final List values; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/LongLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/LongLiteral.java index c68aeab8..f13d1ab0 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/LongLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/LongLiteral.java @@ -1,12 +1,12 @@ - - package cn.universal.core.engine.parsing.ast.literal; import cn.universal.core.engine.compile.MagicScriptCompiler; import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.Literal; -/** long 常量 */ +/** + * long 常量 + */ public class LongLiteral extends Literal { public LongLiteral(Span literal) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/MapLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/MapLiteral.java index 57b44e3c..ae718c07 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/MapLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/MapLiteral.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.literal; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -10,7 +8,9 @@ import cn.universal.core.engine.parsing.ast.statement.Spread; import java.util.List; import java.util.Objects; -/** map常量 */ +/** + * map常量 + */ public class MapLiteral extends Literal { private final List keys; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/NullLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/NullLiteral.java index da6d9028..d898aa27 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/NullLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/NullLiteral.java @@ -1,12 +1,12 @@ - - package cn.universal.core.engine.parsing.ast.literal; import cn.universal.core.engine.compile.MagicScriptCompiler; import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.Literal; -/** null 常量 */ +/** + * null 常量 + */ public class NullLiteral extends Literal { public NullLiteral(Span span) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/RegexpLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/RegexpLiteral.java index f130ff70..618a9801 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/RegexpLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/RegexpLiteral.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.literal; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -8,7 +6,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.Literal; import java.util.regex.Pattern; -/** 正则常量 */ +/** + * 正则常量 + */ public class RegexpLiteral extends Literal { private int flag; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ShortLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ShortLiteral.java index efb31c4e..f288c072 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ShortLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/ShortLiteral.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.literal; import cn.universal.core.engine.MagicScriptError; @@ -7,7 +5,9 @@ import cn.universal.core.engine.compile.MagicScriptCompiler; import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.Literal; -/** short 常量 */ +/** + * short 常量 + */ public class ShortLiteral extends Literal { public ShortLiteral(Span literal) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/StringLiteral.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/StringLiteral.java index e3da8fe5..51fa63f7 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/StringLiteral.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/literal/StringLiteral.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.literal; import cn.universal.core.engine.MagicScriptError; @@ -12,7 +10,9 @@ import java.util.List; import java.util.Objects; import java.util.StringJoiner; -/** String 常量 */ +/** + * String 常量 + */ public class StringLiteral extends Literal { private final Token token; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Assert.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Assert.java index f1e5602b..3ea48125 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Assert.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Assert.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.asm.Label; @@ -10,7 +8,9 @@ import cn.universal.core.engine.parsing.ast.Node; import cn.universal.core.engine.runtime.handle.OperatorHandle; import java.util.List; -/** assert expr : expr[,expr][,expr][,expr] */ +/** + * assert expr : expr[,expr][,expr][,expr] + */ public class Assert extends Node { private final Expression condition; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/AsyncCall.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/AsyncCall.java index 6a6b760c..8e26c5b6 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/AsyncCall.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/AsyncCall.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -17,10 +15,14 @@ import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; -/** 异步调用 */ +/** + * 异步调用 + */ public class AsyncCall extends Expression { - /** 默认线程池大小(CPU核心数 * 2) */ + /** + * 默认线程池大小(CPU核心数 * 2) + */ private static ThreadPoolExecutor threadPoolExecutor = setThreadPoolExecutorSize(Runtime.getRuntime().availableProcessors() * 2); diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Break.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Break.java index 983bcdbd..31f98ea2 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Break.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Break.java @@ -1,12 +1,12 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.compile.MagicScriptCompiler; import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.Node; -/** break 语句 */ +/** + * break 语句 + */ public class Break extends Node { public Break(Span span) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/ClassConverter.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/ClassConverter.java index c52bd5db..a4a7294c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/ClassConverter.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/ClassConverter.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.compile.MagicScriptCompiler; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Continue.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Continue.java index a51f1a8c..3ab22896 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Continue.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Continue.java @@ -1,12 +1,12 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.compile.MagicScriptCompiler; import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.Node; -/** continue语句 */ +/** + * continue语句 + */ public class Continue extends Node { public Continue(Span span) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Exit.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Exit.java index 7098355d..aec375e0 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Exit.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Exit.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.compile.MagicScriptCompiler; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/ForStatement.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/ForStatement.java index c885b1b2..55ef056f 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/ForStatement.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/ForStatement.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.asm.Label; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/FunctionCall.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/FunctionCall.java index aa7fbc62..ec8413c5 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/FunctionCall.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/FunctionCall.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.compile.MagicScriptCompiler; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/IfStatement.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/IfStatement.java index d10d071a..2a694dc4 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/IfStatement.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/IfStatement.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.asm.Label; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Import.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Import.java index a8b6d64d..e1023ac3 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Import.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Import.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.MagicResourceLoader; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/LambdaFunction.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/LambdaFunction.java index 884ba217..7325a9b1 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/LambdaFunction.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/LambdaFunction.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -37,7 +35,9 @@ public class LambdaFunction extends Expression { return parameters; } - /** 访问lambda方法 */ + /** + * 访问lambda方法 + */ private void compileMethod(MagicScriptCompiler compiler) { compiler.load0().lambda(methodName); } diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MapOrArrayAccess.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MapOrArrayAccess.java index ed7e9277..d4cd7f36 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MapOrArrayAccess.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MapOrArrayAccess.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.compile.MagicScriptCompiler; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MemberAccess.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MemberAccess.java index f76a753e..5f29b1c3 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MemberAccess.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MemberAccess.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.compile.MagicScriptCompiler; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MethodCall.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MethodCall.java index d1d587ef..bb66e43c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MethodCall.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/MethodCall.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.compile.MagicScriptCompiler; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/NewStatement.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/NewStatement.java index 47deac6c..dbbc53ea 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/NewStatement.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/NewStatement.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.compile.MagicScriptCompiler; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Return.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Return.java index 5ed07f96..71a557ba 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Return.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Return.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.compile.MagicScriptCompiler; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Spread.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Spread.java index 2c2f378e..62d135fd 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Spread.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Spread.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.compile.MagicScriptCompiler; @@ -7,7 +5,9 @@ import cn.universal.core.engine.parsing.Span; import cn.universal.core.engine.parsing.ast.Expression; import cn.universal.core.engine.runtime.SpreadValue; -/** 展开语法 Spread syntax (...) */ +/** + * 展开语法 Spread syntax (...) + */ public class Spread extends Expression { private final Expression target; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Throw.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Throw.java index 502f1669..49010e20 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Throw.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/Throw.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.compile.MagicScriptCompiler; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/TryStatement.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/TryStatement.java index afc5fbde..dcafef22 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/TryStatement.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/TryStatement.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.asm.Label; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableAccess.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableAccess.java index d91b1498..b9f26aa5 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableAccess.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableAccess.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.compile.MagicScriptCompiler; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableDefine.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableDefine.java index 8c101330..46e45ad0 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableDefine.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableDefine.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.compile.MagicScriptCompiler; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableDestructuringDefine.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableDestructuringDefine.java index d3f95cc2..ca3ff219 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableDestructuringDefine.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/VariableDestructuringDefine.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.compile.MagicScriptCompiler; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/WhileStatement.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/WhileStatement.java index 8d6a66cc..f0b5e8d7 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/WhileStatement.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/parsing/ast/statement/WhileStatement.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.parsing.ast.statement; import cn.universal.core.engine.asm.Label; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/ConstructorInvoker.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/ConstructorInvoker.java index ea5ee66d..3c5cd68a 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/ConstructorInvoker.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/ConstructorInvoker.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.reflection; import java.lang.reflect.Constructor; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/JavaInvoker.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/JavaInvoker.java index d7ac5606..adb49a68 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/JavaInvoker.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/JavaInvoker.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.reflection; import cn.universal.core.engine.convert.ClassImplicitConvert; @@ -142,14 +140,16 @@ public class JavaInvoker { /** * 给参数设置隐式转换方法 * - * @param index 索引 + * @param index 索引 * @param classImplicitConvert 转换方法 */ protected void addClassImplicitConvert(int index, ClassImplicitConvert classImplicitConvert) { converts.put(index, classImplicitConvert); } - /** 预处理参数,用来实现隐式转换 */ + /** + * 预处理参数,用来实现隐式转换 + */ protected Object[] processArguments(Variables variables, Object[] arguments) { int count = this.executable.getParameterCount(); int maxIndex = Integer.MAX_VALUE; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/JavaReflection.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/JavaReflection.java index 934fbdf4..6e653356 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/JavaReflection.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/JavaReflection.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.reflection; import cn.universal.core.engine.convert.BooleanImplicitConvert; @@ -323,7 +321,9 @@ public class JavaReflection { return foundInvoker; } - /** Returns the method best matching the given signature, including type coercion, or null. */ + /** + * Returns the method best matching the given signature, including type coercion, or null. + */ public static JavaInvoker findInvoker( Class cls, String name, Class[] parameterTypes) { List> methodList = new ArrayList<>(); @@ -347,7 +347,9 @@ public class JavaReflection { return findInvoker(cls, name, new Class[0]); } - /** 是否可以自动装修拆箱 */ + /** + * 是否可以自动装修拆箱 + */ public static boolean isPrimitiveAssignableFrom(Class from, Class to) { if ((from == Boolean.class || from == boolean.class) && (to == boolean.class || to == Boolean.class)) { @@ -376,7 +378,9 @@ public class JavaReflection { && (to == char.class || to == Character.class); } - /** 获取String类型的参数描述 */ + /** + * 获取String类型的参数描述 + */ public static String[] getStringTypes(Object[] objects) { String[] parameterTypes = new String[objects == null ? 0 : objects.length]; if (objects != null) { @@ -388,7 +392,9 @@ public class JavaReflection { return parameterTypes; } - /** 是否可以自动隐式转换 https://docs.oracle.com/javase/specs/jls/se7/html/jls-5.html */ + /** + * 是否可以自动隐式转换 https://docs.oracle.com/javase/specs/jls/se7/html/jls-5.html + */ private static boolean isCoercible(Class from, Class to) { if (from == Integer.class || from == int.class) { return to == float.class @@ -462,7 +468,7 @@ public class JavaReflection { /** * 获取内部类 * - * @param obj 目标对象,可以是实例,可以是Class + * @param obj 目标对象,可以是实例,可以是Class * @param name 内部类名称 */ public static Object getInnerClass(Object obj, String name) { @@ -480,7 +486,7 @@ public class JavaReflection { /** * 获取字段 * - * @param obj 目标对象可以是实例,可以是Class + * @param obj 目标对象可以是实例,可以是Class * @param name 字段名称 * @return */ @@ -529,7 +535,9 @@ public class JavaReflection { return field; } - /** 注册隐式转换器 */ + /** + * 注册隐式转换器 + */ public static void registerImplicitConvert(ClassImplicitConvert classImplicitConvert) { CONVERTS.add(classImplicitConvert); } @@ -537,7 +545,7 @@ public class JavaReflection { /** * 注册扩展方法 * - * @param target 目标类 + * @param target 目标类 * @param extensionObject 实现类 */ public static void registerMethodExtension(Class target, Object extensionObject) { @@ -728,10 +736,16 @@ public class JavaReflection { return findMethodInvoker(methodList, getParameterTypes(null, arguments)); } - /** NULL值 */ - public static final class Null {} + /** + * NULL值 + */ + public static final class Null { - /** 方法签名 */ + } + + /** + * 方法签名 + */ private static class MethodSignature { private final String name; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/MethodInvoker.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/MethodInvoker.java index 8dd52c5c..1b78ac44 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/MethodInvoker.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/reflection/MethodInvoker.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.reflection; import java.lang.reflect.InvocationTargetException; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/ExitValue.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/ExitValue.java index 06373eed..8456981b 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/ExitValue.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/ExitValue.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime; public class ExitValue { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptClassLoader.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptClassLoader.java index a71c70c9..6adfab96 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptClassLoader.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptClassLoader.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime; public class MagicScriptClassLoader extends ClassLoader { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptRuntime.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptRuntime.java index 092ea149..e4421661 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptRuntime.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptRuntime.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime; import cn.universal.core.engine.MagicScriptContext; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptVariableAccessRuntime.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptVariableAccessRuntime.java index 3bd2a4ca..82fbbfba 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptVariableAccessRuntime.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/MagicScriptVariableAccessRuntime.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime; import cn.universal.core.engine.MagicScriptContext; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/RuntimeContext.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/RuntimeContext.java index 118b06ab..c41bae21 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/RuntimeContext.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/RuntimeContext.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime; import cn.universal.core.engine.MagicScriptContext; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/SpreadValue.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/SpreadValue.java index 2f1d4b6d..bb7a085d 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/SpreadValue.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/SpreadValue.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime; public class SpreadValue { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/Variables.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/Variables.java index b10dbe24..67c6279d 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/Variables.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/Variables.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime; import cn.universal.core.engine.MagicScriptContext; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/function/MagicScriptLambdaFunction.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/function/MagicScriptLambdaFunction.java index dad28a1d..6684e6cb 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/function/MagicScriptLambdaFunction.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/function/MagicScriptLambdaFunction.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.function; import cn.universal.core.engine.runtime.Variables; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/function/MagicScriptLanguageFunction.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/function/MagicScriptLanguageFunction.java index dc7a0fdc..8d645df6 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/function/MagicScriptLanguageFunction.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/function/MagicScriptLanguageFunction.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.function; import cn.universal.core.engine.MagicResourceLoader; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/ArithmeticHandle.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/ArithmeticHandle.java index ffcfe676..907c64c5 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/ArithmeticHandle.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/ArithmeticHandle.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.handle; import static java.lang.invoke.MethodHandles.catchException; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/BitHandle.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/BitHandle.java index 6fea171e..69363622 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/BitHandle.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/BitHandle.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.handle; import static java.lang.invoke.MethodHandles.catchException; @@ -799,6 +797,7 @@ public class BitHandle { private static Object reject(Object a, Object b, String symbol) throws IllegalArgumentException { throw new IllegalArgumentException( String.format( - "操作符 `%s` 不支持 (%s,%s) 类型", symbol, a.getClass().getName(), b.getClass().getName())); + "操作符 `%s` 不支持 (%s,%s) 类型", symbol, a.getClass().getName(), + b.getClass().getName())); } } diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/FunctionCallHandle.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/FunctionCallHandle.java index c071763a..9eee00a0 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/FunctionCallHandle.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/FunctionCallHandle.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.handle; import static java.lang.invoke.MethodType.methodType; @@ -185,7 +183,8 @@ public class FunctionCallHandle { return method.invoke0(target, runtimeContext, args); } throw new NoSuchMethodException( - String.format("找不到函数%s(%s)", name, String.join(",", JavaReflection.getStringTypes(args)))); + String.format("找不到函数%s(%s)", name, + String.join(",", JavaReflection.getStringTypes(args)))); } public static Object invoke_method( @@ -219,7 +218,7 @@ public class FunctionCallHandle { MethodInvoker invoker = new MethodInvoker( DynamicMethod.class.getDeclaredMethod("execute", String.class, List.class)); - Object[] newArgumentValues = new Object[] {name, Arrays.asList(args)}; + Object[] newArgumentValues = new Object[]{name, Arrays.asList(args)}; return invoker.invoke0(target, runtimeContext, newArgumentValues); } try { @@ -305,7 +304,8 @@ public class FunctionCallHandle { } throw new MagicScriptRuntimeException( String.format( - "在%s中找不到属性%s或者方法get%s、方法is%s,内部类%s", target, name, methodName, methodName, name)); + "在%s中找不到属性%s或者方法get%s、方法is%s,内部类%s", target, name, methodName, + methodName, name)); } public static Object call_async( @@ -439,9 +439,10 @@ public class FunctionCallHandle { JavaInvoker invoker = JavaReflection.getMethod(target, "set" + methodName, value); if (invoker == null) { throw new MagicScriptRuntimeException( - String.format("在%s中找不到属性%s或者方法set%s", target.getClass(), name, methodName)); + String.format("在%s中找不到属性%s或者方法set%s", target.getClass(), name, + methodName)); } - invoker.invoke0(target, runtimeContext, new Object[] {value}); + invoker.invoke0(target, runtimeContext, new Object[]{value}); } } return value; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/MethodCallSite.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/MethodCallSite.java index c849a4eb..3cb666c1 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/MethodCallSite.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/MethodCallSite.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.handle; import java.lang.invoke.MethodHandle; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/OperatorHandle.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/OperatorHandle.java index 3885393d..2226ad1b 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/OperatorHandle.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/handle/OperatorHandle.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.handle; import static java.lang.invoke.MethodHandles.catchException; @@ -1275,7 +1273,8 @@ public class OperatorHandle { private static Object reject(Object a, Object b, String symbol) throws IllegalArgumentException { throw new IllegalArgumentException( String.format( - "操作符 `%s` 不支持 (%s,%s) 类型", symbol, a.getClass().getName(), b.getClass().getName())); + "操作符 `%s` 不支持 (%s,%s) 类型", symbol, a.getClass().getName(), + b.getClass().getName())); } public static Object map_or_array_access(int[] target, Number key) { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/ArrayKeyValueIterator.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/ArrayKeyValueIterator.java index cdc11008..44062419 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/ArrayKeyValueIterator.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/ArrayKeyValueIterator.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.lang; public class ArrayKeyValueIterator extends ArrayValueIterator implements KeyIterator { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/ArrayValueIterator.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/ArrayValueIterator.java index 9ecf21ed..7a9a9012 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/ArrayValueIterator.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/ArrayValueIterator.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.lang; import java.lang.reflect.Array; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/KeyIterator.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/KeyIterator.java index b8d2d4b2..9ddb2253 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/KeyIterator.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/KeyIterator.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.lang; public interface KeyIterator { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/KeyValueIterator.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/KeyValueIterator.java index bbe970eb..23f4d89c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/KeyValueIterator.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/KeyValueIterator.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.lang; import java.util.Iterator; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/MapKeyValueIterator.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/MapKeyValueIterator.java index 78cb17f3..55307b2f 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/MapKeyValueIterator.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/lang/MapKeyValueIterator.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.lang; import java.util.Iterator; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/JoinValue.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/JoinValue.java index 7a6bc293..55e3140c 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/JoinValue.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/JoinValue.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.linq; public class JoinValue { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQBuilder.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQBuilder.java index 9f38255c..8e2c2a9b 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQBuilder.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQBuilder.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.linq; import cn.universal.core.engine.functions.MapExtension; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQJoinValue.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQJoinValue.java index 4ea7de9f..a330d625 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQJoinValue.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQJoinValue.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.linq; import cn.universal.core.engine.runtime.function.MagicScriptLambdaFunction; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQOrder.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQOrder.java index 523c1f91..5e9f670d 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQOrder.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/LinQOrder.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.linq; import cn.universal.core.engine.runtime.function.MagicScriptLambdaFunction; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/OrderValue.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/OrderValue.java index 9dad6754..839dad4f 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/OrderValue.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/OrderValue.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.linq; public class OrderValue { diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/Record.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/Record.java index 015364a6..e52f0ddc 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/Record.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/Record.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.linq; import cn.universal.core.engine.runtime.Variables; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/SelectField.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/SelectField.java index 7ba561a2..27cdfe27 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/SelectField.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/SelectField.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.linq; import cn.universal.core.engine.runtime.function.MagicScriptLambdaFunction; diff --git a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/SelectValue.java b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/SelectValue.java index 816eb202..dfc3838a 100644 --- a/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/SelectValue.java +++ b/cn-universal-framework/cn-universal-core/src/main/java/cn/universal/core/engine/runtime/linq/SelectValue.java @@ -1,5 +1,3 @@ - - package cn.universal.core.engine.runtime.linq; import cn.universal.core.engine.parsing.ast.BinaryOperation; -- Gitee