├── .gitignore ├── HEADER-DERRIVED.txt ├── HEADER-ORIGINAL.txt ├── LICENSE ├── NOTICE ├── README.md ├── net.tascalate.javaflow.agent.common ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── pom.xml └── src │ └── main │ └── java │ ├── module-info.java │ └── org │ └── apache │ └── commons │ └── javaflow │ └── agent │ └── common │ └── ConfigurableClassFileTransformer.java ├── net.tascalate.javaflow.agent.core ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── pom.xml └── src │ └── main │ └── java │ ├── module-info.java │ └── org │ └── apache │ └── commons │ └── javaflow │ └── agent │ └── core │ ├── ContinuableClassBytecodeTransformer.java │ └── ContinuableClassesInstrumentationAgent.java ├── net.tascalate.javaflow.agent.proxy ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── pom.xml └── src │ └── main │ └── java │ ├── module-info.java │ └── org │ └── apache │ └── commons │ └── javaflow │ └── agent │ └── proxy │ ├── ContinuableProxiesInstrumentationAgent.java │ └── ContinuableProxyBytecodeTransformer.java ├── net.tascalate.javaflow.api-ng ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── apache │ └── commons │ └── javaflow │ └── core │ ├── PlatformContinuationExecutor.java │ ├── ScopedContinuationExecutor.java │ ├── ScopedValueContinuationExecutor.java │ ├── StackRecorder.java │ └── ThreadLocalContinuationExecutor.java ├── net.tascalate.javaflow.api ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.m2e.core.prefs │ ├── org.eclipse.wst.common.component │ ├── org.eclipse.wst.common.project.facet.core.xml │ └── org.eclipse.wst.validation.prefs ├── pom.xml └── src │ └── main │ └── java │ ├── module-info.java │ └── org │ └── apache │ └── commons │ └── javaflow │ ├── api │ ├── ContinuableAnnotation.java │ ├── Continuation.java │ ├── InterceptorSupport.java │ ├── ccs.java │ └── continuable.java │ └── core │ ├── ContinuableProxy.java │ ├── ContinuationDeath.java │ ├── CustomContinuableProxy.java │ ├── EmptyStackException.java │ ├── PlatformContinuationExecutor.java │ ├── ReflectionUtils.java │ ├── ResumeParameter.java │ ├── ScopedContinuationExecutor.java │ ├── Skip.java │ ├── Stack.java │ ├── StackRecorder.java │ ├── SuspendResult.java │ └── ThreadLocalContinuationExecutor.java ├── net.tascalate.javaflow.providers.asm3 ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── apache │ └── commons │ └── javaflow │ └── providers │ └── asm3 │ ├── .svn │ ├── all-wcprops │ ├── entries │ ├── prop-base │ │ ├── AsmClassTransformer.java.svn-base │ │ ├── ContinuationClassAdapter.java.svn-base │ │ ├── ContinuationMethodAdapter.java.svn-base │ │ ├── ContinuationMethodAnalyzer.java.svn-base │ │ └── MonitoringFrame.java.svn-base │ └── text-base │ │ ├── AsmClassTransformer.java.svn-base │ │ ├── ContinuationClassAdapter.java.svn-base │ │ ├── ContinuationMethodAdapter.java.svn-base │ │ ├── ContinuationMethodAnalyzer.java.svn-base │ │ └── MonitoringFrame.java.svn-base │ ├── AbstractResourceTransformationFactory.java │ ├── Asm3ResourceTransformationFactory.java │ ├── BytecodeDebugUtils.java.code │ ├── ClassHierarchy.java │ ├── ContinuableClassInfo.java │ ├── ContinuableClassInfoResolver.java │ ├── ContinuableClassTransformer.java │ ├── ContinuableClassVisitor.java │ ├── ContinuableMethodNode.java │ ├── ContinuableMethodVisitor.java │ ├── FastClassVerifier.java │ ├── IContinuableClassInfo.java │ ├── IContinuableClassInfoResolver.java │ ├── MaybeContinuableAnnotationVisitor.java │ ├── MaybeContinuableClassVisitor.java │ ├── MonitoringFrame.java │ ├── OfflineClassWriter.java │ ├── PartialResourceTransformationFactory.java │ └── SharedContinuableClassInfos.java ├── net.tascalate.javaflow.providers.asm4 ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── apache │ └── commons │ └── javaflow │ └── providers │ └── asm4 │ ├── .svn │ ├── all-wcprops │ ├── entries │ ├── prop-base │ │ ├── AsmClassTransformer.java.svn-base │ │ ├── ContinuationClassAdapter.java.svn-base │ │ ├── ContinuationMethodAdapter.java.svn-base │ │ ├── ContinuationMethodAnalyzer.java.svn-base │ │ └── MonitoringFrame.java.svn-base │ └── text-base │ │ ├── AsmClassTransformer.java.svn-base │ │ ├── ContinuationClassAdapter.java.svn-base │ │ ├── ContinuationMethodAdapter.java.svn-base │ │ ├── ContinuationMethodAnalyzer.java.svn-base │ │ └── MonitoringFrame.java.svn-base │ ├── AbstractResourceTransformationFactory.java │ ├── Asm4ResourceTransformationFactory.java │ ├── AsmVersion.java │ ├── ClassHierarchy.java │ ├── ContinuableClassInfo.java │ ├── ContinuableClassInfoResolver.java │ ├── ContinuableClassTransformer.java │ ├── ContinuableClassVisitor.java │ ├── ContinuableMethodNode.java │ ├── ContinuableMethodVisitor.java │ ├── FastClassVerifier.java │ ├── IContinuableClassInfo.java │ ├── IContinuableClassInfoResolver.java │ ├── MaybeContinuableAnnotationVisitor.java │ ├── MaybeContinuableClassVisitor.java │ ├── MonitoringFrame.java │ ├── OfflineClassWriter.java │ ├── PartialResourceTransformationFactory.java │ └── SharedContinuableClassInfos.java ├── net.tascalate.javaflow.providers.asm5 ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── apache │ └── commons │ └── javaflow │ └── providers │ └── asm5 │ ├── AbstractResourceTransformationFactory.java │ ├── Asm5ResourceTransformationFactory.java │ ├── AsmVersion.java │ ├── CallSiteFinder.java │ ├── ClassHierarchy.java │ ├── ContinuableClassInfo.java │ ├── ContinuableClassInfoResolver.java │ ├── ContinuableClassTransformer.java │ ├── ContinuableClassVisitor.java │ ├── ContinuableMethodNode.java │ ├── ContinuableMethodVisitor.java │ ├── FastClassVerifier.java │ ├── IContinuableClassInfo.java │ ├── IContinuableClassInfoResolver.java │ ├── MaybeContinuableAnnotationVisitor.java │ ├── MaybeContinuableClassVisitor.java │ ├── MonitoringFrame.java │ ├── OfflineClassWriter.java │ ├── PartialResourceTransformationFactory.java │ └── SharedContinuableClassInfos.java ├── net.tascalate.javaflow.providers.asmx ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── pom.xml └── src │ └── main │ └── java │ ├── module-info.java │ └── org │ └── apache │ └── commons │ └── javaflow │ └── providers │ └── asmx │ ├── AbstractResourceTransformationFactory.java │ ├── AsmxResourceLoader.java │ ├── AsmxResourceTransformationFactory.java │ ├── CallSiteFinder.java │ ├── ContinuableClassInfo.java │ ├── ContinuableClassInfoResolver.java │ ├── ContinuableClassTransformer.java │ ├── ContinuableClassVisitor.java │ ├── ContinuableMethodNode.java │ ├── ContinuableMethodVisitor.java │ ├── FastClassVerifier.java │ ├── IContinuableClassInfo.java │ ├── IContinuableClassInfoResolver.java │ ├── MaybeContinuableAnnotationVisitor.java │ ├── MaybeContinuableClassVisitor.java │ ├── MonitoringFrame.java │ ├── PartialResourceTransformationFactory.java │ └── SharedContinuableClassInfos.java ├── net.tascalate.javaflow.providers.core ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── pom.xml └── src │ └── main │ └── java │ ├── module-info.java │ └── org │ └── apache │ └── commons │ └── javaflow │ └── providers │ └── core │ ├── AbstractResourceTransformationFactory.java │ ├── AsmxResourceLoader.java │ ├── CallSiteFinder.java │ ├── ContinuableClassInfo.java │ ├── ContinuableClassInfoResolver.java │ ├── ContinuableClassTransformationFactory.java │ ├── ContinuableClassTransformer.java │ ├── ContinuableClassVisitor.java │ ├── ContinuableMethodNode.java │ ├── ContinuableMethodVisitor.java │ ├── FastClassVerifier.java │ ├── IContinuableClassInfo.java │ ├── IContinuableClassInfoResolver.java │ ├── MaybeContinuableAnnotationVisitor.java │ ├── MaybeContinuableClassVisitor.java │ ├── MonitoringFrame.java │ ├── PartialResourceTransformationFactory.java │ └── SharedContinuableClassInfos.java ├── net.tascalate.javaflow.providers.proxy ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── pom.xml └── src │ └── main │ └── java │ ├── module-info.java │ └── org │ └── apache │ └── commons │ └── javaflow │ └── providers │ └── proxy │ ├── ContinuableProxyAdapter.java │ ├── ContinuableProxyTransformationFactory.java │ ├── ContinuableProxyTransformer.java │ ├── ExtendedClassVisitor.java │ ├── ProxyClassProcessor.java │ ├── ProxyType.java │ ├── cglib │ └── CGLibProxyClassProcessor.java │ ├── common │ └── ProxiedMethodAdvice.java │ ├── custom │ └── CustomProxyClassProcessor.java │ ├── jdk │ └── JavaProxyClassProcessor.java │ ├── owb │ ├── OwbInterceptorProxyMethodAdvice.java │ ├── OwbProxyClassProcessor.java │ └── OwbScopeProxyMethodAdvice.java │ ├── spring │ └── SpringProxyClassProcessor.java │ └── weld │ └── WeldProxyClassProcessor.java ├── net.tascalate.javaflow.spi ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── pom.xml └── src │ └── main │ ├── java │ ├── module-info.java │ └── org │ │ └── apache │ │ └── commons │ │ └── javaflow │ │ └── spi │ │ ├── AbstractResourceTransformer.java │ │ ├── Cache.java │ │ ├── ClassHeaderReader.java │ │ ├── ClassMatchStrategies.java │ │ ├── ClassMatchStrategy.java │ │ ├── ClassMatchStrategyFileParser.java │ │ ├── ClassMatcher.java │ │ ├── ClasspathResourceLoader.java │ │ ├── CompositeResourceTransformer.java │ │ ├── ExtendedClasspathResourceLoader.java │ │ ├── FastByteArrayInputStream.java │ │ ├── FastByteArrayOutputStream.java │ │ ├── InstrumentationUtils.java │ │ ├── MorphingResourceLoader.java │ │ ├── NopResourceTransformer.java │ │ ├── RecursiveFilesIterator.java │ │ ├── ResourceLoader.java │ │ ├── ResourceTransformationFactory.java │ │ ├── ResourceTransformer.java │ │ ├── StopException.java │ │ └── VetoableResourceLoader.java │ └── resources │ └── META-INF │ └── net.tascalate.javaflow.veto.cmf ├── net.tascalate.javaflow.tools.ant ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── apache │ │ └── commons │ │ └── javaflow │ │ └── tools │ │ └── ant │ │ └── ContinuableClassesInstrumentationTask.java │ └── resources │ └── org │ └── apache │ └── commons │ └── javaflow │ └── tools │ └── ant │ └── tasks.properties ├── net.tascalate.javaflow.tools.gradle ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── apache │ │ └── commons │ │ └── javaflow │ │ └── tools │ │ └── gradle │ │ ├── ContinuableClassesInstrumentationPlugin.java │ │ └── ContinuableClassesInstrumentationPluginConfiguration.java │ └── resources │ └── META-INF │ └── gradle-plugins │ └── continuations.properties ├── net.tascalate.javaflow.tools.jar ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── pom.xml └── src │ ├── main │ └── java │ │ ├── module-info.java │ │ └── org │ │ └── apache │ │ └── commons │ │ └── javaflow │ │ └── tools │ │ └── jar │ │ └── RewritingUtils.java │ └── shade │ └── resources │ └── simplelogger.properties ├── net.tascalate.javaflow.tools.maven ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── apache │ └── commons │ └── javaflow │ └── tools │ └── maven │ └── ContinuableClassesInstrumentationMojo.java ├── net.tascalate.javaflow.tools.runtime ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── pom.xml └── src │ └── main │ └── java │ ├── module-info.java │ └── org │ └── apache │ └── commons │ └── javaflow │ └── tools │ └── runtime │ ├── ApplicationWeaver.java │ └── ResourceTransformingClassLoader.java └── pom.xml /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | pom.xml.tag 3 | pom.xml.releaseBackup 4 | pom.xml.versionsBackup 5 | pom.xml.next 6 | release.properties 7 | dependency-reduced-pom.xml 8 | buildNumber.properties 9 | -------------------------------------------------------------------------------- /HEADER-DERRIVED.txt: -------------------------------------------------------------------------------- 1 | Original work: copyright 1999-2004 The Apache Software Foundation 2 | (http://www.apache.org/) 3 | 4 | This project is based on the work licensed to the Apache Software 5 | Foundation (ASF) under one or more contributor license agreements. 6 | See the NOTICE file distributed with this work for additional 7 | information regarding copyright ownership. 8 | 9 | Modified work: copyright 2013-2025 Valery Silaev (http://vsilaev.com) 10 | 11 | Licensed under the Apache License, Version 2.0 (the "License"); 12 | you may not use this file except in compliance with the License. 13 | You may obtain a copy of the License at 14 | 15 | http://www.apache.org/licenses/LICENSE-2.0 16 | 17 | Unless required by applicable law or agreed to in writing, software 18 | distributed under the License is distributed on an "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 20 | See the License for the specific language governing permissions and 21 | limitations under the License. 22 | -------------------------------------------------------------------------------- /HEADER-ORIGINAL.txt: -------------------------------------------------------------------------------- 1 | Copyright 2013-2025 Valery Silaev (http://vsilaev.com) 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Apache Commons Javaflow 2 | Copyright 1999-2004 The Apache Software Foundation 3 | 4 | This product includes software developed by 5 | The Apache Software Foundation (http://www.apache.org/). -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.common/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.common/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | net.tascalate.javaflow.agent.common 4 | Continuations / CoRoutines library for Java 1.5 - 1.8, incl. build tools & CDI support. 5 | This project is based on completely re-worked Apache Jakarta Commons JavaFlow library. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 6 | 7 | net.tascalate.javaflow.providers.asm5 8 | net.tascalate.javaflow.spi 9 | 10 | 11 | 12 | org.eclipse.jdt.core.javabuilder 13 | 14 | 15 | 16 | 17 | org.eclipse.m2e.core.maven2Builder 18 | 19 | 20 | 21 | 22 | 23 | org.eclipse.m2e.core.maven2Nature 24 | org.eclipse.jdt.core.javanature 25 | 26 | 27 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.common/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding//src/test/resources=UTF-8 6 | encoding/=UTF-8 7 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.common/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 5 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 6 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore 7 | org.eclipse.jdt.core.compiler.release=disabled 8 | org.eclipse.jdt.core.compiler.source=1.6 9 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.common/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.common/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | net.tascalate.javaflow 6 | net.tascalate.javaflow.parent 7 | 2.7.9 8 | ../ 9 | 10 | 11 | net.tascalate.javaflow.agent.common 12 | jar 13 | 14 | Tascalate JavaFlow / Agent / Common Instrumentation Agent Code 15 | 16 | 17 | ../HEADER-ORIGINAL.txt 18 | 19 | 20 | 21 | 22 | org.slf4j 23 | slf4j-api 24 | 25 | 26 | ${project.groupId} 27 | ${project.groupId}.spi 28 | ${project.version} 29 | 30 | 31 | junit 32 | junit 33 | test 34 | 35 | 36 | 37 | 38 | 39 | 40 | org.moditect 41 | moditect-maven-plugin 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.common/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | module net.tascalate.javaflow.agent.common { 17 | requires transitive java.instrument; 18 | 19 | requires org.slf4j; 20 | 21 | requires transitive net.tascalate.javaflow.spi; 22 | 23 | exports org.apache.commons.javaflow.agent.common; 24 | } 25 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.core/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.core/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | net.tascalate.javaflow.agent.core 4 | Continuations / CoRoutines library for Java 1.5 - 1.8, incl. build tools & CDI support. 5 | This project is based on completely re-worked Apache Jakarta Commons JavaFlow library. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 6 | 7 | net.tascalate.javaflow.providers.asm5 8 | net.tascalate.javaflow.spi 9 | 10 | 11 | 12 | org.eclipse.jdt.core.javabuilder 13 | 14 | 15 | 16 | 17 | org.eclipse.m2e.core.maven2Builder 18 | 19 | 20 | 21 | 22 | 23 | org.eclipse.m2e.core.maven2Nature 24 | org.eclipse.jdt.core.javanature 25 | 26 | 27 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.core/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding//src/test/resources=UTF-8 6 | encoding/=UTF-8 7 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.core/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.6 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 12 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 13 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 14 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 15 | org.eclipse.jdt.core.compiler.release=disabled 16 | org.eclipse.jdt.core.compiler.source=1.6 17 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.core/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.core/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | module net.tascalate.javaflow.agent.core { 17 | requires transitive java.instrument; 18 | 19 | requires net.tascalate.instrument.agent; 20 | 21 | requires net.tascalate.javaflow.agent.common; 22 | requires net.tascalate.javaflow.providers.core; 23 | 24 | exports org.apache.commons.javaflow.agent.core; 25 | } 26 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.core/src/main/java/org/apache/commons/javaflow/agent/core/ContinuableClassBytecodeTransformer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.agent.core; 17 | 18 | import org.apache.commons.javaflow.agent.common.ConfigurableClassFileTransformer; 19 | import org.apache.commons.javaflow.providers.core.ContinuableClassTransformationFactory; 20 | 21 | class ContinuableClassBytecodeTransformer extends ConfigurableClassFileTransformer { 22 | public ContinuableClassBytecodeTransformer() { 23 | super(new ContinuableClassTransformationFactory()); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.proxy/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.proxy/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | net.tascalate.javaflow.agent.proxy 4 | Continuations / CoRoutines library for Java 1.5 - 1.8, incl. build tools & CDI support. 5 | This project is based on completely re-worked Apache Jakarta Commons JavaFlow library. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 6 | 7 | net.tascalate.javaflow.providers.asm5 8 | net.tascalate.javaflow.spi 9 | 10 | 11 | 12 | org.eclipse.jdt.core.javabuilder 13 | 14 | 15 | 16 | 17 | org.eclipse.m2e.core.maven2Builder 18 | 19 | 20 | 21 | 22 | 23 | org.eclipse.m2e.core.maven2Nature 24 | org.eclipse.jdt.core.javanature 25 | 26 | 27 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.proxy/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding//src/test/resources=UTF-8 6 | encoding/=UTF-8 7 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.proxy/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.6 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 12 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 13 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 14 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 15 | org.eclipse.jdt.core.compiler.release=disabled 16 | org.eclipse.jdt.core.compiler.source=1.6 17 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.proxy/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.proxy/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | module net.tascalate.javaflow.agent.proxy { 17 | requires transitive java.instrument; 18 | 19 | requires net.tascalate.instrument.agent; 20 | 21 | requires net.tascalate.javaflow.agent.common; 22 | requires net.tascalate.javaflow.providers.proxy; 23 | 24 | exports org.apache.commons.javaflow.agent.proxy; 25 | } 26 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.agent.proxy/src/main/java/org/apache/commons/javaflow/agent/proxy/ContinuableProxyBytecodeTransformer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.agent.proxy; 17 | 18 | import org.apache.commons.javaflow.agent.common.ConfigurableClassFileTransformer; 19 | import org.apache.commons.javaflow.providers.proxy.ContinuableProxyTransformationFactory; 20 | 21 | class ContinuableProxyBytecodeTransformer extends ConfigurableClassFileTransformer { 22 | 23 | ContinuableProxyBytecodeTransformer() { 24 | super(new ContinuableProxyTransformationFactory()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api-ng/src/main/java/org/apache/commons/javaflow/core/PlatformContinuationExecutor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2025 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.core; 17 | 18 | import java.lang.management.ManagementFactory; 19 | import java.util.HashSet; 20 | import java.util.Set; 21 | 22 | final class PlatformContinuationExecutor { 23 | private PlatformContinuationExecutor() { 24 | 25 | } 26 | 27 | static ScopedContinuationExecutor current() { 28 | if (CHECK_THREAD) { 29 | Thread currentThread = Thread.currentThread(); 30 | if (currentThread instanceof ScopedContinuationExecutor) { 31 | return (ScopedContinuationExecutor)currentThread; 32 | } 33 | } 34 | return DELEGATE; 35 | } 36 | 37 | private static final boolean CHECK_THREAD = Boolean.getBoolean("net.tascalate.javaflow.check-thread"); 38 | private static final ScopedContinuationExecutor DELEGATE; 39 | 40 | static { 41 | Set args = new HashSet<>(ManagementFactory.getRuntimeMXBean().getInputArguments()); 42 | if (args.contains("--enable-preview")) { 43 | // Using ScopedValue as scoped continuation executor 44 | DELEGATE = ScopedValueContinuationExecutor.INSTANCE; 45 | } else { 46 | // Using ThreadLocal as scoped continuation executor 47 | DELEGATE = ThreadLocalContinuationExecutor.INSTANCE; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api-ng/src/main/java/org/apache/commons/javaflow/core/ScopedContinuationExecutor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2025 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.core; 17 | 18 | public interface ScopedContinuationExecutor { 19 | abstract public void runWith(StackRecorder stackRecorder, Runnable code); 20 | abstract public StackRecorder currentStackRecorder(); 21 | } 22 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api-ng/src/main/java/org/apache/commons/javaflow/core/ScopedValueContinuationExecutor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2025 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.core; 17 | 18 | final class ScopedValueContinuationExecutor implements ScopedContinuationExecutor { 19 | static final ScopedContinuationExecutor INSTANCE = new ScopedValueContinuationExecutor(); 20 | 21 | private static final ScopedValue STACK_RECORDER = ScopedValue.newInstance(); 22 | 23 | private ScopedValueContinuationExecutor() { 24 | 25 | } 26 | 27 | public final void runWith(StackRecorder stackRecorder, Runnable code) { 28 | ScopedValue.runWhere(STACK_RECORDER, stackRecorder, code); 29 | } 30 | 31 | public final StackRecorder currentStackRecorder() { 32 | return STACK_RECORDER.get(); /* STACK_RECORDER.isBound() ? STACK_RECORDER.get() : null; */ 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api-ng/src/main/java/org/apache/commons/javaflow/core/StackRecorder.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Original work: copyright 1999-2004 The Apache Software Foundation 3 | * (http://www.apache.org/) 4 | * 5 | * This project is based on the work licensed to the Apache Software 6 | * Foundation (ASF) under one or more contributor license agreements. 7 | * See the NOTICE file distributed with this work for additional 8 | * information regarding copyright ownership. 9 | * 10 | * Modified work: copyright 2013-2025 Valery Silaev (http://vsilaev.com) 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the "License"); 13 | * you may not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * http://www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an "AS IS" BASIS, 20 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | package org.apache.commons.javaflow.core; 25 | 26 | public final class StackRecorder { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api-ng/src/main/java/org/apache/commons/javaflow/core/ThreadLocalContinuationExecutor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2025 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.core; 17 | 18 | final class ThreadLocalContinuationExecutor implements ScopedContinuationExecutor { 19 | 20 | static final ScopedContinuationExecutor INSTANCE = new ThreadLocalContinuationExecutor(); 21 | 22 | public final void runWith(StackRecorder stackRecorder, Runnable code) { 23 | throw new UnsupportedOperationException(); 24 | } 25 | 26 | public final StackRecorder currentStackRecorder() { 27 | throw new UnsupportedOperationException(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | net.tascalate.javaflow.api 4 | Continuations / CoRoutines library for Java 1.5 - 1.8, incl. build tools & CDI support. 5 | This project is based on completely re-worked Apache Jakarta Commons JavaFlow library. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 6 | 7 | 8 | 9 | 10 | org.eclipse.wst.common.project.facet.core.builder 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javabuilder 16 | 17 | 18 | 19 | 20 | org.eclipse.wst.validation.validationbuilder 21 | 22 | 23 | 24 | 25 | org.eclipse.m2e.core.maven2Builder 26 | 27 | 28 | 29 | 30 | 31 | org.eclipse.m2e.core.maven2Nature 32 | org.eclipse.jdt.core.javanature 33 | org.eclipse.wst.common.project.facet.core.nature 34 | org.eclipse.wst.common.modulecore.ModuleCoreNature 35 | 36 | 37 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding//src/test/resources=UTF-8 6 | encoding/=UTF-8 7 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.6 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 12 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 13 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 14 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore 15 | org.eclipse.jdt.core.compiler.release=disabled 16 | org.eclipse.jdt.core.compiler.source=1.6 17 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/.settings/org.eclipse.wst.validation.prefs: -------------------------------------------------------------------------------- 1 | disabled=06target 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | module net.tascalate.javaflow.api { 17 | requires org.slf4j; 18 | 19 | exports org.apache.commons.javaflow.api; 20 | exports org.apache.commons.javaflow.core; 21 | } 22 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/src/main/java/org/apache/commons/javaflow/api/ContinuableAnnotation.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.api; 17 | 18 | import java.lang.annotation.Documented; 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * 26 | * Meta-annotation that is used to annotate other continuation-related 27 | * annotations. It provides an option to declare and use own annotations instead 28 | * of supplied {@link continuable} and {@link ccs} annotations, for ex: 29 | * 30 | *
31 |  * 
32 |  * import java.lang.annotation.Documented;
33 |  * import java.lang.annotation.ElementType;
34 |  * import java.lang.annotation.Retention;
35 |  * import java.lang.annotation.RetentionPolicy;
36 |  * import java.lang.annotation.Target;
37 |  * 
38 |  * {@literal @}Documented
39 |  * {@literal @}Retention(RetentionPolicy.CLASS)
40 |  * {@literal @}Target({ElementType.METHOD})
41 |  * {@literal @}ContinuableAnnotation
42 |  * public {@literal @}interface ContinuableMethod {
43 |  *   // The annotation to mark continuable methods
44 |  * }
45 |  * 
46 |  * 
47 |  * 
48 | * 49 | * @author Valery Silaev 50 | * 51 | */ 52 | @Documented 53 | @Retention(RetentionPolicy.CLASS) 54 | @Target(ElementType.ANNOTATION_TYPE) 55 | public @interface ContinuableAnnotation { 56 | 57 | } 58 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/src/main/java/org/apache/commons/javaflow/api/ccs.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.api; 17 | 18 | import java.lang.annotation.Documented; 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | @Documented 25 | @Retention(RetentionPolicy.CLASS) 26 | @Target({ElementType.LOCAL_VARIABLE, ElementType.PARAMETER, ElementType.TYPE_USE}) 27 | @ContinuableAnnotation 28 | public @interface ccs {} 29 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/src/main/java/org/apache/commons/javaflow/api/continuable.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.api; 17 | 18 | import java.lang.annotation.Documented; 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | @Documented 25 | @Retention(RetentionPolicy.CLASS) 26 | @Target({ElementType.METHOD}) 27 | @ContinuableAnnotation 28 | public @interface continuable {} 29 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/src/main/java/org/apache/commons/javaflow/core/ContinuableProxy.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.core; 17 | 18 | import java.lang.reflect.Proxy; 19 | 20 | /** 21 | * Marker interface for dynamic proxy classes like standard Java {@link Proxy} or CGLib Proxy. 22 | * Run-time instrumentation agent is capable to correctly decorate such proxies so continuable methods works correctly 23 | * 24 | * @author vsilaev 25 | * 26 | */ 27 | public interface ContinuableProxy {} 28 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/src/main/java/org/apache/commons/javaflow/core/ContinuationDeath.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.javaflow.core; 18 | 19 | /** 20 | * This exception is used to signal a control flow change that needs the 21 | * cooperation inside {@link StackRecorder}. 22 | * 23 | *

24 | * This class is only for javaflow internal code. 25 | *

26 | * 27 | * @author Kohsuke Kawaguchi 28 | */ 29 | final class ContinuationDeath extends Error { 30 | 31 | private static final long serialVersionUID = 1L; 32 | 33 | private ContinuationDeath() {} 34 | 35 | public Throwable fillInStackTrace() { 36 | return this; 37 | } 38 | 39 | final static ContinuationDeath INSTANCE = new ContinuationDeath(); 40 | } 41 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/src/main/java/org/apache/commons/javaflow/core/CustomContinuableProxy.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.core; 17 | 18 | import java.lang.reflect.Proxy; 19 | 20 | /** 21 | * Generic interface for continuable dynamic proxy classes. 22 | * Unlike standard Java {@link Proxy} or CGLib Proxy where it's possible to resolve proxy -> handler 23 | * dependency via API, custom continuable proxies should provide implementation of this interface to get 24 | * corresponding "handler" from the proxied object, in the same manner as {@link Proxy#getInvocationHandler(Object)}. 25 | * 26 | * @author vsilaev 27 | * 28 | */ 29 | public interface CustomContinuableProxy { 30 | /** 31 | * Get a real continuable invocation handler for the proxy method descrived via methodName 32 | * and methodDescription. 33 | * 34 | * @param methodName name of the continuable method that is proxied 35 | * @param methodDescription arguments/return type of the method in internal JVM format 36 | * @return the continuable handler that processed invocation 37 | */ 38 | public Object getInvocationHandler(String methodName, String methodDescription); 39 | } 40 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/src/main/java/org/apache/commons/javaflow/core/EmptyStackException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.javaflow.core; 18 | 19 | /** 20 | * @author tcurdt 21 | * 22 | */ 23 | public class EmptyStackException extends RuntimeException { 24 | 25 | private static final long serialVersionUID = 1L; 26 | 27 | public EmptyStackException(String message) { 28 | super(message); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/src/main/java/org/apache/commons/javaflow/core/PlatformContinuationExecutor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2025 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.core; 17 | 18 | final class PlatformContinuationExecutor { 19 | private PlatformContinuationExecutor() { 20 | 21 | } 22 | 23 | static ScopedContinuationExecutor current() { 24 | if (CHECK_THREAD) { 25 | Thread currentThread = Thread.currentThread(); 26 | if (currentThread instanceof ScopedContinuationExecutor) { 27 | return (ScopedContinuationExecutor)currentThread; 28 | } 29 | } 30 | return ThreadLocalContinuationExecutor.INSTANCE; 31 | } 32 | 33 | private static final boolean CHECK_THREAD = Boolean.getBoolean("net.tascalate.javaflow.check-thread"); 34 | } 35 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/src/main/java/org/apache/commons/javaflow/core/ResumeParameter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.core; 17 | 18 | public class ResumeParameter { 19 | private final Object value; 20 | 21 | private ResumeParameter(Object value) { 22 | this.value = value; 23 | } 24 | 25 | public static ResumeParameter value(Object value) { 26 | return null == value ? NULL_VALUE : new ResumeParameter(value); 27 | } 28 | 29 | public static ResumeParameter exit() { 30 | return EXIT; 31 | } 32 | 33 | final Object value() { 34 | return value; 35 | } 36 | 37 | void checkExit() { 38 | 39 | } 40 | 41 | private static final ResumeParameter NULL_VALUE = new ResumeParameter(null); 42 | 43 | private static final ResumeParameter EXIT = new ResumeParameter(null) { 44 | void checkExit() { 45 | throw ContinuationDeath.INSTANCE; 46 | } 47 | }; 48 | } 49 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/src/main/java/org/apache/commons/javaflow/core/ScopedContinuationExecutor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2025 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.core; 17 | 18 | public interface ScopedContinuationExecutor { 19 | abstract public void runWith(StackRecorder stackRecorder, Runnable code); 20 | abstract public StackRecorder currentStackRecorder(); 21 | } 22 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/src/main/java/org/apache/commons/javaflow/core/Skip.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.core; 17 | 18 | import java.lang.annotation.Documented; 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | @Documented 25 | @Retention(RetentionPolicy.RUNTIME) 26 | @Target({ElementType.TYPE}) 27 | public @interface Skip { 28 | 29 | } 30 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/src/main/java/org/apache/commons/javaflow/core/SuspendResult.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.core; 17 | 18 | public class SuspendResult { 19 | 20 | public static final SuspendResult CANCEL = new SuspendResult(); 21 | 22 | public static final SuspendResult AGAIN = new SuspendResult(); 23 | 24 | public static final SuspendResult EXIT = new SuspendResult(); 25 | 26 | private final static SuspendResult NULL_VALUE = new SuspendResult() { 27 | public Object value() { 28 | return null; 29 | } 30 | }; 31 | 32 | public Object value() { 33 | throw new UnsupportedOperationException(); 34 | } 35 | 36 | public static SuspendResult valueOf(final Object value) { 37 | return null == value ? NULL_VALUE : new SuspendResult() { 38 | public Object value() { 39 | return value; 40 | } 41 | }; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.api/src/main/java/org/apache/commons/javaflow/core/ThreadLocalContinuationExecutor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2025 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.core; 17 | 18 | final class ThreadLocalContinuationExecutor implements ScopedContinuationExecutor { 19 | 20 | static final ScopedContinuationExecutor INSTANCE = new ThreadLocalContinuationExecutor(); 21 | 22 | private static final ThreadLocal STACK_RECORDER = new ThreadLocal(); 23 | 24 | private ThreadLocalContinuationExecutor() { 25 | 26 | } 27 | 28 | public final void runWith(StackRecorder stackRecorder, Runnable code) { 29 | StackRecorder prevStackRecorder = STACK_RECORDER.get(); 30 | STACK_RECORDER.set(stackRecorder); 31 | try { 32 | code.run(); 33 | } finally { 34 | if (null == prevStackRecorder) { 35 | STACK_RECORDER.remove(); 36 | } else { 37 | STACK_RECORDER.set(prevStackRecorder); 38 | } 39 | } 40 | } 41 | 42 | public final StackRecorder currentStackRecorder() { 43 | return STACK_RECORDER.get(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | net.tascalate.javaflow.providers.asm3 4 | Continuations / CoRoutines library for Java 1.5 - 1.8, incl. build tools & CDI support. 5 | This project is based on completely re-worked Apache Jakarta Commons JavaFlow library. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 6 | 7 | net.tascalate.javaflow.spi 8 | 9 | 10 | 11 | org.eclipse.jdt.core.javabuilder 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | org.eclipse.m2e.core.maven2Nature 19 | org.eclipse.jdt.core.javanature 20 | 21 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding//src/test/resources=UTF-8 6 | encoding/=UTF-8 7 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 5 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 6 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore 7 | org.eclipse.jdt.core.compiler.release=disabled 8 | org.eclipse.jdt.core.compiler.source=1.6 9 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | net.tascalate.javaflow 6 | net.tascalate.javaflow.parent 7 | 2.7.9 8 | ../ 9 | 10 | 11 | net.tascalate.javaflow.providers.asm3 12 | jar 13 | 14 | Tascalate JavaFlow / Bytecode Enhancers / ASM3 15 | 16 | 17 | ../HEADER-DERRIVED.txt 18 | 19 | 20 | 21 | 22 | ${project.groupId} 23 | ${project.groupId}.spi 24 | ${project.version} 25 | 26 | 27 | asm 28 | asm-commons 29 | 3.3.1 30 | 31 | 32 | asm 33 | asm-analysis 34 | 3.3.1 35 | 36 | 37 | junit 38 | junit 39 | test 40 | 41 | 42 | 43 | 44 | 45 | org.apache.maven.plugins 46 | maven-jar-plugin 47 | 48 | 49 | 50 | ${project.artifactId} 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/src/main/java/org/apache/commons/javaflow/providers/asm3/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 127 4 | /repos/asf/!svn/ver/893171/commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm 5 | END 6 | MonitoringFrame.java 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 148 10 | /repos/asf/!svn/ver/733503/commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm/MonitoringFrame.java 11 | END 12 | ContinuationClassAdapter.java 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 157 16 | /repos/asf/!svn/ver/733503/commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm/ContinuationClassAdapter.java 17 | END 18 | ContinuationMethodAnalyzer.java 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 159 22 | /repos/asf/!svn/ver/893170/commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm/ContinuationMethodAnalyzer.java 23 | END 24 | AsmClassTransformer.java 25 | K 25 26 | svn:wc:ra_dav:version-url 27 | V 152 28 | /repos/asf/!svn/ver/733955/commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm/AsmClassTransformer.java 29 | END 30 | ContinuationMethodAdapter.java 31 | K 25 32 | svn:wc:ra_dav:version-url 33 | V 158 34 | /repos/asf/!svn/ver/893171/commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm/ContinuationMethodAdapter.java 35 | END 36 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/src/main/java/org/apache/commons/javaflow/providers/asm3/.svn/prop-base/AsmClassTransformer.java.svn-base: -------------------------------------------------------------------------------- 1 | K 13 2 | svn:eol-style 3 | V 6 4 | native 5 | K 12 6 | svn:keywords 7 | V 31 8 | Date Revision Author HeadURL Id 9 | K 13 10 | svn:mime-type 11 | V 10 12 | text/plain 13 | END 14 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/src/main/java/org/apache/commons/javaflow/providers/asm3/.svn/prop-base/ContinuationClassAdapter.java.svn-base: -------------------------------------------------------------------------------- 1 | K 13 2 | svn:eol-style 3 | V 6 4 | native 5 | K 12 6 | svn:keywords 7 | V 31 8 | Date Revision Author HeadURL Id 9 | K 13 10 | svn:mime-type 11 | V 10 12 | text/plain 13 | END 14 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/src/main/java/org/apache/commons/javaflow/providers/asm3/.svn/prop-base/ContinuationMethodAdapter.java.svn-base: -------------------------------------------------------------------------------- 1 | K 13 2 | svn:eol-style 3 | V 6 4 | native 5 | K 12 6 | svn:keywords 7 | V 31 8 | Date Revision Author HeadURL Id 9 | K 13 10 | svn:mime-type 11 | V 10 12 | text/plain 13 | END 14 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/src/main/java/org/apache/commons/javaflow/providers/asm3/.svn/prop-base/ContinuationMethodAnalyzer.java.svn-base: -------------------------------------------------------------------------------- 1 | K 13 2 | svn:eol-style 3 | V 6 4 | native 5 | K 12 6 | svn:keywords 7 | V 31 8 | Date Revision Author HeadURL Id 9 | K 13 10 | svn:mime-type 11 | V 10 12 | text/plain 13 | END 14 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/src/main/java/org/apache/commons/javaflow/providers/asm3/.svn/prop-base/MonitoringFrame.java.svn-base: -------------------------------------------------------------------------------- 1 | K 13 2 | svn:eol-style 3 | V 6 4 | native 5 | K 12 6 | svn:keywords 7 | V 31 8 | Date Revision Author HeadURL Id 9 | K 13 10 | svn:mime-type 11 | V 10 12 | text/plain 13 | END 14 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/src/main/java/org/apache/commons/javaflow/providers/asm3/AbstractResourceTransformationFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm3; 17 | 18 | import org.apache.commons.javaflow.spi.ResourceLoader; 19 | import org.apache.commons.javaflow.spi.ResourceTransformationFactory; 20 | 21 | public abstract class AbstractResourceTransformationFactory implements ResourceTransformationFactory { 22 | 23 | public abstract ContinuableClassInfoResolver createResolver(ResourceLoader resourceLoader); 24 | } 25 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/src/main/java/org/apache/commons/javaflow/providers/asm3/Asm3ResourceTransformationFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm3; 17 | 18 | import org.apache.commons.javaflow.spi.ResourceLoader; 19 | import org.apache.commons.javaflow.spi.ResourceTransformer; 20 | 21 | public class Asm3ResourceTransformationFactory extends PartialResourceTransformationFactory { 22 | 23 | public ResourceTransformer createTransformer(ResourceLoader resourceLoader) { 24 | SharedContinuableClassInfos sharedState = getCached(resourceLoader); 25 | return new ContinuableClassTransformer( 26 | // Actualize ClassHierarchy per resource loader 27 | sharedState.hierarchy().shareWith(resourceLoader), 28 | new IContinuableClassInfoResolver(resourceLoader, sharedState) 29 | ); 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/src/main/java/org/apache/commons/javaflow/providers/asm3/BytecodeDebugUtils.java.code: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.javaflow.bytecode.transformation.asm3; 18 | 19 | import java.io.PrintStream; 20 | import java.io.PrintWriter; 21 | 22 | import org.objectweb.asm.ClassReader; 23 | import org.objectweb.asm.ClassVisitor; 24 | import org.objectweb.asm.util.ASMifierClassVisitor; 25 | import org.objectweb.asm.util.CheckClassAdapter; 26 | import org.objectweb.asm.util.TraceClassVisitor; 27 | 28 | class BytecodeDebugUtils { 29 | 30 | private BytecodeDebugUtils() {} 31 | 32 | static ClassVisitor decorateClassVisitor(ClassVisitor visitor, final boolean check, final PrintStream dumpStream) { 33 | if (check) { 34 | visitor = new CheckClassAdapter(visitor); 35 | } 36 | 37 | if (null != dumpStream) { 38 | visitor = new TraceClassVisitor(visitor, new PrintWriter(dumpStream)); 39 | } 40 | 41 | return visitor; 42 | } 43 | 44 | static void dumpClass(final byte[] bytecode) { 45 | dumpClass(bytecode, System.err); 46 | } 47 | 48 | static void dumpClass(final byte[] bytecode, final PrintStream out) { 49 | new ClassReader(bytecode).accept(new ASMifierClassVisitor(new PrintWriter(out)), 0); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/src/main/java/org/apache/commons/javaflow/providers/asm3/ContinuableClassInfo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm3; 17 | 18 | public interface ContinuableClassInfo { 19 | boolean isContinuableMethod(int access, String name, String desc, String signature); 20 | } 21 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/src/main/java/org/apache/commons/javaflow/providers/asm3/ContinuableClassInfoResolver.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm3; 17 | 18 | import java.io.IOException; 19 | import java.util.Collection; 20 | 21 | public interface ContinuableClassInfoResolver { 22 | ContinuableClassInfo resolve(String className) throws IOException; 23 | 24 | boolean isContinuableAnnotation(String annotationClassDescriptor); 25 | 26 | void reset(Collection classNames); 27 | 28 | void release(); 29 | } 30 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/src/main/java/org/apache/commons/javaflow/providers/asm3/IContinuableClassInfo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm3; 17 | 18 | import java.util.Set; 19 | 20 | class IContinuableClassInfo implements ContinuableClassInfo { 21 | private boolean processed; 22 | private final Set methods; 23 | 24 | IContinuableClassInfo(boolean defaultProcessed, Set methods) { 25 | this.processed = defaultProcessed; 26 | this.methods = methods; 27 | } 28 | 29 | public boolean isContinuableMethod(int access, String name, String desc, String signature) { 30 | return methods.contains(name + desc); 31 | } 32 | 33 | boolean isClassProcessed() { 34 | return processed; 35 | } 36 | 37 | void markClassProcessed() { 38 | processed = true; 39 | } 40 | 41 | Set continuableMethods() { 42 | return methods; 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/src/main/java/org/apache/commons/javaflow/providers/asm3/MaybeContinuableAnnotationVisitor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm3; 17 | 18 | import org.objectweb.asm.AnnotationVisitor; 19 | import org.objectweb.asm.ClassAdapter; 20 | import org.objectweb.asm.Opcodes; 21 | 22 | class MaybeContinuableAnnotationVisitor extends ClassAdapter { 23 | private final ContinuableClassInfoResolver cciResolver; 24 | private boolean classContinuableAnnotationFound = false; 25 | private boolean isAnnotation = false; 26 | 27 | MaybeContinuableAnnotationVisitor(ContinuableClassInfoResolver cciResolver) { 28 | super(MaybeContinuableClassVisitor.NOP); 29 | this.cciResolver = cciResolver; 30 | } 31 | 32 | @Override 33 | public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { 34 | isAnnotation = (access & Opcodes.ACC_ANNOTATION) > 0; 35 | } 36 | 37 | @Override 38 | public AnnotationVisitor visitAnnotation(String description, boolean visible) { 39 | if (isAnnotation && !classContinuableAnnotationFound) { 40 | classContinuableAnnotationFound = cciResolver.isContinuableAnnotation(description); 41 | } 42 | return null; 43 | } 44 | 45 | boolean isContinuable() { 46 | return classContinuableAnnotationFound && isAnnotation; 47 | } 48 | } -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm3/src/main/java/org/apache/commons/javaflow/providers/asm3/OfflineClassWriter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm3; 17 | 18 | import org.objectweb.asm.ClassReader; 19 | import org.objectweb.asm.ClassWriter; 20 | 21 | public class OfflineClassWriter extends ClassWriter { 22 | private final ClassHierarchy classHierarchy; 23 | 24 | public OfflineClassWriter(ClassHierarchy classHierarchy, int flags) { 25 | super(flags); 26 | this.classHierarchy = classHierarchy; 27 | } 28 | 29 | public OfflineClassWriter(ClassHierarchy classHierarchy, ClassReader reader, int flags) { 30 | super(reader, flags); 31 | this.classHierarchy = classHierarchy; 32 | } 33 | 34 | @Override 35 | protected String getCommonSuperClass(final String type1, final String type2) { 36 | return classHierarchy.getCommonSuperClass(type1, type2); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | net.tascalate.javaflow.providers.asm4 4 | Continuations / CoRoutines library for Java 1.5 - 1.8, incl. build tools & CDI support. 5 | This project is based on completely re-worked Apache Jakarta Commons JavaFlow library. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 6 | 7 | net.tascalate.javaflow.spi 8 | 9 | 10 | 11 | org.eclipse.jdt.core.javabuilder 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | org.eclipse.m2e.core.maven2Nature 19 | org.eclipse.jdt.core.javanature 20 | 21 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding//src/test/resources=UTF-8 6 | encoding/=UTF-8 7 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 5 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 6 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore 7 | org.eclipse.jdt.core.compiler.release=disabled 8 | org.eclipse.jdt.core.compiler.source=1.6 9 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | net.tascalate.javaflow 6 | net.tascalate.javaflow.parent 7 | 2.7.9 8 | ../ 9 | 10 | 11 | net.tascalate.javaflow.providers.asm4 12 | jar 13 | 14 | Tascalate JavaFlow / Bytecode Enhancers / ASM4 15 | 16 | 17 | ../HEADER-DERRIVED.txt 18 | 19 | 20 | 21 | 22 | ${project.groupId} 23 | ${project.groupId}.spi 24 | ${project.version} 25 | 26 | 27 | org.ow2.asm 28 | asm 29 | 4.2 30 | 31 | 32 | org.ow2.asm 33 | asm-analysis 34 | 4.2 35 | 36 | 37 | junit 38 | junit 39 | test 40 | 41 | 42 | 43 | 44 | 45 | org.apache.maven.plugins 46 | maven-jar-plugin 47 | 48 | 49 | 50 | ${project.artifactId} 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/src/main/java/org/apache/commons/javaflow/providers/asm4/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 127 4 | /repos/asf/!svn/ver/893171/commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm 5 | END 6 | MonitoringFrame.java 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 148 10 | /repos/asf/!svn/ver/733503/commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm/MonitoringFrame.java 11 | END 12 | ContinuationClassAdapter.java 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 157 16 | /repos/asf/!svn/ver/733503/commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm/ContinuationClassAdapter.java 17 | END 18 | ContinuationMethodAnalyzer.java 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 159 22 | /repos/asf/!svn/ver/893170/commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm/ContinuationMethodAnalyzer.java 23 | END 24 | AsmClassTransformer.java 25 | K 25 26 | svn:wc:ra_dav:version-url 27 | V 152 28 | /repos/asf/!svn/ver/733955/commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm/AsmClassTransformer.java 29 | END 30 | ContinuationMethodAdapter.java 31 | K 25 32 | svn:wc:ra_dav:version-url 33 | V 158 34 | /repos/asf/!svn/ver/893171/commons/sandbox/javaflow/trunk/src/main/java/org/apache/commons/javaflow/bytecode/transformation/asm/ContinuationMethodAdapter.java 35 | END 36 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/src/main/java/org/apache/commons/javaflow/providers/asm4/.svn/prop-base/AsmClassTransformer.java.svn-base: -------------------------------------------------------------------------------- 1 | K 13 2 | svn:eol-style 3 | V 6 4 | native 5 | K 12 6 | svn:keywords 7 | V 31 8 | Date Revision Author HeadURL Id 9 | K 13 10 | svn:mime-type 11 | V 10 12 | text/plain 13 | END 14 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/src/main/java/org/apache/commons/javaflow/providers/asm4/.svn/prop-base/ContinuationClassAdapter.java.svn-base: -------------------------------------------------------------------------------- 1 | K 13 2 | svn:eol-style 3 | V 6 4 | native 5 | K 12 6 | svn:keywords 7 | V 31 8 | Date Revision Author HeadURL Id 9 | K 13 10 | svn:mime-type 11 | V 10 12 | text/plain 13 | END 14 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/src/main/java/org/apache/commons/javaflow/providers/asm4/.svn/prop-base/ContinuationMethodAdapter.java.svn-base: -------------------------------------------------------------------------------- 1 | K 13 2 | svn:eol-style 3 | V 6 4 | native 5 | K 12 6 | svn:keywords 7 | V 31 8 | Date Revision Author HeadURL Id 9 | K 13 10 | svn:mime-type 11 | V 10 12 | text/plain 13 | END 14 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/src/main/java/org/apache/commons/javaflow/providers/asm4/.svn/prop-base/ContinuationMethodAnalyzer.java.svn-base: -------------------------------------------------------------------------------- 1 | K 13 2 | svn:eol-style 3 | V 6 4 | native 5 | K 12 6 | svn:keywords 7 | V 31 8 | Date Revision Author HeadURL Id 9 | K 13 10 | svn:mime-type 11 | V 10 12 | text/plain 13 | END 14 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/src/main/java/org/apache/commons/javaflow/providers/asm4/.svn/prop-base/MonitoringFrame.java.svn-base: -------------------------------------------------------------------------------- 1 | K 13 2 | svn:eol-style 3 | V 6 4 | native 5 | K 12 6 | svn:keywords 7 | V 31 8 | Date Revision Author HeadURL Id 9 | K 13 10 | svn:mime-type 11 | V 10 12 | text/plain 13 | END 14 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/src/main/java/org/apache/commons/javaflow/providers/asm4/AbstractResourceTransformationFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm4; 17 | 18 | import org.apache.commons.javaflow.spi.ResourceLoader; 19 | import org.apache.commons.javaflow.spi.ResourceTransformationFactory; 20 | 21 | public abstract class AbstractResourceTransformationFactory implements ResourceTransformationFactory { 22 | 23 | public abstract ContinuableClassInfoResolver createResolver(ResourceLoader resourceLoader); 24 | } 25 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/src/main/java/org/apache/commons/javaflow/providers/asm4/Asm4ResourceTransformationFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm4; 17 | 18 | import org.apache.commons.javaflow.spi.ResourceLoader; 19 | import org.apache.commons.javaflow.spi.ResourceTransformer; 20 | 21 | public class Asm4ResourceTransformationFactory extends PartialResourceTransformationFactory { 22 | 23 | public ResourceTransformer createTransformer(ResourceLoader resourceLoader) { 24 | SharedContinuableClassInfos sharedState = getCached(resourceLoader); 25 | return new ContinuableClassTransformer( 26 | // Actualize ClassHierarchy per resource loader 27 | sharedState.hierarchy().shareWith(resourceLoader), 28 | new IContinuableClassInfoResolver(resourceLoader, sharedState) 29 | ); 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/src/main/java/org/apache/commons/javaflow/providers/asm4/AsmVersion.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm4; 17 | 18 | import org.objectweb.asm.Opcodes; 19 | 20 | final class AsmVersion { 21 | private AsmVersion() {} 22 | 23 | static final int CURRENT = Opcodes.ASM4; 24 | } 25 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/src/main/java/org/apache/commons/javaflow/providers/asm4/ContinuableClassInfo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm4; 17 | 18 | public interface ContinuableClassInfo { 19 | boolean isContinuableMethod(int access, String name, String desc, String signature); 20 | } 21 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/src/main/java/org/apache/commons/javaflow/providers/asm4/ContinuableClassInfoResolver.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm4; 17 | 18 | import java.io.IOException; 19 | import java.util.Collection; 20 | 21 | public interface ContinuableClassInfoResolver { 22 | ContinuableClassInfo resolve(String className) throws IOException; 23 | 24 | boolean isContinuableAnnotation(String annotationClassDescriptor); 25 | 26 | void reset(Collection classNames); 27 | 28 | void release(); 29 | } 30 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/src/main/java/org/apache/commons/javaflow/providers/asm4/IContinuableClassInfo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm4; 17 | 18 | import java.util.Set; 19 | 20 | class IContinuableClassInfo implements ContinuableClassInfo { 21 | private boolean processed; 22 | private final Set methods; 23 | 24 | IContinuableClassInfo(boolean defaultProcessed, Set methods) { 25 | this.processed = defaultProcessed; 26 | this.methods = methods; 27 | } 28 | 29 | public boolean isContinuableMethod(int access, String name, String desc, String signature) { 30 | return methods.contains(name + desc); 31 | } 32 | 33 | boolean isClassProcessed() { 34 | return processed; 35 | } 36 | 37 | void markClassProcessed() { 38 | processed = true; 39 | } 40 | 41 | Set continuableMethods() { 42 | return methods; 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/src/main/java/org/apache/commons/javaflow/providers/asm4/MaybeContinuableAnnotationVisitor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm4; 17 | 18 | import org.objectweb.asm.AnnotationVisitor; 19 | import org.objectweb.asm.ClassVisitor; 20 | import org.objectweb.asm.Opcodes; 21 | 22 | class MaybeContinuableAnnotationVisitor extends ClassVisitor { 23 | private final ContinuableClassInfoResolver cciResolver; 24 | private boolean classContinuableAnnotationFound = false; 25 | private boolean isAnnotation = false; 26 | 27 | MaybeContinuableAnnotationVisitor(int api, ContinuableClassInfoResolver cciResolver) { 28 | super(api); 29 | this.cciResolver = cciResolver; 30 | } 31 | 32 | @Override 33 | public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { 34 | isAnnotation = (access & Opcodes.ACC_ANNOTATION) > 0; 35 | } 36 | 37 | @Override 38 | public AnnotationVisitor visitAnnotation(String description, boolean visible) { 39 | if (isAnnotation && !classContinuableAnnotationFound) { 40 | classContinuableAnnotationFound = cciResolver.isContinuableAnnotation(description); 41 | } 42 | return null; 43 | } 44 | 45 | boolean isContinuable() { 46 | return classContinuableAnnotationFound && isAnnotation; 47 | } 48 | } -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm4/src/main/java/org/apache/commons/javaflow/providers/asm4/OfflineClassWriter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm4; 17 | 18 | import org.objectweb.asm.ClassReader; 19 | import org.objectweb.asm.ClassWriter; 20 | 21 | public class OfflineClassWriter extends ClassWriter { 22 | private final ClassHierarchy classHierarchy; 23 | 24 | public OfflineClassWriter(ClassHierarchy classHierarchy, int flags) { 25 | super(flags); 26 | this.classHierarchy = classHierarchy; 27 | } 28 | 29 | public OfflineClassWriter(ClassHierarchy classHierarchy, ClassReader reader, int flags) { 30 | super(reader, flags); 31 | this.classHierarchy = classHierarchy; 32 | } 33 | 34 | @Override 35 | protected String getCommonSuperClass(final String type1, final String type2) { 36 | return classHierarchy.getCommonSuperClass(type1, type2); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm5/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm5/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | net.tascalate.javaflow.providers.asm5 4 | Continuations / CoRoutines library for Java 1.5 - 1.8, incl. build tools & CDI support. 5 | This project is based on completely re-worked Apache Jakarta Commons JavaFlow library. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 6 | 7 | net.tascalate.javaflow.spi 8 | 9 | 10 | 11 | org.eclipse.jdt.core.javabuilder 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | org.eclipse.m2e.core.maven2Nature 19 | org.eclipse.jdt.core.javanature 20 | 21 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm5/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding//src/test/resources=UTF-8 6 | encoding/=UTF-8 7 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm5/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm5/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | net.tascalate.javaflow 6 | net.tascalate.javaflow.parent 7 | 2.7.9 8 | ../ 9 | 10 | 11 | net.tascalate.javaflow.providers.asm5 12 | jar 13 | 14 | Tascalate JavaFlow / Bytecode Enhancers / ASM5 15 | 16 | 17 | ../HEADER-DERRIVED.txt 18 | 19 | 20 | 21 | 22 | ${project.groupId} 23 | ${project.groupId}.spi 24 | ${project.version} 25 | 26 | 27 | org.ow2.asm 28 | asm 29 | 5.2 30 | 31 | 32 | org.ow2.asm 33 | asm-analysis 34 | 5.2 35 | 36 | 37 | junit 38 | junit 39 | test 40 | 41 | 42 | 43 | 44 | 45 | org.apache.maven.plugins 46 | maven-jar-plugin 47 | 48 | 49 | 50 | ${project.artifactId} 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm5/src/main/java/org/apache/commons/javaflow/providers/asm5/AbstractResourceTransformationFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm5; 17 | 18 | import org.apache.commons.javaflow.spi.ResourceLoader; 19 | import org.apache.commons.javaflow.spi.ResourceTransformationFactory; 20 | 21 | public abstract class AbstractResourceTransformationFactory implements ResourceTransformationFactory { 22 | 23 | public abstract ContinuableClassInfoResolver createResolver(ResourceLoader resourceLoader); 24 | } 25 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm5/src/main/java/org/apache/commons/javaflow/providers/asm5/Asm5ResourceTransformationFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm5; 17 | 18 | import org.apache.commons.javaflow.spi.ResourceLoader; 19 | import org.apache.commons.javaflow.spi.ResourceTransformer; 20 | 21 | public class Asm5ResourceTransformationFactory extends PartialResourceTransformationFactory { 22 | 23 | public ResourceTransformer createTransformer(ResourceLoader resourceLoader) { 24 | SharedContinuableClassInfos sharedState = getCached(resourceLoader); 25 | return new ContinuableClassTransformer( 26 | // Actualize ClassHierarchy per resource loader 27 | sharedState.hierarchy().shareWith(resourceLoader), 28 | new IContinuableClassInfoResolver(resourceLoader, sharedState) 29 | ); 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm5/src/main/java/org/apache/commons/javaflow/providers/asm5/AsmVersion.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm5; 17 | 18 | import org.objectweb.asm.Opcodes; 19 | 20 | final class AsmVersion { 21 | private AsmVersion() {} 22 | 23 | static final int CURRENT = Opcodes.ASM5; 24 | } 25 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm5/src/main/java/org/apache/commons/javaflow/providers/asm5/ContinuableClassInfo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm5; 17 | 18 | public interface ContinuableClassInfo { 19 | boolean isContinuableMethod(int access, String name, String desc, String signature); 20 | } 21 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm5/src/main/java/org/apache/commons/javaflow/providers/asm5/ContinuableClassInfoResolver.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm5; 17 | 18 | import java.io.IOException; 19 | import java.util.Collection; 20 | 21 | public interface ContinuableClassInfoResolver { 22 | ContinuableClassInfo resolve(String className) throws IOException; 23 | 24 | boolean isContinuableAnnotation(String annotationClassDescriptor); 25 | 26 | void reset(Collection classNames); 27 | 28 | void release(); 29 | } 30 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm5/src/main/java/org/apache/commons/javaflow/providers/asm5/IContinuableClassInfo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm5; 17 | 18 | import java.util.Set; 19 | 20 | class IContinuableClassInfo implements ContinuableClassInfo { 21 | private boolean processed; 22 | private final Set methods; 23 | 24 | IContinuableClassInfo(boolean defaultProcessed, Set methods) { 25 | this.processed = defaultProcessed; 26 | this.methods = methods; 27 | } 28 | 29 | public boolean isContinuableMethod(int access, String name, String desc, String signature) { 30 | return methods.contains(name + desc); 31 | } 32 | 33 | boolean isClassProcessed() { 34 | return processed; 35 | } 36 | 37 | void markClassProcessed() { 38 | processed = true; 39 | } 40 | 41 | Set continuableMethods() { 42 | return methods; 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm5/src/main/java/org/apache/commons/javaflow/providers/asm5/MaybeContinuableAnnotationVisitor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm5; 17 | 18 | import org.objectweb.asm.AnnotationVisitor; 19 | import org.objectweb.asm.ClassVisitor; 20 | import org.objectweb.asm.Opcodes; 21 | 22 | class MaybeContinuableAnnotationVisitor extends ClassVisitor { 23 | private final ContinuableClassInfoResolver cciResolver; 24 | private boolean classContinuableAnnotationFound = false; 25 | private boolean isAnnotation = false; 26 | 27 | MaybeContinuableAnnotationVisitor(int api, ContinuableClassInfoResolver cciResolver) { 28 | super(api); 29 | this.cciResolver = cciResolver; 30 | } 31 | 32 | @Override 33 | public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { 34 | isAnnotation = (access & Opcodes.ACC_ANNOTATION) > 0; 35 | } 36 | 37 | @Override 38 | public AnnotationVisitor visitAnnotation(String description, boolean visible) { 39 | if (isAnnotation && !classContinuableAnnotationFound) { 40 | classContinuableAnnotationFound = cciResolver.isContinuableAnnotation(description); 41 | } 42 | return null; 43 | } 44 | 45 | boolean isContinuable() { 46 | return classContinuableAnnotationFound && isAnnotation; 47 | } 48 | } -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asm5/src/main/java/org/apache/commons/javaflow/providers/asm5/OfflineClassWriter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asm5; 17 | 18 | import org.objectweb.asm.ClassReader; 19 | import org.objectweb.asm.ClassWriter; 20 | 21 | public class OfflineClassWriter extends ClassWriter { 22 | private final ClassHierarchy classHierarchy; 23 | 24 | public OfflineClassWriter(ClassHierarchy classHierarchy, int flags) { 25 | super(flags); 26 | this.classHierarchy = classHierarchy; 27 | } 28 | 29 | public OfflineClassWriter(ClassHierarchy classHierarchy, ClassReader reader, int flags) { 30 | super(reader, flags); 31 | this.classHierarchy = classHierarchy; 32 | } 33 | 34 | @Override 35 | protected String getCommonSuperClass(final String type1, final String type2) { 36 | return classHierarchy.getCommonSuperClass(type1, type2); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asmx/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asmx/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | net.tascalate.javaflow.providers.asmx 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asmx/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/resources=UTF-8 5 | encoding/=UTF-8 6 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asmx/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asmx/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | net.tascalate.javaflow 6 | net.tascalate.javaflow.parent 7 | 2.7.9 8 | ../ 9 | 10 | 11 | net.tascalate.javaflow.providers.asmx 12 | jar 13 | 14 | Tascalate JavaFlow / Bytecode Enhancers / ASM-X 15 | 16 | 17 | ../HEADER-DERRIVED.txt 18 | 19 | 20 | 21 | 22 | ${project.groupId} 23 | ${project.groupId}.spi 24 | ${project.version} 25 | 26 | 27 | net.tascalate 28 | net.tascalate.asmx.plus 29 | ${tascalate.asmx.version} 30 | 31 | 32 | net.tascalate 33 | net.tascalate.asmx.analysis 34 | ${tascalate.asmx.version} 35 | 36 | 37 | junit 38 | junit 39 | test 40 | 41 | 42 | 43 | 44 | 45 | 46 | org.apache.maven.plugins 47 | maven-compiler-plugin 48 | 49 | 50 | org.moditect 51 | moditect-maven-plugin 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asmx/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | module net.tascalate.javaflow.providers.asmx { 17 | requires net.tascalate.asmx; 18 | requires net.tascalate.asmx.plus; 19 | requires net.tascalate.asmx.tree; 20 | requires net.tascalate.asmx.tree.analysis; 21 | 22 | requires transitive net.tascalate.javaflow.spi; 23 | 24 | exports org.apache.commons.javaflow.providers.asmx; 25 | } 26 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asmx/src/main/java/org/apache/commons/javaflow/providers/asmx/AbstractResourceTransformationFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asmx; 17 | 18 | import org.apache.commons.javaflow.spi.ResourceLoader; 19 | import org.apache.commons.javaflow.spi.ResourceTransformationFactory; 20 | 21 | public abstract class AbstractResourceTransformationFactory implements ResourceTransformationFactory { 22 | 23 | public abstract ContinuableClassInfoResolver createResolver(ResourceLoader resourceLoader); 24 | } 25 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asmx/src/main/java/org/apache/commons/javaflow/providers/asmx/AsmxResourceLoader.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asmx; 17 | 18 | import java.io.IOException; 19 | import java.io.InputStream; 20 | 21 | import org.apache.commons.javaflow.spi.ResourceLoader; 22 | 23 | class AsmxResourceLoader implements net.tascalate.asmx.plus.ResourceLoader { 24 | 25 | final ResourceLoader resourceLoader; 26 | 27 | AsmxResourceLoader(ResourceLoader resourceLoader) { 28 | this.resourceLoader = resourceLoader; 29 | } 30 | 31 | @Override 32 | public boolean hasResource(String name) { 33 | return resourceLoader.hasResource(name); 34 | } 35 | 36 | @Override 37 | public InputStream getResourceAsStream(String name) throws IOException { 38 | return resourceLoader.getResourceAsStream(name); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asmx/src/main/java/org/apache/commons/javaflow/providers/asmx/AsmxResourceTransformationFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asmx; 17 | 18 | import org.apache.commons.javaflow.spi.ResourceLoader; 19 | import org.apache.commons.javaflow.spi.ResourceTransformer; 20 | 21 | public class AsmxResourceTransformationFactory extends PartialResourceTransformationFactory { 22 | 23 | public ResourceTransformer createTransformer(ResourceLoader resourceLoader) { 24 | SharedContinuableClassInfos sharedState = getCached(resourceLoader); 25 | return new ContinuableClassTransformer( 26 | // Actualize ClassHierarchy per resource loader 27 | shareHierarchy(sharedState.hierarchy(), resourceLoader), 28 | new IContinuableClassInfoResolver(resourceLoader, sharedState) 29 | ); 30 | } 31 | 32 | 33 | 34 | } -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asmx/src/main/java/org/apache/commons/javaflow/providers/asmx/ContinuableClassInfo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asmx; 17 | 18 | public interface ContinuableClassInfo { 19 | boolean isContinuableMethod(int access, String name, String desc, String signature); 20 | } 21 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asmx/src/main/java/org/apache/commons/javaflow/providers/asmx/ContinuableClassInfoResolver.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asmx; 17 | 18 | import java.io.IOException; 19 | import java.util.Collection; 20 | 21 | public interface ContinuableClassInfoResolver { 22 | ContinuableClassInfo resolve(String className) throws IOException; 23 | 24 | boolean isContinuableAnnotation(String annotationClassDescriptor); 25 | 26 | void reset(Collection classNames); 27 | 28 | void release(); 29 | } 30 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asmx/src/main/java/org/apache/commons/javaflow/providers/asmx/IContinuableClassInfo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asmx; 17 | 18 | import java.util.Set; 19 | 20 | class IContinuableClassInfo implements ContinuableClassInfo { 21 | private boolean processed; 22 | private final Set methods; 23 | 24 | IContinuableClassInfo(boolean defaultProcessed, Set methods) { 25 | this.processed = defaultProcessed; 26 | this.methods = methods; 27 | } 28 | 29 | public boolean isContinuableMethod(int access, String name, String desc, String signature) { 30 | return methods.contains(name + desc); 31 | } 32 | 33 | boolean isClassProcessed() { 34 | return processed; 35 | } 36 | 37 | void markClassProcessed() { 38 | processed = true; 39 | } 40 | 41 | Set continuableMethods() { 42 | return methods; 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.asmx/src/main/java/org/apache/commons/javaflow/providers/asmx/MaybeContinuableAnnotationVisitor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.asmx; 17 | 18 | import net.tascalate.asmx.AnnotationVisitor; 19 | import net.tascalate.asmx.ClassVisitor; 20 | import net.tascalate.asmx.Opcodes; 21 | 22 | class MaybeContinuableAnnotationVisitor extends ClassVisitor { 23 | private final ContinuableClassInfoResolver cciResolver; 24 | private boolean classContinuableAnnotationFound = false; 25 | private boolean isAnnotation = false; 26 | 27 | MaybeContinuableAnnotationVisitor(int api, ContinuableClassInfoResolver cciResolver) { 28 | super(api); 29 | this.cciResolver = cciResolver; 30 | } 31 | 32 | @Override 33 | public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { 34 | isAnnotation = (access & Opcodes.ACC_ANNOTATION) > 0; 35 | } 36 | 37 | @Override 38 | public AnnotationVisitor visitAnnotation(String description, boolean visible) { 39 | if (isAnnotation && !classContinuableAnnotationFound) { 40 | classContinuableAnnotationFound = cciResolver.isContinuableAnnotation(description); 41 | } 42 | return null; 43 | } 44 | 45 | boolean isContinuable() { 46 | return classContinuableAnnotationFound && isAnnotation; 47 | } 48 | } -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.core/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.core/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | net.tascalate.javaflow.providers.core 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.core/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding//src/test/resources=UTF-8 6 | encoding/=UTF-8 7 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.core/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.core/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | net.tascalate.javaflow 6 | net.tascalate.javaflow.parent 7 | 2.7.9 8 | ../ 9 | 10 | 11 | net.tascalate.javaflow.providers.core 12 | jar 13 | 14 | Tascalate JavaFlow / Bytecode Enhancers / Continuable Classes 15 | 16 | 17 | ../HEADER-DERRIVED.txt 18 | 19 | 20 | 21 | 22 | ${project.groupId} 23 | ${project.groupId}.spi 24 | ${project.version} 25 | 26 | 27 | net.tascalate 28 | net.tascalate.asmx.plus 29 | ${tascalate.asmx.version} 30 | 31 | 32 | net.tascalate 33 | net.tascalate.asmx.analysis 34 | ${tascalate.asmx.version} 35 | 36 | 37 | junit 38 | junit 39 | test 40 | 41 | 42 | 43 | 44 | 45 | 46 | org.apache.maven.plugins 47 | maven-compiler-plugin 48 | 49 | 50 | org.moditect 51 | moditect-maven-plugin 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.core/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | module net.tascalate.javaflow.providers.core { 17 | requires net.tascalate.asmx; 18 | requires net.tascalate.asmx.plus; 19 | requires net.tascalate.asmx.tree; 20 | requires net.tascalate.asmx.tree.analysis; 21 | 22 | requires transitive net.tascalate.javaflow.spi; 23 | 24 | exports org.apache.commons.javaflow.providers.core; 25 | } 26 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.core/src/main/java/org/apache/commons/javaflow/providers/core/AbstractResourceTransformationFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.core; 17 | 18 | import org.apache.commons.javaflow.spi.ResourceLoader; 19 | import org.apache.commons.javaflow.spi.ResourceTransformationFactory; 20 | 21 | public abstract class AbstractResourceTransformationFactory implements ResourceTransformationFactory { 22 | 23 | public abstract ContinuableClassInfoResolver createResolver(ResourceLoader resourceLoader); 24 | } 25 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.core/src/main/java/org/apache/commons/javaflow/providers/core/AsmxResourceLoader.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.core; 17 | 18 | import java.io.IOException; 19 | import java.io.InputStream; 20 | 21 | import org.apache.commons.javaflow.spi.ResourceLoader; 22 | 23 | class AsmxResourceLoader implements net.tascalate.asmx.plus.ResourceLoader { 24 | 25 | final ResourceLoader resourceLoader; 26 | 27 | AsmxResourceLoader(ResourceLoader resourceLoader) { 28 | this.resourceLoader = resourceLoader; 29 | } 30 | 31 | @Override 32 | public boolean hasResource(String name) { 33 | return resourceLoader.hasResource(name); 34 | } 35 | 36 | @Override 37 | public InputStream getResourceAsStream(String name) throws IOException { 38 | return resourceLoader.getResourceAsStream(name); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.core/src/main/java/org/apache/commons/javaflow/providers/core/ContinuableClassInfo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.core; 17 | 18 | public interface ContinuableClassInfo { 19 | boolean isContinuableMethod(int access, String name, String desc, String signature); 20 | } 21 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.core/src/main/java/org/apache/commons/javaflow/providers/core/ContinuableClassInfoResolver.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.core; 17 | 18 | import java.io.IOException; 19 | import java.util.Collection; 20 | 21 | public interface ContinuableClassInfoResolver { 22 | ContinuableClassInfo resolve(String className) throws IOException; 23 | 24 | boolean isContinuableAnnotation(String annotationClassDescriptor); 25 | 26 | void reset(Collection classNames); 27 | 28 | void release(); 29 | } 30 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.core/src/main/java/org/apache/commons/javaflow/providers/core/ContinuableClassTransformationFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.core; 17 | 18 | import org.apache.commons.javaflow.spi.ResourceLoader; 19 | import org.apache.commons.javaflow.spi.ResourceTransformer; 20 | 21 | public class ContinuableClassTransformationFactory extends PartialResourceTransformationFactory { 22 | 23 | public ResourceTransformer createTransformer(ResourceLoader resourceLoader) { 24 | SharedContinuableClassInfos sharedState = getCached(resourceLoader); 25 | return new ContinuableClassTransformer( 26 | // Actualize ClassHierarchy per resource loader 27 | shareHierarchy(sharedState.hierarchy(), resourceLoader), 28 | new IContinuableClassInfoResolver(resourceLoader, sharedState) 29 | ); 30 | } 31 | 32 | 33 | 34 | } -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.core/src/main/java/org/apache/commons/javaflow/providers/core/IContinuableClassInfo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.core; 17 | 18 | import java.util.Set; 19 | 20 | class IContinuableClassInfo implements ContinuableClassInfo { 21 | private boolean processed; 22 | private final Set methods; 23 | 24 | IContinuableClassInfo(boolean defaultProcessed, Set methods) { 25 | this.processed = defaultProcessed; 26 | this.methods = methods; 27 | } 28 | 29 | public boolean isContinuableMethod(int access, String name, String desc, String signature) { 30 | return methods.contains(name + desc); 31 | } 32 | 33 | boolean isClassProcessed() { 34 | return processed; 35 | } 36 | 37 | void markClassProcessed() { 38 | processed = true; 39 | } 40 | 41 | Set continuableMethods() { 42 | return methods; 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.core/src/main/java/org/apache/commons/javaflow/providers/core/MaybeContinuableAnnotationVisitor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.core; 17 | 18 | import net.tascalate.asmx.AnnotationVisitor; 19 | import net.tascalate.asmx.ClassVisitor; 20 | import net.tascalate.asmx.Opcodes; 21 | 22 | class MaybeContinuableAnnotationVisitor extends ClassVisitor { 23 | private final ContinuableClassInfoResolver cciResolver; 24 | private boolean classContinuableAnnotationFound = false; 25 | private boolean isAnnotation = false; 26 | 27 | MaybeContinuableAnnotationVisitor(int api, ContinuableClassInfoResolver cciResolver) { 28 | super(api); 29 | this.cciResolver = cciResolver; 30 | } 31 | 32 | @Override 33 | public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { 34 | isAnnotation = (access & Opcodes.ACC_ANNOTATION) > 0; 35 | } 36 | 37 | @Override 38 | public AnnotationVisitor visitAnnotation(String description, boolean visible) { 39 | if (isAnnotation && !classContinuableAnnotationFound) { 40 | classContinuableAnnotationFound = cciResolver.isContinuableAnnotation(description); 41 | } 42 | return null; 43 | } 44 | 45 | boolean isContinuable() { 46 | return classContinuableAnnotationFound && isAnnotation; 47 | } 48 | } -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.proxy/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.proxy/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | net.tascalate.javaflow.providers.proxy 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.proxy/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding//src/test/resources=UTF-8 6 | encoding/=UTF-8 7 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.proxy/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.proxy/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | net.tascalate.javaflow 6 | net.tascalate.javaflow.parent 7 | 2.7.9 8 | ../ 9 | 10 | 11 | net.tascalate.javaflow.providers.proxy 12 | jar 13 | 14 | Tascalate JavaFlow / Bytecode Enhancers / Continuable Proxies 15 | 16 | 17 | ../HEADER-DERRIVED.txt 18 | 19 | 20 | 21 | 22 | org.slf4j 23 | slf4j-api 24 | 25 | 26 | ${project.groupId} 27 | ${project.groupId}.spi 28 | ${project.version} 29 | 30 | 31 | ${project.groupId} 32 | ${project.groupId}.providers.core 33 | ${project.version} 34 | 35 | 36 | net.tascalate 37 | net.tascalate.asmx.commons 38 | ${tascalate.asmx.version} 39 | 40 | 41 | junit 42 | junit 43 | test 44 | 45 | 46 | 47 | 48 | 49 | 50 | org.apache.maven.plugins 51 | maven-compiler-plugin 52 | 53 | 54 | org.moditect 55 | moditect-maven-plugin 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.proxy/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | module net.tascalate.javaflow.providers.proxy { 17 | requires org.slf4j; 18 | 19 | requires net.tascalate.asmx; 20 | requires net.tascalate.asmx.plus; 21 | requires net.tascalate.asmx.commons; 22 | 23 | requires transitive net.tascalate.javaflow.providers.core; 24 | 25 | exports org.apache.commons.javaflow.providers.proxy; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.proxy/src/main/java/org/apache/commons/javaflow/providers/proxy/ExtendedClassVisitor.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.proxy; 17 | 18 | import net.tascalate.asmx.ClassVisitor; 19 | import net.tascalate.asmx.FieldVisitor; 20 | import net.tascalate.asmx.MethodVisitor; 21 | 22 | public abstract class ExtendedClassVisitor extends ClassVisitor { 23 | 24 | ExtendedClassVisitor(int api, ClassVisitor delegate) { 25 | super(api, delegate); 26 | } 27 | 28 | @SuppressWarnings("all") //"exports" in Java 9 29 | public final FieldVisitor defaultVisitField(int access, String name, String descriptor, String signature, Object value) { 30 | return super.visitField(access, name, descriptor, signature, value); 31 | } 32 | 33 | @SuppressWarnings("all") //"exports" in Java 9 34 | public final MethodVisitor defaultVisitMethod(int access, String name, String descriptor, String signature, String[] exceptions) { 35 | return super.visitMethod(access, name, descriptor, signature, exceptions); 36 | } 37 | 38 | public final void defaultVisitEnd() { 39 | super.visitEnd(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.proxy/src/main/java/org/apache/commons/javaflow/providers/proxy/owb/OwbInterceptorProxyMethodAdvice.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.proxy.owb; 17 | 18 | import org.apache.commons.javaflow.providers.proxy.common.ProxiedMethodAdvice; 19 | 20 | import net.tascalate.asmx.MethodVisitor; 21 | import net.tascalate.asmx.Type; 22 | 23 | class OwbInterceptorProxyMethodAdvice extends ProxiedMethodAdvice { 24 | 25 | final private Type proxiedInstanceType; 26 | 27 | OwbInterceptorProxyMethodAdvice(int api, MethodVisitor mv, int acc, String className, String methodName, String desc, Type proxiedInstanceType) { 28 | super(api, mv, acc, className, methodName, desc); 29 | this.proxiedInstanceType = proxiedInstanceType; 30 | } 31 | 32 | @Override 33 | protected void loadProxiedInstance() { 34 | loadThis(); 35 | getField(Type.getObjectType(className), FIELD_PROXIED_INSTANCE, proxiedInstanceType); 36 | } 37 | 38 | static final String FIELD_PROXIED_INSTANCE = "owbIntDecProxiedInstance"; //InterceptorDecoratorProxyFactory.FIELD_PROXIED_INSTANCE; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.providers.proxy/src/main/java/org/apache/commons/javaflow/providers/proxy/owb/OwbScopeProxyMethodAdvice.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.providers.proxy.owb; 17 | 18 | import org.apache.commons.javaflow.providers.proxy.common.ProxiedMethodAdvice; 19 | 20 | import net.tascalate.asmx.MethodVisitor; 21 | import net.tascalate.asmx.Type; 22 | import net.tascalate.asmx.commons.Method; 23 | 24 | class OwbScopeProxyMethodAdvice extends ProxiedMethodAdvice { 25 | 26 | final private Type proxiedInstanceProviderType; 27 | 28 | public OwbScopeProxyMethodAdvice(int api, MethodVisitor mv, int acc, String className, String methodName, String desc, Type proxiedInstanceProviderType) { 29 | super(api, mv, acc, className, methodName, desc); 30 | this.proxiedInstanceProviderType = proxiedInstanceProviderType; 31 | } 32 | 33 | @Override 34 | protected void loadProxiedInstance() { 35 | loadThis(); 36 | getField(Type.getObjectType(className), FIELD_INSTANCE_PROVIDER, proxiedInstanceProviderType); 37 | invokeInterface(PROVIDER, PROVIDER_GET); 38 | } 39 | 40 | private static final Type PROVIDER = Type.getObjectType("javax/inject/Provider"); 41 | private static final Method PROVIDER_GET = Method.getMethod("java.lang.Object get()"); 42 | 43 | static final String FIELD_INSTANCE_PROVIDER = "owbContextualInstanceProvider";//NormalScopeProxyFactory.FIELD_INSTANCE_PROVIDER; 44 | } 45 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.spi/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.spi/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | net.tascalate.javaflow.spi 4 | Continuations / CoRoutines library for Java 1.5 - 1.8, incl. build tools & CDI support. 5 | This project is based on completely re-worked Apache Jakarta Commons JavaFlow library. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | org.eclipse.m2e.core.maven2Builder 13 | 14 | 15 | 16 | org.eclipse.m2e.core.maven2Nature 17 | org.eclipse.jdt.core.javanature 18 | 19 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.spi/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding//src/test/resources=UTF-8 6 | encoding/=UTF-8 7 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.spi/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 4 | org.eclipse.jdt.core.compiler.compliance=1.6 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 8 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 9 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore 10 | org.eclipse.jdt.core.compiler.release=disabled 11 | org.eclipse.jdt.core.compiler.source=1.6 12 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.spi/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.spi/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | net.tascalate.javaflow 6 | net.tascalate.javaflow.parent 7 | 2.7.9 8 | ../ 9 | 10 | 11 | net.tascalate.javaflow.spi 12 | jar 13 | 14 | Tascalate JavaFlow / Bytecode Modification SPI 15 | 16 | 17 | ../HEADER-DERRIVED.txt 18 | 19 | 20 | 21 | 22 | junit 23 | junit 24 | test 25 | 26 | 27 | 28 | 29 | 30 | 31 | org.moditect 32 | moditect-maven-plugin 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.spi/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | module net.tascalate.javaflow.spi { 17 | exports org.apache.commons.javaflow.spi; 18 | } 19 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.spi/src/main/java/org/apache/commons/javaflow/spi/AbstractResourceTransformer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.spi; 17 | 18 | import java.util.Arrays; 19 | import java.util.Collections; 20 | import java.util.HashSet; 21 | 22 | public abstract class AbstractResourceTransformer implements ResourceTransformer { 23 | 24 | public byte[] transform(byte[] original) { 25 | return transform(original, Collections.emptySet()); 26 | } 27 | 28 | public byte[] transform(byte[] original, String retransformClass) { 29 | return transform(original, Collections.singleton(retransformClass)); 30 | } 31 | 32 | public byte[] transform(byte[] original, String... retransformClasses) { 33 | return transform( 34 | original, null == retransformClasses || retransformClasses.length == 0 ? 35 | Collections.emptySet() : 36 | new HashSet(Arrays.asList(retransformClasses)) 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.spi/src/main/java/org/apache/commons/javaflow/spi/Cache.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.spi; 17 | 18 | import java.lang.ref.Reference; 19 | import java.lang.ref.SoftReference; 20 | import java.util.Map; 21 | import java.util.WeakHashMap; 22 | 23 | abstract public class Cache { 24 | private final Map> storage = new WeakHashMap>(); 25 | 26 | synchronized public V get(K key) { 27 | Reference valueRef = storage.get(key); 28 | V value = null == valueRef ? null : valueRef.get(); 29 | if (null == value) { 30 | value = createValue(key); 31 | storage.put(key, new SoftReference(value)); 32 | } 33 | return value; 34 | } 35 | 36 | abstract protected V createValue(K key); 37 | } 38 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.spi/src/main/java/org/apache/commons/javaflow/spi/ClassMatchStrategy.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.spi; 17 | 18 | public abstract class ClassMatchStrategy { 19 | abstract public boolean matches(String name, String signature, String superName, String[] interfaces, ResourceLoader loader); 20 | 21 | public ClassMatcher bind(final ResourceLoader loader) { 22 | return new ClassMatcher() { 23 | @Override 24 | public boolean matches(String name, String signature, String superName, String[] interfaces) { 25 | return ClassMatchStrategy.this.matches(name, signature, superName, interfaces, loader); 26 | } 27 | }; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.spi/src/main/java/org/apache/commons/javaflow/spi/ClassMatcher.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.spi; 17 | 18 | public interface ClassMatcher { 19 | boolean matches(String name, String signature, String superName, String[] interfaces); 20 | 21 | public static final ClassMatcher MATCH_NONE = new ClassMatcher() { 22 | @Override 23 | public boolean matches(String name, String signature, String superName, String[] interfaces) { 24 | return false; 25 | } 26 | }; 27 | 28 | public static final ClassMatcher MATCH_ALL = new ClassMatcher() { 29 | @Override 30 | public boolean matches(String name, String signature, String superName, String[] interfaces) { 31 | return true; 32 | } 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.spi/src/main/java/org/apache/commons/javaflow/spi/NopResourceTransformer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package org.apache.commons.javaflow.spi; 18 | 19 | import java.util.Collection; 20 | 21 | public final class NopResourceTransformer extends AbstractResourceTransformer { 22 | 23 | public static final NopResourceTransformer INSTANCE = new NopResourceTransformer(); 24 | 25 | public byte[] transform(byte[] original, Collection retransformClasses) { 26 | return original; 27 | } 28 | 29 | public void release() { 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.spi/src/main/java/org/apache/commons/javaflow/spi/ResourceLoader.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.spi; 17 | 18 | import java.io.IOException; 19 | import java.io.InputStream; 20 | 21 | public interface ResourceLoader { 22 | boolean hasResource(String name); 23 | InputStream getResourceAsStream(String name) throws IOException; 24 | } 25 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.spi/src/main/java/org/apache/commons/javaflow/spi/ResourceTransformationFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.spi; 17 | 18 | public interface ResourceTransformationFactory { 19 | 20 | ResourceTransformer createTransformer(ResourceLoader resourceLoader); 21 | } 22 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.spi/src/main/java/org/apache/commons/javaflow/spi/ResourceTransformer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Original work: copyright 1999-2004 The Apache Software Foundation 3 | * (http://www.apache.org/) 4 | * 5 | * This project is based on the work licensed to the Apache Software 6 | * Foundation (ASF) under one or more contributor license agreements. 7 | * See the NOTICE file distributed with this work for additional 8 | * information regarding copyright ownership. 9 | * 10 | * Modified work: copyright 2013-2022 Valery Silaev (http://vsilaev.com) 11 | * 12 | * Licensed under the Apache License, Version 2.0 (the "License"); 13 | * you may not use this file except in compliance with the License. 14 | * You may obtain a copy of the License at 15 | * 16 | * http://www.apache.org/licenses/LICENSE-2.0 17 | * 18 | * Unless required by applicable law or agreed to in writing, software 19 | * distributed under the License is distributed on an "AS IS" BASIS, 20 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | * See the License for the specific language governing permissions and 22 | * limitations under the License. 23 | */ 24 | package org.apache.commons.javaflow.spi; 25 | 26 | import java.util.Collection; 27 | 28 | /** 29 | * Byte-code transformer that enhances the class files for javaflow. 30 | * 31 | *

32 | * When Continuation.suspend is called, all the methods in the stack frame needs 33 | * to be enhanced. 34 | * 35 | * @author tcurdt 36 | */ 37 | public interface ResourceTransformer { 38 | byte[] transform(byte[] original); 39 | byte[] transform(byte[] original, String retransformClass); 40 | byte[] transform(byte[] original, String... retransformClasses); 41 | byte[] transform(byte[] original, Collection retransformClasses); 42 | 43 | void release(); 44 | } 45 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.spi/src/main/java/org/apache/commons/javaflow/spi/StopException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.spi; 17 | 18 | public class StopException extends RuntimeException { 19 | 20 | private static final long serialVersionUID = 1L; 21 | 22 | private StopException() { 23 | } 24 | 25 | @Override 26 | public Throwable fillInStackTrace() { 27 | return this; 28 | } 29 | 30 | public static final StopException INSTANCE = new StopException(); 31 | } 32 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.spi/src/main/java/org/apache/commons/javaflow/spi/VetoableResourceLoader.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.spi; 17 | 18 | import java.io.IOException; 19 | 20 | public interface VetoableResourceLoader extends ResourceLoader { 21 | ClassMatcher createVeto() throws IOException; 22 | ClassMatchStrategy getVetoStrategy() throws IOException; 23 | } 24 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.spi/src/main/resources/META-INF/net.tascalate.javaflow.veto.cmf: -------------------------------------------------------------------------------- 1 | # possible values are: 2 | # implements-interface:name 3 | # implements-interface:name-part 4 | # implements-interface:name-pattern 5 | # extends-class:name 6 | # extends-class:name-part 7 | # extends-class:name-pattern 8 | # class:name 9 | # class:name-part 10 | # class:name-pattern 11 | # Classes should be named in internal format, i.e. com/company/myapp/MyClass 12 | # 13 | # This two superclasses implies implementation of 14 | # org/apache/commons/javaflow/core/ContinuableProxy 15 | #extends-class:name=java/lang/reflect/Proxy 16 | #extends-class:name=net/sf/cglib/proxy/Proxy$ProxyImpl 17 | # 18 | # Ad-hoc custom continuable proxy 19 | #implements-interface:name=org/apache/commons/javaflow/core/CustomContinuableProxy 20 | # 21 | # Interfaces from Apache OpenWebBeans CDI container 22 | #implements-interface:name=org/apache/webbeans/proxy/OwbInterceptorProxy 23 | #implements-interface:name=org/apache/webbeans/proxy/OwbNormalScopeProxy 24 | # 25 | # Interfaces from JBoss Weld CDI container 26 | #implements-interface:name=org/jboss/weld/bean/proxy/ProxyObject 27 | # 28 | # Interfaces from JBoss WildFly application server 29 | #implements-interface:name=org/jboss/as/ee/component/serialization/WriteReplaceInterface 30 | # 31 | # CGLib generated classes, default naming strategy 32 | #class:name-pattern=.*\$\$EnhancerByCGLIB\$\$.* 33 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.ant/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.ant/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | net.tascalate.javaflow.tools.ant 4 | Continuations / CoRoutines library for Java 1.5 - 1.8, incl. build tools & CDI support. 5 | This project is based on completely re-worked Apache Jakarta Commons JavaFlow library. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 6 | 7 | net.tascalate.javaflow.tools.jar 8 | net.tascalate.javaflow.spi 9 | net.tascalate.javaflow.providers.asm5 10 | 11 | 12 | 13 | org.eclipse.jdt.core.javabuilder 14 | 15 | 16 | org.eclipse.m2e.core.maven2Builder 17 | 18 | 19 | 20 | org.eclipse.m2e.core.maven2Nature 21 | org.eclipse.jdt.core.javanature 22 | 23 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.ant/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding//src/test/resources=UTF-8 6 | encoding/=UTF-8 7 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.ant/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 5 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 6 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore 7 | org.eclipse.jdt.core.compiler.release=disabled 8 | org.eclipse.jdt.core.compiler.source=1.6 9 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.ant/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.ant/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | net.tascalate.javaflow 6 | net.tascalate.javaflow.parent 7 | 2.7.9 8 | ../ 9 | 10 | 11 | net.tascalate.javaflow.tools.ant 12 | jar 13 | 14 | Tascalate JavaFlow / Tools / Apache Ant 15 | 16 | 17 | ../HEADER-DERRIVED.txt 18 | 19 | 20 | 21 | 22 | ${project.groupId} 23 | ${project.groupId}.tools.jar 24 | ${project.version} 25 | 26 | 27 | ${project.groupId} 28 | ${project.groupId}.providers.core 29 | ${project.version} 30 | runtime 31 | false 32 | 33 | 34 | org.apache.ant 35 | ant 36 | 1.10.11 37 | provided 38 | 39 | 40 | junit 41 | junit 42 | test 43 | 44 | 45 | 46 | 47 | 48 | org.apache.maven.plugins 49 | maven-jar-plugin 50 | 51 | 52 | 53 | ${project.artifactId} 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.ant/src/main/resources/org/apache/commons/javaflow/tools/ant/tasks.properties: -------------------------------------------------------------------------------- 1 | javaflow=org.apache.commons.javaflow.tools.ant.ContinuableClassesInstrumentationTask -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.gradle/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.gradle/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | net.tascalate.javaflow.tools.gradle 4 | Continuations / CoRoutines library for Java 1.5 - 1.8, incl. build tools & CDI support. 5 | This project is based on completely re-worked Apache Jakarta Commons JavaFlow library. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 6 | 7 | net.tascalate.javaflow.tools.jar 8 | net.tascalate.javaflow.spi 9 | net.tascalate.javaflow.providers.asm5 10 | 11 | 12 | 13 | org.eclipse.jdt.core.javabuilder 14 | 15 | 16 | org.eclipse.m2e.core.maven2Builder 17 | 18 | 19 | 20 | org.eclipse.m2e.core.maven2Nature 21 | org.eclipse.jdt.core.javanature 22 | 23 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.gradle/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding//src/test/resources=UTF-8 6 | encoding/=UTF-8 7 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.gradle/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.6 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 12 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 13 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 14 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore 15 | org.eclipse.jdt.core.compiler.release=disabled 16 | org.eclipse.jdt.core.compiler.source=1.6 17 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.gradle/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.gradle/src/main/java/org/apache/commons/javaflow/tools/gradle/ContinuableClassesInstrumentationPluginConfiguration.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.apache.commons.javaflow.tools.gradle; 17 | 18 | public class ContinuableClassesInstrumentationPluginConfiguration { 19 | 20 | private boolean skip = false; 21 | private boolean includeTestClasses = true; 22 | 23 | public boolean isSkip() { 24 | return skip; 25 | } 26 | 27 | public void setSkip(boolean skip) { 28 | this.skip = skip; 29 | } 30 | 31 | public boolean isIncludeTestClasses() { 32 | return includeTestClasses; 33 | } 34 | 35 | public void setIncludeTestClasses(boolean includeTestClasses) { 36 | this.includeTestClasses = includeTestClasses; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.gradle/src/main/resources/META-INF/gradle-plugins/continuations.properties: -------------------------------------------------------------------------------- 1 | implementation-class=org.apache.commons.javaflow.tools.gradle.ContinuableClassesInstrumentationPlugin -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.jar/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.jar/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | net.tascalate.javaflow.tools.jar 4 | Continuations / CoRoutines library for Java 1.5 - 1.8, incl. build tools & CDI support. 5 | This project is based on completely re-worked Apache Jakarta Commons JavaFlow library. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 6 | 7 | net.tascalate.javaflow.spi 8 | net.tascalate.javaflow.providers.asm5 9 | 10 | 11 | 12 | org.eclipse.jdt.core.javabuilder 13 | 14 | 15 | org.eclipse.m2e.core.maven2Builder 16 | 17 | 18 | 19 | org.eclipse.m2e.core.maven2Nature 20 | org.eclipse.jdt.core.javanature 21 | 22 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.jar/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding//src/test/resources=UTF-8 6 | encoding/=UTF-8 7 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.jar/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.6 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 12 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 13 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 14 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 15 | org.eclipse.jdt.core.compiler.release=disabled 16 | org.eclipse.jdt.core.compiler.source=1.6 17 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.jar/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.jar/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | module net.tascalate.javaflow.tools.jar { 17 | requires org.slf4j; 18 | 19 | requires transitive net.tascalate.javaflow.spi; 20 | requires net.tascalate.javaflow.providers.core; 21 | 22 | exports org.apache.commons.javaflow.tools.jar; 23 | } 24 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.jar/src/shade/resources/simplelogger.properties: -------------------------------------------------------------------------------- 1 | # SLF4J's SimpleLogger configuration file 2 | # Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err. 3 | 4 | # Default logging detail level for all instances of SimpleLogger. 5 | # Must be one of ("trace", "debug", "info", "warn", or "error"). 6 | # If not specified, defaults to "info". 7 | org.slf4j.simpleLogger.defaultLogLevel=info 8 | 9 | # Logging detail level for a SimpleLogger instance named "xxxxx". 10 | # Must be one of ("trace", "debug", "info", "warn", or "error"). 11 | # If not specified, the default logging detail level is used. 12 | #org.slf4j.simpleLogger.log.xxxxx= 13 | 14 | # Set to true if you want the current date and time to be included in output messages. 15 | # Default is false, and will output the number of milliseconds elapsed since startup. 16 | org.slf4j.simpleLogger.showDateTime=true 17 | 18 | # The date and time format to be used in the output messages. 19 | # The pattern describing the date and time format is the same that is used in java.text.SimpleDateFormat. 20 | # If the format is not specified or is invalid, the default format is used. 21 | # The default format is yyyy-MM-dd HH:mm:ss:SSS Z. 22 | org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z 23 | 24 | # Set to true if you want to output the current thread name. 25 | # Defaults to true. 26 | org.slf4j.simpleLogger.showThreadName=false 27 | 28 | # Set to true if you want the Logger instance name to be included in output messages. 29 | # Defaults to true. 30 | org.slf4j.simpleLogger.showLogName=true 31 | 32 | # Set to true if you want the last component of the name to be included in output messages. 33 | # Defaults to false. 34 | #org.slf4j.simpleLogger.showShortLogName=false 35 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.maven/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.maven/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | net.tascalate.javaflow.tools.maven 4 | Continuations / CoRoutines library for Java 1.5 - 1.8, incl. build tools & CDI support. 5 | This project is based on completely re-worked Apache Jakarta Commons JavaFlow library. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 6 | 7 | net.tascalate.javaflow.tools.jar 8 | net.tascalate.javaflow.spi 9 | net.tascalate.javaflow.providers.asm5 10 | 11 | 12 | 13 | org.eclipse.jdt.core.javabuilder 14 | 15 | 16 | org.eclipse.m2e.core.maven2Builder 17 | 18 | 19 | 20 | org.eclipse.m2e.core.maven2Nature 21 | org.eclipse.jdt.core.javanature 22 | 23 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.maven/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding//src/test/resources=UTF-8 6 | encoding/=UTF-8 7 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.maven/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.6 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 12 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 13 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 14 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore 15 | org.eclipse.jdt.core.compiler.release=disabled 16 | org.eclipse.jdt.core.compiler.source=1.6 17 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.maven/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.runtime/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.runtime/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | net.tascalate.javaflow.tools.runtime 4 | Continuations / CoRoutines library for Java 1.5 - 1.8, incl. build tools & CDI support. 5 | This project is based on completely re-worked Apache Jakarta Commons JavaFlow library. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. 6 | 7 | net.tascalate.javaflow.spi 8 | 9 | 10 | 11 | org.eclipse.jdt.core.javabuilder 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | org.eclipse.m2e.core.maven2Nature 19 | org.eclipse.jdt.core.javanature 20 | 21 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.runtime/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding//src/test/resources=UTF-8 6 | encoding/=UTF-8 7 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.runtime/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.6 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 12 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 13 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 14 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore 15 | org.eclipse.jdt.core.compiler.release=disabled 16 | org.eclipse.jdt.core.compiler.source=1.6 17 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.runtime/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.runtime/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | net.tascalate.javaflow 6 | net.tascalate.javaflow.parent 7 | 2.7.9 8 | ../ 9 | 10 | 11 | net.tascalate.javaflow.tools.runtime 12 | jar 13 | 14 | Tascalate JavaFlow / Tools / Bytecode ClassLoader 15 | 16 | 17 | ../HEADER-DERRIVED.txt 18 | 19 | 20 | 21 | 22 | ${project.groupId} 23 | ${project.groupId}.spi 24 | ${project.version} 25 | 26 | 27 | org.slf4j 28 | slf4j-api 29 | 30 | 31 | junit 32 | junit 33 | test 34 | 35 | 36 | 37 | 38 | 39 | 40 | org.moditect 41 | moditect-maven-plugin 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /net.tascalate.javaflow.tools.runtime/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2013-2022 Valery Silaev (http://vsilaev.com) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | module net.tascalate.javaflow.tools.runtime { 17 | requires org.slf4j; 18 | 19 | requires transitive net.tascalate.javaflow.spi; 20 | 21 | exports org.apache.commons.javaflow.tools.runtime; 22 | } 23 | --------------------------------------------------------------------------------