public final boolean addConstructor(final ConstructorMetadata constructor) { if (constructor == null) { return false; } return addConstructor(new ConstructorMetadataBuilder(constructor)); }
public final boolean addField(final FieldMetadata field) { if (field == null) { return false; } return addField(new FieldMetadataBuilder(field)); }
public final boolean addInnerType(final ClassOrInterfaceTypeDetailsBuilder innerType) { /* * There was originally a check to see if the declaredMIDs matched, but * this doesn't really make much sense. We need to come up with a better * model for inner types. I thought about adding an enclosingType * attribute but this prototype just felt like a hack. In the short term * I have just disabled the MID comparison as I think this is fairly * reasonable until this is given some more time. JTT - 24/08/11 */ if (innerType == null) { return false; } onAddInnerType(innerType); return declaredInnerTypes.add(innerType); }
for (final FieldMetadataBuilder targetField : targetBuilder.getDeclaredFields()) { if (targetField.getFieldType().equals(field.getFieldType()) && targetField.getFieldName().equals(field.getFieldName())) { targetBuilder.addField(field); for (final MethodMetadataBuilder targetMethod : targetBuilder.getDeclaredMethods()) { if (targetMethod.getMethodName().equals(method.getMethodName()) && targetMethod.getParameterTypes().equals(method.getParameterTypes())) { targetBuilder.addMethod(method); for (final AnnotationMetadataBuilder targetAnnotation : targetBuilder.getAnnotations()) { if (targetAnnotation.getAnnotationType().equals(annotation.getAnnotationType())) { continue annotationAdditions; targetBuilder.addAnnotation(annotation); targetBuilder.append(getCustomData().build()); .getDeclaredConstructors()) { if (targetConstructor.getParameterTypes().equals(constructor.getParameterTypes())) { continue constructorAdditions; targetBuilder.addConstructor(constructor); targetBuilder.addInitializer(initializer); .getDeclaredInnerTypes()) {
/** * Sets the declared methods for this builder; equivalent to calling * {@link #addMethod(MethodMetadataBuilder)} once for each item of the given * {@link Iterable}. * * @param declaredMethods the methods to set; can be <code>null</code> for * none, otherwise the {@link Iterable} is defensively copied */ public final void setDeclaredMethods( final Iterable<? extends MethodMetadataBuilder> declaredMethods) { this.declaredMethods.clear(); if (declaredMethods != null) { for (final MethodMetadataBuilder methodBuilder : declaredMethods) { addMethod(methodBuilder); } } }
for (final FieldMetadataBuilder targetField : targetBuilder.getDeclaredFields()) { if (targetField.getFieldType().equals(field.getFieldType()) && targetField.getFieldName().equals(field.getFieldName())) { targetBuilder.addField(field); for (final MethodMetadataBuilder targetMethod : targetBuilder.getDeclaredMethods()) { if (targetMethod.getMethodName().equals(method.getMethodName()) && targetMethod.getParameterTypes().equals(method.getParameterTypes())) { targetBuilder.addMethod(method); for (final AnnotationMetadataBuilder targetAnnotation : targetBuilder.getAnnotations()) { if (targetAnnotation.getAnnotationType().equals(annotation.getAnnotationType())) { continue annotationAdditions; targetBuilder.addAnnotation(annotation); targetBuilder.append(getCustomData().build()); .getDeclaredConstructors()) { if (targetConstructor.getParameterTypes().equals(constructor.getParameterTypes())) { continue constructorAdditions; targetBuilder.addConstructor(constructor); targetBuilder.addInitializer(initializer); .getDeclaredInnerTypes()) {
/** * Adds the given method to this builder * * @param method the method to add; can be <code>null</code> * @return <code>true</code> if the state of this builder changed */ public final boolean addMethod(final MethodMetadata method) { if (method == null) { return false; } return addMethod(new MethodMetadataBuilder(method)); }
public final boolean addInnerType(final ClassOrInterfaceTypeDetailsBuilder innerType) { /* * There was originally a check to see if the declaredMIDs matched, but * this doesn't really make much sense. We need to come up with a better * model for inner types. I thought about adding an enclosingType * attribute but this prototype just felt like a hack. In the short term * I have just disabled the MID comparison as I think this is fairly * reasonable until this is given some more time. JTT - 24/08/11 */ if (innerType == null) { return false; } onAddInnerType(innerType); return declaredInnerTypes.add(innerType); }
/** * Sets the declared methods for this builder; equivalent to calling * {@link #addMethod(MethodMetadataBuilder)} once for each item of the given * {@link Iterable}. * * @param declaredMethods the methods to set; can be <code>null</code> for * none, otherwise the {@link Iterable} is defensively copied */ public final void setDeclaredMethods( final Iterable<? extends MethodMetadataBuilder> declaredMethods) { this.declaredMethods.clear(); if (declaredMethods != null) { for (final MethodMetadataBuilder methodBuilder : declaredMethods) { addMethod(methodBuilder); } } }
public final boolean addConstructor(final ConstructorMetadata constructor) { if (constructor == null) { return false; } return addConstructor(new ConstructorMetadataBuilder(constructor)); }
public final boolean addField(final FieldMetadata field) { if (field == null) { return false; } return addField(new FieldMetadataBuilder(field)); }
/** * Adds the given method to this builder * * @param method the method to add; can be <code>null</code> * @return <code>true</code> if the state of this builder changed */ public final boolean addMethod(final MethodMetadata method) { if (method == null) { return false; } return addMethod(new MethodMetadataBuilder(method)); }