Skip to content

Commit

Permalink
Added missing matchers to extend the matching API.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Winterhalter committed Jul 13, 2015
1 parent f69a034 commit 3b797c2
Show file tree
Hide file tree
Showing 84 changed files with 1,017 additions and 419 deletions.
84 changes: 42 additions & 42 deletions byte-buddy-dep/src/main/java/net/bytebuddy/ByteBuddy.java

Large diffs are not rendered by default.

Expand Up @@ -537,14 +537,14 @@ public String toString() {
class ForGivenType implements BaseNameResolver {

/**
* The type description which represents the resolved name.
* The type description which representedBy the resolved name.
*/
private final TypeDescription typeDescription;

/**
* Creates a new base name resolver that resolves a using the name of a given type.
*
* @param typeDescription The type description which represents the resolved name.
* @param typeDescription The type description which representedBy the resolved name.
*/
public ForGivenType(TypeDescription typeDescription) {
this.typeDescription = typeDescription;
Expand Down
Expand Up @@ -63,7 +63,7 @@ public interface AgentBuilder {
* @param matcher A matcher that decides if the entailed
* {@link net.bytebuddy.agent.builder.AgentBuilder.Transformer}s should be applied for a type that
* is being loaded.
* @return A definable that represents this agent builder which allows for the definition of one or several
* @return A definable that representedBy this agent builder which allows for the definition of one or several
* {@link net.bytebuddy.agent.builder.AgentBuilder.Transformer}s to be applied when the given {@code matcher}
* indicates a match.
*/
Expand All @@ -77,7 +77,7 @@ public interface AgentBuilder {
* decides if the entailed
* {@link net.bytebuddy.agent.builder.AgentBuilder.Transformer}s should be applied for that
* type.
* @return A definable that represents this agent builder which allows for the definition of one or several
* @return A definable that representedBy this agent builder which allows for the definition of one or several
* {@link net.bytebuddy.agent.builder.AgentBuilder.Transformer}s to be applied when the given {@code typeMatcher}
* indicates a match.
*/
Expand All @@ -95,7 +95,7 @@ public interface AgentBuilder {
* {@link java.lang.ClassLoader} that is loading the type being loaded. This matcher
* is always applied first where the type matcher is not applied in case that this
* matcher does not indicate a match.
* @return A definable that represents this agent builder which allows for the definition of one or several
* @return A definable that representedBy this agent builder which allows for the definition of one or several
* {@link net.bytebuddy.agent.builder.AgentBuilder.Transformer}s to be applied when both the given
* {@code typeMatcher} and {@code classLoaderMatcher} indicate a match.
*/
Expand Down Expand Up @@ -240,7 +240,7 @@ interface RawMatcher {
*
* @param typeDescription A description of the type to be instrumented.
* @param classLoader The class loader of the instrumented type. Might be {@code null} if this class
* loader represents the bootstrap class loader.
* loader representedBy the bootstrap class loader.
* @param classBeingRedefined The class being redefined which is only not {@code null} if a retransofmration
* is applied.
* @param protectionDomain The protection domain of the type being transformed.
Expand Down Expand Up @@ -414,7 +414,7 @@ interface BinaryLocator {
* @param typeName The binary name of the type that is being instrumented.
* @param binaryRepresentation The binary representation of the instrumented type.
* @param classLoader The class loader of the instrumented type. Might be {@code null} if this class
* loader represents the bootstrap class loader.
* loader representedBy the bootstrap class loader.
* @return This binary locator in its initialized form.
*/
Initialized initialize(String typeName, byte[] binaryRepresentation, ClassLoader classLoader);
Expand Down Expand Up @@ -1036,7 +1036,7 @@ public interface InitializationStrategy {
* @param name The name of the type for which the loaded type initializer is to be
* registered.
* @param classLoader The class loader of the instrumented type. Might be {@code null} if
* this class loader represents the bootstrap class loader.
* this class loader representedBy the bootstrap class loader.
* @param loadedTypeInitializer The loaded type initializer that is being registered.
*/
void register(String name, ClassLoader classLoader, LoadedTypeInitializer loadedTypeInitializer);
Expand Down Expand Up @@ -1699,7 +1699,7 @@ public ClassFileTransformer installOnByteBuddyAgent() {
/**
* Materializes the currently described {@link net.bytebuddy.agent.builder.AgentBuilder.Default.Transformation}.
*
* @return An agent builder that represents the currently described entry of this instance.
* @return An agent builder that representedBy the currently described entry of this instance.
*/
protected AgentBuilder materialize() {
return new Default(byteBuddy,
Expand Down
Expand Up @@ -64,14 +64,14 @@ interface Token<T extends Token<T>> {
class TokenList<S extends Token<S>> extends FilterableList.AbstractBase<S, TokenList<S>> {

/**
* The tokens that this list represents.
* The tokens that this list representedBy.
*/
private final List<? extends S> tokens;

/**
* Creates a list of tokens.
*
* @param tokens The tokens that this list represents.
* @param tokens The tokens that this list representedBy.
*/
public TokenList(List<? extends S> tokens) {
this.tokens = tokens;
Expand Down
Expand Up @@ -3,7 +3,7 @@
import net.bytebuddy.description.type.generic.GenericTypeDescription;

/**
* This interface represents all elements that can be declared within a type, i.e. other types and type members.
* This interface representedBy all elements that can be declared within a type, i.e. other types and type members.
*/
public interface DeclaredByType {

Expand Down
Expand Up @@ -106,58 +106,58 @@ public interface ModifierReviewable {
boolean isSuper();

/**
* Specifies if the modifier described by this object represents the bridge flag.
* Specifies if the modifier described by this object representedBy the bridge flag.
*
* @return {@code true} if the modifier described by this object represents the bridge flag
* @return {@code true} if the modifier described by this object representedBy the bridge flag
*/
boolean isBridge();

/**
* Specifies if the modifier described by this object represents the deprecated flag.
* Specifies if the modifier described by this object representedBy the deprecated flag.
*
* @return {@code true} if the modifier described by this object represents the deprecated flag.
* @return {@code true} if the modifier described by this object representedBy the deprecated flag.
*/
boolean isDeprecated();

/**
* Specifies if the modifier described by this object represents the annotation flag.
* Specifies if the modifier described by this object representedBy the annotation flag.
*
* @return {@code true} if the modifier described by this object represents the annotation flag.
* @return {@code true} if the modifier described by this object representedBy the annotation flag.
*/
boolean isAnnotation();

/**
* Specifies if the modifier described by this object represents the enum flag.
* Specifies if the modifier described by this object representedBy the enum flag.
*
* @return {@code true} if the modifier described by this object represents the enum flag.
* @return {@code true} if the modifier described by this object representedBy the enum flag.
*/
boolean isEnum();

/**
* Specifies if the modifier described by this object represents the interface flag.
* Specifies if the modifier described by this object representedBy the interface flag.
*
* @return {@code true} if the modifier described by this object represents the interface flag.
* @return {@code true} if the modifier described by this object representedBy the interface flag.
*/
boolean isInterface();

/**
* Specifies if the modifier described by this object represents the transient flag.
* Specifies if the modifier described by this object representedBy the transient flag.
*
* @return {@code true} if the modifier described by this object represents the transient flag.
* @return {@code true} if the modifier described by this object representedBy the transient flag.
*/
boolean isTransient();

/**
* Specifies if the modifier described by this object represents the volatile flag.
* Specifies if the modifier described by this object representedBy the volatile flag.
*
* @return {@code true} if the modifier described by this object represents the volatile flag.
* @return {@code true} if the modifier described by this object representedBy the volatile flag.
*/
boolean isVolatile();

/**
* Specifies if the modifier described by this object represents the var args flag.
* Specifies if the modifier described by this object representedBy the var args flag.
*
* @return {@code true} if the modifier described by this object represents the var args flag.
* @return {@code true} if the modifier described by this object representedBy the var args flag.
*/
boolean isVarArgs();

Expand Down
Expand Up @@ -90,7 +90,7 @@ interface AnnotationValue<T, S> {
*
* @param classLoader The class loader for loading this value.
* @return The loaded value of this annotation.
* @throws ClassNotFoundException If a type that represents a loaded value cannot be found.
* @throws ClassNotFoundException If a type that representedBy a loaded value cannot be found.
*/
Loaded<S> load(ClassLoader classLoader) throws ClassNotFoundException;

Expand Down Expand Up @@ -155,7 +155,7 @@ enum State {
RESOLVED;

/**
* Returns {@code true} if the related annotation value is defined, i.e. either represents
* Returns {@code true} if the related annotation value is defined, i.e. either representedBy
* an actual value or an exceptional state.
*
* @return {@code true} if the related annotation value is defined.
Expand All @@ -165,7 +165,7 @@ public boolean isDefined() {
}

/**
* Returns {@code true} if the related annotation value is resolved, i.e. represents an actual
* Returns {@code true} if the related annotation value is resolved, i.e. representedBy an actual
* value.
*
* @return {@code true} if the related annotation value is resolved.
Expand Down Expand Up @@ -317,14 +317,14 @@ public static <V extends Annotation> AnnotationValue<AnnotationDescription, V> o
}

/**
* The annotation description that this value represents.
* The annotation description that this value representedBy.
*/
private final AnnotationDescription annotationDescription;

/**
* Creates a new annotation value for a given annotation description.
*
* @param annotationDescription The annotation description that this value represents.
* @param annotationDescription The annotation description that this value representedBy.
*/
public ForAnnotation(AnnotationDescription annotationDescription) {
this.annotationDescription = annotationDescription;
Expand Down Expand Up @@ -671,7 +671,7 @@ class ForType<U extends Class<U>> implements AnnotationValue<TypeDescription, U>
*
* @param typeDescription The type to represent.
* @param <V> The represented type.
* @return An annotation value that represents the given type.
* @return An annotation value that representedBy the given type.
*/
public static <V extends Class<V>> AnnotationValue<TypeDescription, V> of(TypeDescription typeDescription) {
return new ForType<V>(typeDescription);
Expand All @@ -683,7 +683,7 @@ public static <V extends Class<V>> AnnotationValue<TypeDescription, V> of(TypeDe
private final TypeDescription typeDescription;

/**
* Creates a new annotation value that represents a type.
* Creates a new annotation value that representedBy a type.
*
* @param typeDescription The represented type.
*/
Expand Down
Expand Up @@ -280,7 +280,7 @@ public int getModifiers() {
}

/**
* A field description that represents a given field but with a substituted field type.
* A field description that representedBy a given field but with a substituted field type.
*/
class TypeSubstituting extends AbstractFieldDescription {

Expand Down Expand Up @@ -341,7 +341,7 @@ public String getName() {
}

/**
* A token that represents a field's shape. A field token is equal to another token when the other field
* A token that representedBy a field's shape. A field token is equal to another token when the other field
* tokens's name is equal to this token.
*/
class Token implements ByteCodeElement.Token<Token> {
Expand Down
Expand Up @@ -66,12 +66,12 @@ protected FieldList wrap(List<FieldDescription> values) {
class ForLoadedField extends AbstractBase {

/**
* The loaded fields this field list represents.
* The loaded fields this field list representedBy.
*/
private final List<? extends Field> fields;

/**
* Creates a new immutable field list that represents an array of loaded field.
* Creates a new immutable field list that representedBy an array of loaded field.
*
* @param field An array of fields to be represented by this field list.
*/
Expand All @@ -80,7 +80,7 @@ public ForLoadedField(Field... field) {
}

/**
* Creates a new immutable field list that represents an array of loaded field.
* Creates a new immutable field list that representedBy an array of loaded field.
*
* @param fields An array of fields to be represented by this field list.
*/
Expand All @@ -105,7 +105,7 @@ public int size() {
class Explicit extends AbstractBase {

/**
* The list of field descriptions this list represents.
* The list of field descriptions this list representedBy.
*/
private final List<? extends FieldDescription> fieldDescriptions;

Expand Down

0 comments on commit 3b797c2

Please sign in to comment.