Skip to content

Commit

Permalink
Rename org.particleframework to io.micronaut
Browse files Browse the repository at this point in the history
  • Loading branch information
graemerocher committed Mar 7, 2018
1 parent 2975ee5 commit 7e8653f
Show file tree
Hide file tree
Showing 2,555 changed files with 36,022 additions and 33,551 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Particle Framework
# Micronaut Framework

## Running Tests

Expand Down
6 changes: 3 additions & 3 deletions ROADMAP.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Particle Requirements
# Micronaut Requirements

## Minimum Feature Set

The following features are a TODO list of things to do on Particle before launching
The following features are a TODO list of things to do on Micronaut before launching

### Core Features

Expand Down Expand Up @@ -99,7 +99,7 @@ WebSocket Support must be implemented

#### Support for Views

Some view technology support and port GSON views to Particle.
Some view technology support and port GSON views to micronaut.

### HTTP Client

Expand Down
2 changes: 1 addition & 1 deletion aop/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def targetDir = new File(project.buildDir, "jarjar")
def targetFile = new File(targetDir, "asm.jar")
def jarjarTask = task("jarjarTask", type: JarjarTask) {
from(jar.outputs.files)
classRename "org.objectweb.asm.**", "org.particleframework.asm.@1"
classRename "org.objectweb.asm.**", "io.micronaut.asm.@1"
destinationDir = targetDir
destinationName = targetFile.name
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.particleframework.aop;
package io.micronaut.aop;

import org.particleframework.context.annotation.Executable;
import io.micronaut.context.annotation.Executable;
import io.micronaut.context.annotation.Type;
import io.micronaut.context.annotation.Executable;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
Expand All @@ -40,7 +42,7 @@
* }
* </code></pre>
*
* <p>Note that the annotation MUST be {@link java.lang.annotation.RetentionPolicy#RUNTIME} and the specified {@link org.particleframework.context.annotation.Type} must implement {@link MethodInterceptor}</p>
* <p>Note that the annotation MUST be {@link java.lang.annotation.RetentionPolicy#RUNTIME} and the specified {@link Type} must implement {@link MethodInterceptor}</p>
*
* @author Graeme Rocher
* @since 1.0
Expand All @@ -52,7 +54,7 @@
public @interface Around {

/**
* <p>By default Particle will compile subclasses of the target class and call super.foo(..) to invoke the original method since
* <p>By default Micronaut will compile subclasses of the target class and call super.foo(..) to invoke the original method since
* this is more efficient and allows proxied methods to work for calls from within the class.</p>
*
* <p>However certain cases it may be useful to be able to to instead proxy all public methods of the original implementation.
Expand All @@ -75,7 +77,7 @@
boolean hotswap() default false;

/**
* <p>By default Particle will initialize the proxy target eagerly when the proxy is created. This is better for performance, but some use
* <p>By default Micronaut will initialize the proxy target eagerly when the proxy is created. This is better for performance, but some use
* cases may require the bean to be resolved lazily (for example for resolving the bean from a custom scope).</p>
*
* <p>If {@link #proxyTarget()} is set to <code>true</code> then one can optionally set the of <code>lazy</code> to true</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.particleframework.aop;
package io.micronaut.aop;

import java.util.concurrent.locks.ReentrantReadWriteLock;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.particleframework.aop;
package io.micronaut.aop;

import io.micronaut.core.order.Ordered;

/**
* <p>{@link Interceptor} classes implement the {@link org.particleframework.core.order.Ordered} interface
* <p>{@link Interceptor} classes implement the {@link Ordered} interface
* in order to control the order of execution when multiple interceptors are present.</p>
*
* <p>This class provides a set of common constants for typical phases used by interceptors thus making it easier to position a n interceptor in the correct phase.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.particleframework.aop;
package io.micronaut.aop;

/**
* An interface implemented by generated proxy classes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.particleframework.aop;
package io.micronaut.aop;

/**
* A {@link Intercepted} that proxies another instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.particleframework.aop;
package io.micronaut.aop;

import org.particleframework.core.order.Ordered;
import io.micronaut.core.order.Ordered;
import io.micronaut.core.order.Ordered;

/**
* <p>An Interceptor intercepts the execution of a method allowing cross cutting behaviour to be applied to a method's execution.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.particleframework.aop;
package io.micronaut.aop;

/**
* Marker interface for instances that are implemented automatically via {@link Introduction} advise
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.particleframework.aop;
package io.micronaut.aop;

import org.particleframework.context.annotation.Executable;
import io.micronaut.context.annotation.Executable;
import io.micronaut.context.annotation.Type;
import io.micronaut.context.annotation.Executable;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
Expand All @@ -41,7 +43,7 @@
* }
* </code></pre>
*
* <p>Note that the annotation MUST be {@link java.lang.annotation.RetentionPolicy#RUNTIME} and the specified {@link org.particleframework.context.annotation.Type} must implement {@link MethodInterceptor}</p>
* <p>Note that the annotation MUST be {@link java.lang.annotation.RetentionPolicy#RUNTIME} and the specified {@link Type} must implement {@link MethodInterceptor}</p>
*
* @author Graeme Rocher
* @since 1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.particleframework.aop;
package io.micronaut.aop;

import org.particleframework.core.annotation.AnnotationMetadataDelegate;
import org.particleframework.core.convert.value.MutableConvertibleValues;
import org.particleframework.core.type.ArgumentValue;
import org.particleframework.core.type.Executable;
import org.particleframework.core.type.MutableArgumentValue;
import io.micronaut.core.annotation.AnnotationMetadataDelegate;
import io.micronaut.core.convert.value.MutableConvertibleValues;
import io.micronaut.core.type.ArgumentValue;
import io.micronaut.core.type.Executable;
import io.micronaut.core.type.MutableArgumentValue;
import io.micronaut.core.annotation.AnnotationMetadataDelegate;
import io.micronaut.core.convert.value.MutableConvertibleValues;
import io.micronaut.core.type.ArgumentValue;
import io.micronaut.core.type.Executable;
import io.micronaut.core.type.MutableArgumentValue;

import java.util.LinkedHashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.particleframework.aop;
package io.micronaut.aop;

/**
* A MethodInterceptor extends the generic {@link Interceptor} and provides an interface more specific to method interception
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.particleframework.aop;
package io.micronaut.aop;

import org.particleframework.inject.ExecutableMethod;
import io.micronaut.inject.ExecutableMethod;
import io.micronaut.inject.ExecutableMethod;

/**
* Extended version of {@link InvocationContext} for {@link MethodInterceptor} instances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.particleframework.aop.exceptions;
package io.micronaut.aop.exceptions;

import org.particleframework.inject.ExecutableMethod;
import io.micronaut.inject.ExecutableMethod;
import io.micronaut.inject.ExecutableMethod;

/**
* An exception thrown when {@link org.particleframework.aop.Introduction} advise cannot be implemented
* An exception thrown when {@link io.micronaut.aop.Introduction} advise cannot be implemented
*
* @author graemerocher
* @since 1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,35 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.particleframework.aop.internal;

import org.particleframework.aop.*;
import org.particleframework.aop.exceptions.UnimplementedAdviceException;
import org.particleframework.context.ApplicationContext;
import org.particleframework.context.BeanContext;
import org.particleframework.context.annotation.Type;
import org.particleframework.core.annotation.AnnotationMetadata;
import org.particleframework.core.annotation.Internal;
import org.particleframework.core.convert.value.MutableConvertibleValues;
import org.particleframework.core.order.OrderUtil;
import org.particleframework.core.type.Argument;
import org.particleframework.core.type.MutableArgumentValue;
import org.particleframework.core.util.ArrayUtils;
import org.particleframework.inject.ExecutableMethod;
import org.particleframework.inject.annotation.DefaultAnnotationMetadata;
package io.micronaut.aop.internal;

import io.micronaut.aop.exceptions.UnimplementedAdviceException;
import io.micronaut.context.ApplicationContext;
import io.micronaut.context.BeanContext;
import io.micronaut.context.annotation.Type;
import io.micronaut.core.annotation.AnnotationMetadata;
import io.micronaut.core.annotation.Internal;
import io.micronaut.core.convert.value.MutableConvertibleValues;
import io.micronaut.core.order.OrderUtil;
import io.micronaut.core.type.Argument;
import io.micronaut.core.type.MutableArgumentValue;
import io.micronaut.core.util.ArrayUtils;
import io.micronaut.inject.ExecutableMethod;
import io.micronaut.inject.annotation.DefaultAnnotationMetadata;
import io.micronaut.aop.*;
import io.micronaut.aop.exceptions.UnimplementedAdviceException;
import io.micronaut.context.ApplicationContext;
import io.micronaut.context.BeanContext;
import io.micronaut.context.annotation.Type;
import io.micronaut.core.annotation.AnnotationMetadata;
import io.micronaut.core.annotation.Internal;
import io.micronaut.core.convert.value.MutableConvertibleValues;
import io.micronaut.core.order.OrderUtil;
import io.micronaut.core.type.Argument;
import io.micronaut.core.type.MutableArgumentValue;
import io.micronaut.core.util.ArrayUtils;
import io.micronaut.inject.ExecutableMethod;
import io.micronaut.inject.annotation.DefaultAnnotationMetadata;

import java.lang.annotation.Annotation;
import java.util.*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.particleframework.aop.internal;
package io.micronaut.aop.internal;

import org.particleframework.aop.Interceptor;
import org.particleframework.aop.MethodInvocationContext;
import org.particleframework.core.annotation.Internal;
import org.particleframework.inject.ExecutableMethod;
import org.particleframework.core.type.ReturnType;
import io.micronaut.core.annotation.Internal;
import io.micronaut.core.type.ReturnType;
import io.micronaut.inject.ExecutableMethod;
import io.micronaut.aop.Interceptor;
import io.micronaut.aop.MethodInvocationContext;
import io.micronaut.core.annotation.Internal;
import io.micronaut.inject.ExecutableMethod;
import io.micronaut.core.type.ReturnType;

import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,27 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.particleframework.aop.writer;

package io.micronaut.aop.writer;

import io.micronaut.aop.*;
import io.micronaut.aop.internal.InterceptorChain;
import io.micronaut.aop.internal.MethodInterceptorChain;
import io.micronaut.context.BeanContext;
import io.micronaut.context.BeanLocator;
import io.micronaut.context.ExecutionHandleLocator;
import io.micronaut.context.Qualifier;
import io.micronaut.core.annotation.AnnotationMetadata;
import io.micronaut.core.naming.NameUtils;
import io.micronaut.core.reflect.ReflectionUtils;
import io.micronaut.core.value.OptionalValues;
import io.micronaut.inject.BeanDefinition;
import io.micronaut.inject.ExecutableMethod;
import io.micronaut.inject.ProxyBeanDefinition;
import io.micronaut.inject.configuration.ConfigurationMetadataBuilder;
import io.micronaut.inject.writer.*;
import org.objectweb.asm.*;
import org.objectweb.asm.commons.GeneratorAdapter;
import org.objectweb.asm.commons.Method;
import org.particleframework.aop.*;
import org.particleframework.aop.internal.InterceptorChain;
import org.particleframework.aop.internal.MethodInterceptorChain;
import org.particleframework.context.BeanContext;
import org.particleframework.context.BeanLocator;
import org.particleframework.context.ExecutionHandleLocator;
import org.particleframework.context.Qualifier;
import org.particleframework.core.annotation.AnnotationMetadata;
import org.particleframework.core.naming.NameUtils;
import org.particleframework.core.reflect.ReflectionUtils;
import org.particleframework.core.value.OptionalValues;
import org.particleframework.inject.BeanDefinition;
import org.particleframework.inject.ExecutableMethod;
import org.particleframework.inject.ProxyBeanDefinition;
import org.particleframework.inject.configuration.ConfigurationMetadataBuilder;
import org.particleframework.inject.writer.*;

import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
Expand Down Expand Up @@ -74,7 +73,7 @@ public class AopProxyWriter extends AbstractClassFileWriter implements ProxyingB
private static final java.lang.reflect.Method RESOLVE_AROUND_INTERCEPTORS_METHOD = ReflectionUtils.getRequiredInternalMethod(InterceptorChain.class, "resolveAroundInterceptors", BeanContext.class, ExecutableMethod.class, Interceptor[].class);

private static final Constructor CONSTRUCTOR_METHOD_INTERCEPTOR_CHAIN = ReflectionUtils.findConstructor(MethodInterceptorChain.class, Interceptor[].class, Object.class, ExecutableMethod.class, Object[].class).orElseThrow(() ->
new IllegalStateException("new MethodInterceptorChain(..) constructor not found. Incompatible version of Particle?")
new IllegalStateException("new MethodInterceptorChain(..) constructor not found. Incompatible version of Micronaut?")
);

private static final String FIELD_INTERCEPTORS = "$interceptors";
Expand Down Expand Up @@ -173,7 +172,7 @@ public AopProxyWriter(BeanDefinitionWriter parent,
}

/**
* Constructs a new {@link AopProxyWriter} for the purposes of writing {@link org.particleframework.aop.Introduction} advise
* Constructs a new {@link AopProxyWriter} for the purposes of writing {@link Introduction} advise
*
* @param packageName The package name
* @param className The class name
Expand Down Expand Up @@ -490,7 +489,7 @@ public void visitBeanDefinitionEnd() {
// Add the interceptor @Type(..) annotation
Type[] interceptorTypes = getObjectTypes(this.interceptorTypes);
AnnotationVisitor interceptorTypeAnn = constructorWriter.visitParameterAnnotation(
interceptorArgumentIndex, Type.getDescriptor(org.particleframework.context.annotation.Type.class), true
interceptorArgumentIndex, Type.getDescriptor(io.micronaut.context.annotation.Type.class), true
).visitArray("value");
for (Type interceptorType : interceptorTypes) {
interceptorTypeAnn.visit(null, interceptorType);
Expand Down
Loading

0 comments on commit 7e8653f

Please sign in to comment.