public class DeepCopier extends Object
The main purpose of this class is to extend it, and modify the AST while it is being copied.
For an example, see org.codehaus.janino.tests.AstTest#testMethodToLabeledStatement().
| Constructor and Description |
|---|
DeepCopier() |
public Java.CompilationUnit.ImportDeclaration copyImportDeclaration(Java.CompilationUnit.ImportDeclaration subject) throws CompileException
CompileExceptionpublic Java.TypeDeclaration copyTypeDeclaration(Java.TypeDeclaration subject) throws CompileException
CompileExceptionpublic Java.TypeBodyDeclaration copyTypeBodyDeclaration(Java.TypeBodyDeclaration subject) throws CompileException
CompileExceptionpublic Java.FunctionDeclarator copyFunctionDeclarator(Java.FunctionDeclarator subject) throws CompileException
CompileExceptionpublic Java.BlockStatement copyBlockStatement(Java.BlockStatement subject) throws CompileException
CompileExceptionpublic Java.TryStatement.Resource copyResource(Java.TryStatement.Resource subject) throws CompileException
CompileExceptionpublic Java.TypeArgument copyTypeArgument(Java.TypeArgument subject) throws CompileException
CompileExceptionpublic Java.ConstructorInvocation copyConstructorInvocation(Java.ConstructorInvocation subject) throws CompileException
CompileExceptionpublic Java.ElementValue copyElementValue(Java.ElementValue subject) throws CompileException
CompileExceptionpublic Java.Annotation copyAnnotation(Java.Annotation subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyRvalue(Java.Rvalue subject) throws CompileException
CompileExceptionpublic Java.Lvalue copyLvalue(Java.Lvalue subject) throws CompileException
CompileExceptionpublic Java.Type copyType(Java.Type subject) throws CompileException
CompileExceptionpublic Java.Atom copyAtom(Java.Atom subject) throws CompileException
CompileExceptionpublic Java.PackageMemberTypeDeclaration copyPackageMemberTypeDeclaration(Java.PackageMemberTypeDeclaration subject) throws CompileException
CompileExceptionpublic Java.MemberTypeDeclaration copyMemberTypeDeclaration(Java.MemberTypeDeclaration subject) throws CompileException
CompileExceptionpublic Java.Statement copyStatement(Java.Statement subject) throws CompileException
CompileException@Nullable public Java.PackageDeclaration copyOptionalPackageDeclaration(@Nullable Java.PackageDeclaration subject) throws CompileException
CompileException@Nullable public Java.BlockStatement copyOptionalBlockStatement(@Nullable Java.BlockStatement subject) throws CompileException
CompileException@Nullable public Java.Block copyOptionalBlock(@Nullable Java.Block subject) throws CompileException
CompileException@Nullable public Java.ArrayInitializer copyOptionalArrayInitializer(@Nullable Java.ArrayInitializer subject) throws CompileException
CompileException@Nullable public Java.ArrayType copyOptionalArrayType(@Nullable Java.ArrayType subject) throws CompileException
CompileException@Nullable public Java.ReferenceType copyOptionalReferenceType(@Nullable Java.ReferenceType subject) throws CompileException
CompileException@Nullable public Java.ConstructorInvocation copyOptionalConstructorInvocation(@Nullable Java.ConstructorInvocation subject) throws CompileException
CompileException@Nullable public Java.ElementValue copyOptionalElementValue(@Nullable Java.ElementValue subject) throws CompileException
CompileException@Nullable public Java.Rvalue copyOptionalRvalue(@Nullable Java.Rvalue subject) throws CompileException
CompileException@Nullable public Java.Type copyOptionalType(@Nullable Java.Type subject) throws CompileException
CompileException@Nullable public Java.Atom copyOptionalAtom(@Nullable Java.Atom subject) throws CompileException
CompileException@Nullable public Java.ArrayInitializerOrRvalue copyOptionalArrayInitializerOrRvalue(@Nullable Java.ArrayInitializerOrRvalue subject) throws CompileException
CompileException@Nullable public Java.ReferenceType[] copyOptionalReferenceTypes(@Nullable Java.ReferenceType[] subject) throws CompileException
CompileException@Nullable public Java.TypeArgument[] copyOptionalTypeArguments(@Nullable Java.TypeArgument[] subject) throws CompileException
CompileException@Nullable public Java.Rvalue[] copyOptionalRvalues(@Nullable Java.Rvalue[] subject) throws CompileException
CompileException@Nullable public Java.TypeParameter[] copyOptionalTypeParameters(@Nullable Java.TypeParameter[] subject) throws CompileException
CompileException@Nullable public List<Java.BlockStatement> copyOptionalStatements(@Nullable Collection<? extends Java.BlockStatement> subject) throws CompileException
CompileExceptionpublic Java.TypeArgument[] copyTypeArguments(Java.TypeArgument[] subject) throws CompileException
CompileExceptionpublic Java.VariableDeclarator[] copyVariableDeclarators(Java.VariableDeclarator[] subject) throws CompileException
CompileExceptionpublic Java.ArrayInitializerOrRvalue[] copyArrayInitializerOrRvalues(Java.ArrayInitializerOrRvalue[] subject) throws CompileException
CompileExceptionpublic Java.ReferenceType[] copyReferenceTypes(Java.ReferenceType[] subject) throws CompileException
CompileExceptionpublic Java.ElementValue[] copyElementValues(Java.ElementValue[] subject) throws CompileException
CompileExceptionpublic Java.ElementValuePair[] copyElementValuePairs(Java.ElementValuePair[] subject) throws CompileException
CompileExceptionpublic Java.Type[] copyTypes(Java.Type[] subject) throws CompileException
CompileExceptionpublic Java.TypeParameter[] copyTypeParameters(Java.TypeParameter[] subject) throws CompileException
CompileExceptionpublic Java.Annotation[] copyAnnotations(Java.Annotation[] subject) throws CompileException
CompileExceptionpublic Java.Rvalue[] copyRvalues(Java.Rvalue[] subject) throws CompileException
CompileExceptionpublic Java.FunctionDeclarator.FormalParameters copyFormalParameters(Java.FunctionDeclarator.FormalParameters subject) throws CompileException
CompileExceptionpublic List<Java.BlockStatement> copyBlockStatements(Collection<? extends Java.BlockStatement> subject) throws CompileException
CompileExceptionpublic List<Java.TryStatement.Resource> copyResources(Collection<? extends Java.TryStatement.Resource> subject) throws CompileException
CompileExceptionpublic List<Java.CatchClause> copyCatchClauses(Collection<? extends Java.CatchClause> subject) throws CompileException
CompileExceptionpublic List<Java.SwitchStatement.SwitchBlockStatementGroup> copySwitchBlockStatementGroups(Collection<? extends Java.SwitchStatement.SwitchBlockStatementGroup> subject) throws CompileException
CompileExceptionpublic List<Java.Annotation> copyAnnotations(Collection<? extends Java.Annotation> subject) throws CompileException
CompileExceptionpublic List<Java.BlockStatement> copyStatements(Collection<? extends Java.BlockStatement> subject) throws CompileException
CompileExceptionpublic List<Java.Rvalue> copyRvalues(Collection<? extends Java.Rvalue> subject) throws CompileException
CompileExceptionpublic Java.CompilationUnit copyCompilationUnit(Java.CompilationUnit subject) throws CompileException
CompileExceptionpublic Java.TypeArgument copyWildcard(Java.Wildcard subject) throws CompileException
CompileExceptionpublic Java.PackageDeclaration copyPackageDeclaration(Java.PackageDeclaration subject) throws CompileException
CompileExceptionpublic Java.CompilationUnit.ImportDeclaration copySingleTypeImportDeclaration(Java.CompilationUnit.SingleTypeImportDeclaration stid) throws CompileException
CompileExceptionpublic Java.CompilationUnit.ImportDeclaration copyTypeImportOnDemandDeclaration(Java.CompilationUnit.TypeImportOnDemandDeclaration tiodd) throws CompileException
CompileExceptionpublic Java.CompilationUnit.ImportDeclaration copySingleStaticImportDeclaration(Java.CompilationUnit.SingleStaticImportDeclaration stid) throws CompileException
CompileExceptionpublic Java.CompilationUnit.ImportDeclaration copyStaticImportOnDemandDeclaration(Java.CompilationUnit.StaticImportOnDemandDeclaration siodd) throws CompileException
CompileExceptionpublic Java.AnonymousClassDeclaration copyAnonymousClassDeclaration(Java.AnonymousClassDeclaration subject) throws CompileException
CompileExceptionpublic Java.LocalClassDeclaration copyLocalClassDeclaration(Java.LocalClassDeclaration subject) throws CompileException
CompileExceptionpublic Java.TypeDeclaration copyPackageMemberClassDeclaration(Java.PackageMemberClassDeclaration subject) throws CompileException
CompileExceptionpublic Java.MemberTypeDeclaration copyMemberInterfaceDeclaration(Java.MemberInterfaceDeclaration subject) throws CompileException
CompileExceptionpublic Java.TypeDeclaration copyPackageMemberInterfaceDeclaration(Java.PackageMemberInterfaceDeclaration subject) throws CompileException
CompileExceptionpublic Java.MemberTypeDeclaration copyMemberClassDeclaration(Java.MemberClassDeclaration subject) throws CompileException
CompileExceptionpublic Java.ConstructorDeclarator copyConstructorDeclarator(Java.ConstructorDeclarator subject) throws CompileException
CompileExceptionpublic Java.Initializer copyInitializer(Java.Initializer subject) throws CompileException
CompileExceptionpublic Java.MethodDeclarator copyMethodDeclarator(Java.MethodDeclarator subject) throws CompileException
CompileExceptionpublic Java.FieldDeclaration copyFieldDeclaration(Java.FieldDeclaration subject) throws CompileException
CompileExceptionpublic Java.VariableDeclarator copyVariableDeclarator(Java.VariableDeclarator subject) throws CompileException
CompileExceptionpublic Java.BlockStatement copyLabeledStatement(Java.LabeledStatement ls) throws CompileException
CompileExceptionpublic Java.Block copyBlock(Java.Block b) throws CompileException
CompileExceptionpublic Java.BlockStatement copyExpressionStatement(Java.ExpressionStatement es) throws CompileException
CompileExceptionpublic Java.BlockStatement copyIfStatement(Java.IfStatement is) throws CompileException
CompileExceptionpublic Java.BlockStatement copyForStatement(Java.ForStatement fs) throws CompileException
CompileExceptionpublic Java.BlockStatement copyForEachStatement(Java.ForEachStatement fes) throws CompileException
CompileExceptionpublic Java.BlockStatement copyWhileStatement(Java.WhileStatement ws) throws CompileException
CompileExceptionpublic Java.BlockStatement copyTryStatement(Java.TryStatement ts) throws CompileException
CompileExceptionpublic Java.CatchClause copyCatchClause(Java.CatchClause subject) throws CompileException
CompileExceptionpublic Java.BlockStatement copySwitchStatement(Java.SwitchStatement subject) throws CompileException
CompileExceptionpublic Java.SwitchStatement.SwitchBlockStatementGroup copySwitchBlockStatementGroup(Java.SwitchStatement.SwitchBlockStatementGroup subject) throws CompileException
CompileExceptionpublic Java.BlockStatement copySynchronizedStatement(Java.SynchronizedStatement subject) throws CompileException
CompileExceptionpublic Java.BlockStatement copyDoStatement(Java.DoStatement subject) throws CompileException
CompileExceptionpublic Java.BlockStatement copyLocalVariableDeclarationStatement(Java.LocalVariableDeclarationStatement subject) throws CompileException
CompileExceptionpublic Java.BlockStatement copyReturnStatement(Java.ReturnStatement subject) throws CompileException
CompileExceptionpublic Java.BlockStatement copyThrowStatement(Java.ThrowStatement subject) throws CompileException
CompileExceptionpublic Java.BlockStatement copyBreakStatement(Java.BreakStatement subject) throws CompileException
CompileExceptionpublic Java.BlockStatement copyContinueStatement(Java.ContinueStatement subject) throws CompileException
CompileExceptionpublic Java.BlockStatement copyAssertStatement(Java.AssertStatement subject) throws CompileException
CompileExceptionpublic Java.BlockStatement copyEmptyStatement(Java.EmptyStatement subject) throws CompileException
CompileExceptionpublic Java.BlockStatement copyLocalClassDeclarationStatement(Java.LocalClassDeclarationStatement subject) throws CompileException
CompileExceptionpublic Java.Atom copyPackage(Java.Package subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyArrayLength(Java.ArrayLength subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyAssignment(Java.Assignment subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyUnaryOperation(Java.UnaryOperation subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyBinaryOperation(Java.BinaryOperation subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyCast(Java.Cast subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyClassLiteral(Java.ClassLiteral subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyConditionalExpression(Java.ConditionalExpression subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyCrement(Java.Crement subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyInstanceof(Java.Instanceof subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyMethodInvocation(Java.MethodInvocation subject) throws CompileException
CompileExceptionpublic Java.Rvalue copySuperclassMethodInvocation(Java.SuperclassMethodInvocation subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyIntegerLiteral(Java.IntegerLiteral subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyFloatingPointLiteral(Java.FloatingPointLiteral subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyBooleanLiteral(Java.BooleanLiteral subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyCharacterLiteral(Java.CharacterLiteral subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyStringLiteral(Java.StringLiteral subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyNullLiteral(Java.NullLiteral subject) throws CompileException
CompileExceptionpublic Java.Rvalue copySimpleLiteral(Java.SimpleConstant subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyNewAnonymousClassInstance(Java.NewAnonymousClassInstance subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyNewArray(Java.NewArray subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyNewInitializedArray(Java.NewInitializedArray subject) throws CompileException
CompileExceptionpublic Java.ArrayInitializer copyArrayInitializer(Java.ArrayInitializer subject) throws CompileException
CompileExceptionpublic Java.ArrayInitializerOrRvalue copyArrayInitializerOrRvalue(Java.ArrayInitializerOrRvalue subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyNewClassInstance(Java.NewClassInstance subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyParameterAccess(Java.ParameterAccess pa) throws CompileException
CompileExceptionpublic Java.Rvalue copyQualifiedThisReference(Java.QualifiedThisReference subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyThisReference(Java.ThisReference subject) throws CompileException
CompileExceptionpublic Java.Rvalue copyLambdaExpression(Java.LambdaExpression subject)
public Java.ArrayType copyArrayType(Java.ArrayType subject) throws CompileException
CompileExceptionpublic Java.Type copyPrimitiveType(Java.PrimitiveType bt) throws CompileException
CompileExceptionpublic Java.ReferenceType copyReferenceType(Java.ReferenceType subject) throws CompileException
CompileExceptionpublic Java.Type copyRvalueMemberType(Java.RvalueMemberType subject) throws CompileException
CompileExceptionpublic Java.Type copySimpleType(Java.SimpleType st) throws CompileException
CompileExceptionpublic Java.ConstructorInvocation copyAlternateConstructorInvocation(Java.AlternateConstructorInvocation subject) throws CompileException
CompileExceptionpublic Java.ConstructorInvocation copySuperConstructorInvocation(Java.SuperConstructorInvocation subject) throws CompileException
CompileExceptionpublic Java.Lvalue copyAmbiguousName(Java.AmbiguousName subject) throws CompileException
CompileExceptionpublic Java.Lvalue copyArrayAccessExpression(Java.ArrayAccessExpression subject) throws CompileException
CompileExceptionpublic Java.Lvalue copyFieldAccess(Java.FieldAccess subject) throws CompileException
CompileExceptionpublic Java.Lvalue copyFieldAccessExpression(Java.FieldAccessExpression subject) throws CompileException
CompileExceptionpublic Java.Lvalue copySuperclassFieldAccessExpression(Java.SuperclassFieldAccessExpression subject) throws CompileException
CompileExceptionpublic Java.Lvalue copyLocalVariableAccess(Java.LocalVariableAccess subject) throws CompileException
CompileExceptionpublic Java.Lvalue copyParenthesizedExpression(Java.ParenthesizedExpression subject) throws CompileException
CompileExceptionpublic Java.ElementValue copyElementValueArrayInitializer(Java.ElementValueArrayInitializer subject) throws CompileException
CompileExceptionpublic Java.Annotation copySingleElementAnnotation(Java.SingleElementAnnotation subject) throws CompileException
CompileExceptionpublic Java.Annotation copyNormalAnnotation(Java.NormalAnnotation subject) throws CompileException
CompileExceptionpublic Java.ElementValuePair copyElementValuePair(Java.ElementValuePair subject) throws CompileException
CompileExceptionpublic Java.Annotation copyMarkerAnnotation(Java.MarkerAnnotation subject) throws CompileException
CompileExceptionpublic Java.FunctionDeclarator.FormalParameter copyFormalParameter(Java.FunctionDeclarator.FormalParameter subject) throws CompileException
CompileExceptionpublic Java.CatchParameter copyCatchParameter(Java.CatchParameter subject) throws CompileException
CompileExceptionpublic Java.EnumConstant copyEnumConstant(Java.EnumConstant subject) throws CompileException
CompileExceptionpublic Java.TypeDeclaration copyPackageMemberEnumDeclaration(Java.PackageMemberEnumDeclaration subject) throws CompileException
CompileExceptionpublic Java.MemberTypeDeclaration copyMemberEnumDeclaration(Java.MemberEnumDeclaration subject) throws CompileException
CompileExceptionpublic Java.TypeDeclaration copyPackageMemberAnnotationTypeDeclaration(Java.PackageMemberAnnotationTypeDeclaration subject) throws CompileException
CompileExceptionpublic Java.MemberTypeDeclaration copyMemberAnnotationTypeDeclaration(Java.MemberAnnotationTypeDeclaration subject) throws CompileException
CompileExceptionpublic Java.TryStatement.Resource copyLocalVariableDeclaratorResource(Java.TryStatement.LocalVariableDeclaratorResource subject) throws CompileException
CompileExceptionpublic Java.TryStatement.Resource copyVariableAccessResource(Java.TryStatement.VariableAccessResource subject) throws CompileException
CompileExceptionpublic Java.Modifiers copyModifiers(Java.Modifiers subject) throws CompileException
CompileExceptionpublic Java.TypeParameter copyTypeParameter(Java.TypeParameter subject) throws CompileException
CompileExceptionCopyright © 2019. All rights reserved.