Skip to content

Commit

Permalink
Streamlined code formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Winterhalter committed Feb 19, 2015
1 parent 3019fe7 commit 91725af
Show file tree
Hide file tree
Showing 35 changed files with 1,985 additions and 2,029 deletions.
3 changes: 2 additions & 1 deletion byte-buddy-agent/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand Down
3 changes: 2 additions & 1 deletion byte-buddy-android/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand Down
6 changes: 4 additions & 2 deletions byte-buddy-benchmark/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand Down Expand Up @@ -74,7 +75,8 @@
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.openjdk.jmh.Main</mainClass>
</transformer>
</transformers>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,99 +43,80 @@ public class ClassByImplementationBenchmark {
* The base class to be subclassed in all benchmarks.
*/
public static final Class<? extends ExampleInterface> BASE_CLASS = ExampleInterface.class;

/**
* The base class to be subclassed in all benchmarks.
*/
private Class<? extends ExampleInterface> baseClass = BASE_CLASS;

/**
* The default reference value. By defining the default reference value as a string type instead of as an object
* type, the field is inlined by the compiler, similar to the primitive values.
*/
public static final String DEFAULT_REFERENCE_VALUE = null;

/**
* The default {@code boolean} value.
*/
public static final boolean DEFAULT_BOOLEAN_VALUE = false;
/**
* The default {@code byte} value.
*/
public static final byte DEFAULT_BYTE_VALUE = 0;
/**
* The default {@code short} value.
*/
public static final short DEFAULT_SHORT_VALUE = 0;
/**
* The default {@code char} value.
*/
public static final char DEFAULT_CHAR_VALUE = 0;
/**
* The default {@code int} value.
*/
public static final int DEFAULT_INT_VALUE = 0;
/**
* The default {@code long} value.
*/
public static final long DEFAULT_LONG_VALUE = 0L;
/**
* The default {@code float} value.
*/
public static final float DEFAULT_FLOAT_VALUE = 0f;
/**
* The default {@code double} value.
*/
public static final double DEFAULT_DOUBLE_VALUE = 0d;
/**
* The base class to be subclassed in all benchmarks.
*/
private Class<? extends ExampleInterface> baseClass = BASE_CLASS;
/**
* The default reference value. By defining the default reference value as a string type instead of as an object
* type, the field is inlined by the compiler, similar to the primitive values.
*/
private String defaultReferenceValue = DEFAULT_REFERENCE_VALUE;

/**
* The default {@code boolean} value.
*/
public static final boolean DEFAULT_BOOLEAN_VALUE = false;

/**
* The default {@code boolean} value.
*/
private boolean defaultBooleanValue = DEFAULT_BOOLEAN_VALUE;

/**
* The default {@code byte} value.
*/
public static final byte DEFAULT_BYTE_VALUE = 0;

/**
* The default {@code byte} value.
*/
private byte defaultByteValue = DEFAULT_BYTE_VALUE;

/**
* The default {@code short} value.
*/
public static final short DEFAULT_SHORT_VALUE = 0;

/**
* The default {@code short} value.
*/
private short defaultShortValue = DEFAULT_SHORT_VALUE;

/**
* The default {@code char} value.
*/
public static final char DEFAULT_CHAR_VALUE = 0;

/**
* The default {@code char} value.
*/
private char defaultCharValue = DEFAULT_CHAR_VALUE;

/**
* The default {@code int} value.
*/
public static final int DEFAULT_INT_VALUE = 0;

/**
* The default {@code int} value.
*/
private int defaultIntValue = DEFAULT_INT_VALUE;

/**
* The default {@code long} value.
*/
public static final long DEFAULT_LONG_VALUE = 0L;

/**
* The default {@code long} value.
*/
private long defaultLongValue = DEFAULT_LONG_VALUE;

/**
* The default {@code float} value.
*/
public static final float DEFAULT_FLOAT_VALUE = 0f;

/**
* The default {@code float} value.
*/
private float defaultFloatValue = DEFAULT_FLOAT_VALUE;

/**
* The default {@code double} value.
*/
public static final double DEFAULT_DOUBLE_VALUE = 0d;

/**
* The default {@code double} value.
*/
Expand Down
3 changes: 2 additions & 1 deletion byte-buddy-dep/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand Down
122 changes: 61 additions & 61 deletions byte-buddy-dep/src/main/java/net/bytebuddy/ByteBuddy.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,17 @@ public ByteBuddy(ClassFileVersion classFileVersion) {
* method definition or instrumentation.
*/
protected ByteBuddy(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory) {
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory) {
this.classFileVersion = classFileVersion;
this.namingStrategy = namingStrategy;
this.interfaceTypes = interfaceTypes;
Expand Down Expand Up @@ -564,8 +564,8 @@ public <T> DynamicType.Builder<T> rebase(Class<T> levelType, ClassFileLocator cl
* @return A dynamic type builder for this configuration that creates a rebased version of the given type.
*/
public <T> DynamicType.Builder<T> rebase(Class<T> levelType,
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer) {
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer) {
return rebase(new TypeDescription.ForLoadedType(nonNull(levelType)), classFileLocator, methodNameTransformer);
}

Expand Down Expand Up @@ -609,8 +609,8 @@ public <T> DynamicType.Builder<T> rebase(TypeDescription levelType, ClassFileLoc
* @return A dynamic type builder for this configuration that creates a rebased version of the given type.
*/
public <T> DynamicType.Builder<T> rebase(TypeDescription levelType,
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer) {
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer) {
return new InlineDynamicTypeBuilder<T>(classFileVersion,
nonNull(namingStrategy.rebase(levelType)),
levelType,
Expand Down Expand Up @@ -1200,20 +1200,20 @@ public static class MethodAnnotationTarget extends Proxy {
* current method selection.
*/
protected MethodAnnotationTarget(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ElementMatcher<? super MethodDescription> methodMatcher,
Instrumentation instrumentation,
MethodAttributeAppender.Factory attributeAppenderFactory) {
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ElementMatcher<? super MethodDescription> methodMatcher,
Instrumentation instrumentation,
MethodAttributeAppender.Factory attributeAppenderFactory) {
super(classFileVersion,
namingStrategy,
interfaceTypes,
Expand Down Expand Up @@ -1369,18 +1369,18 @@ public static class OptionalMethodInterception extends ByteBuddy implements Meth
* @param methodMatcher The method matcher representing the current method selection.
*/
protected OptionalMethodInterception(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ElementMatcher<? super MethodDescription> methodMatcher) {
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ElementMatcher<? super MethodDescription> methodMatcher) {
super(classFileVersion,
namingStrategy,
interfaceTypes,
Expand Down Expand Up @@ -1466,17 +1466,17 @@ protected abstract static class Proxy extends ByteBuddy {
* method definition or instrumentation.
*/
protected Proxy(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory) {
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory) {
super(classFileVersion,
namingStrategy,
interfaceTypes,
Expand Down Expand Up @@ -1568,7 +1568,7 @@ public <T> DynamicType.Builder<T> subclass(TypeDescription superType) {

@Override
public <T> DynamicType.Builder<T> subclass(TypeDescription superType,
ConstructorStrategy constructorStrategy) {
ConstructorStrategy constructorStrategy) {
return materialize().subclass(superType, constructorStrategy);
}

Expand All @@ -1579,13 +1579,13 @@ public <T> DynamicType.Builder<T> redefine(Class<T> levelType) {

@Override
public <T> DynamicType.Builder<T> redefine(Class<T> levelType,
ClassFileLocator classFileLocator) {
ClassFileLocator classFileLocator) {
return materialize().redefine(levelType, classFileLocator);
}

@Override
public <T> DynamicType.Builder<T> redefine(TypeDescription levelType,
ClassFileLocator classFileLocator) {
ClassFileLocator classFileLocator) {
return materialize().redefine(levelType, classFileLocator);
}

Expand All @@ -1596,27 +1596,27 @@ public <T> DynamicType.Builder<T> rebase(Class<T> levelType) {

@Override
public <T> DynamicType.Builder<T> rebase(Class<T> levelType,
ClassFileLocator classFileLocator) {
ClassFileLocator classFileLocator) {
return materialize().rebase(levelType, classFileLocator);
}

@Override
public <T> DynamicType.Builder<T> rebase(Class<T> levelType,
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer) {
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer) {
return materialize().rebase(levelType, classFileLocator, methodNameTransformer);
}

@Override
public <T> DynamicType.Builder<T> rebase(TypeDescription levelType,
ClassFileLocator classFileLocator) {
ClassFileLocator classFileLocator) {
return materialize().rebase(levelType, classFileLocator);
}

@Override
public <T> DynamicType.Builder<T> rebase(TypeDescription levelType,
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer) {
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer) {
return super.rebase(levelType, classFileLocator, methodNameTransformer);
}

Expand Down

0 comments on commit 91725af

Please sign in to comment.