8335642: Hide Transform implementation for Class-File API

Reviewed-by: asotona
This commit is contained in:
Chen Liang 2024-07-15 12:11:53 +00:00
parent 2b0adfc2de
commit a253e0ff4b
9 changed files with 66 additions and 136 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -96,15 +96,4 @@ public non-sealed interface CodeTransform
default CodeTransform andThen(CodeTransform t) {
return new TransformImpl.ChainedCodeTransform(this, t);
}
/**
* @implSpec The default implementation returns a resolved transform bound
* to the given code builder.
*/
@Override
default ResolvedTransform<CodeElement> resolve(CodeBuilder builder) {
return new TransformImpl.ResolvedTransformImpl<>(e -> accept(builder, e),
() -> atEnd(builder),
() -> atStart(builder));
}
}