T - the type of MemberHoldingTypeDetails being builtpublic abstract class AbstractMemberHoldingTypeDetailsBuilder<T extends MemberHoldingTypeDetails> extends AbstractIdentifiableAnnotatedJavaStructureBuilder<T>
Builder to assist building MemberHoldingTypeDetails
implementations.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMemberHoldingTypeDetailsBuilder(MemberHoldingTypeDetails existing)
Constructor
|
protected |
AbstractMemberHoldingTypeDetailsBuilder(String declaredbyMetadataId)
Constructor
|
protected |
AbstractMemberHoldingTypeDetailsBuilder(String declaredbyMetadataId,
MemberHoldingTypeDetails existing)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addConstructor(ConstructorMetadata constructor) |
boolean |
addConstructor(ConstructorMetadataBuilder constructorBuilder) |
boolean |
addExtendsTypes(org.springframework.roo.model.JavaType extendsType) |
boolean |
addField(FieldMetadata field) |
boolean |
addField(FieldMetadataBuilder fieldBuilder) |
boolean |
addImplementsType(org.springframework.roo.model.JavaType implementsType) |
abstract void |
addImports(Collection<ImportMetadata> imports)
Adds the given imports to this builder if not already present
|
boolean |
addInitializer(InitializerMetadataBuilder initializer) |
boolean |
addInnerType(ClassOrInterfaceTypeDetails innerType) |
boolean |
addInnerType(ClassOrInterfaceTypeDetailsBuilder innerType) |
boolean |
addMethod(MethodMetadata method)
Adds the given method to this builder
|
boolean |
addMethod(MethodMetadataBuilder methodBuilder)
Adds the given method to this builder
|
List<ConstructorMetadata> |
buildConstructors() |
List<FieldMetadata> |
buildFields() |
List<InitializerMetadata> |
buildInitializers() |
List<ClassOrInterfaceTypeDetails> |
buildInnerTypes() |
List<MethodMetadata> |
buildMethods() |
void |
clearDeclaredMethods()
Removes all declared methods from this builder
|
List<ConstructorMetadataBuilder> |
getDeclaredConstructors() |
List<FieldMetadataBuilder> |
getDeclaredFields() |
List<InitializerMetadataBuilder> |
getDeclaredInitializers() |
List<ClassOrInterfaceTypeDetailsBuilder> |
getDeclaredInnerTypes() |
List<MethodMetadataBuilder> |
getDeclaredMethods()
Returns the declared methods in this builder
|
List<org.springframework.roo.model.JavaType> |
getExtendsTypes()
Returns the types that the built instance will extend, if any.
|
List<org.springframework.roo.model.JavaType> |
getImplementsTypes() |
protected void |
onAddConstructor(ConstructorMetadataBuilder constructorBuilder) |
protected void |
onAddExtendsTypes(org.springframework.roo.model.JavaType extendsType) |
protected void |
onAddField(FieldMetadataBuilder fieldBuilder) |
protected void |
onAddImplementType(org.springframework.roo.model.JavaType implementsType) |
protected void |
onAddInitializer(InitializerMetadataBuilder initializer) |
protected void |
onAddInnerType(ClassOrInterfaceTypeDetailsBuilder innerType) |
protected void |
onAddMethod(MethodMetadataBuilder methodBuilder)
Subclasses can perform their own actions upon a method builder being
added.
|
boolean |
removeAll(Collection<? extends MethodMetadataBuilder> methodsToRemove)
Removes the given methods from this builder
|
void |
removeExtendsTypes(org.springframework.roo.model.JavaType... superTypes)
Ensures that the type being built does not extend any of the given types
|
void |
setDeclaredConstructors(Collection<? extends ConstructorMetadataBuilder> declaredConstructors)
Sets the builders for the constructors that are to be declared
|
void |
setDeclaredFields(Collection<? extends FieldMetadataBuilder> declaredFields)
Sets the builders for the fields to be declared by the type being built
|
void |
setDeclaredInitializers(Collection<? extends InitializerMetadataBuilder> declaredInitializers)
Sets the builders for the initializers of the type being built
|
void |
setDeclaredInnerTypes(Collection<? extends ClassOrInterfaceTypeDetailsBuilder> declaredInnerTypes)
Sets the builders for the inner types of the type being built
|
void |
setDeclaredMethods(Iterable<? extends MethodMetadataBuilder> declaredMethods)
Sets the declared methods for this builder; equivalent to calling
addMethod(MethodMetadataBuilder) once for each item of the given
Iterable. |
void |
setExtendsTypes(Collection<? extends org.springframework.roo.model.JavaType> extendsTypes)
Sets the types that the built instance will extend
|
void |
setImplementsTypes(Collection<? extends org.springframework.roo.model.JavaType> implementsTypes)
Sets the types to be implemented by the type being built
|
addAnnotation, addAnnotation, buildAnnotations, getAnnotations, getDeclaredTypeAnnotation, onAddAnnotation, removeAnnotation, setAnnotations, setAnnotations, updateTypeAnnotation, updateTypeAnnotation, updateTypeAnnotationgetDeclaredByMetadataId, getModifier, setModifierappend, getCustomData, putCustomData, setCustomDataprotected AbstractMemberHoldingTypeDetailsBuilder(MemberHoldingTypeDetails existing)
existing - protected AbstractMemberHoldingTypeDetailsBuilder(String declaredbyMetadataId)
declaredbyMetadataId - protected AbstractMemberHoldingTypeDetailsBuilder(String declaredbyMetadataId, MemberHoldingTypeDetails existing)
declaredbyMetadataId - existing - public final boolean addConstructor(ConstructorMetadata constructor)
public final boolean addConstructor(ConstructorMetadataBuilder constructorBuilder)
public final boolean addExtendsTypes(org.springframework.roo.model.JavaType extendsType)
public final boolean addField(FieldMetadata field)
public final boolean addField(FieldMetadataBuilder fieldBuilder)
public final boolean addImplementsType(org.springframework.roo.model.JavaType implementsType)
public abstract void addImports(Collection<ImportMetadata> imports)
imports - the imports to add; can be nullpublic final boolean addInitializer(InitializerMetadataBuilder initializer)
public final boolean addInnerType(ClassOrInterfaceTypeDetails innerType)
public final boolean addInnerType(ClassOrInterfaceTypeDetailsBuilder innerType)
public final boolean addMethod(MethodMetadata method)
method - the method to add; can be nulltrue if the state of this builder changedpublic final boolean addMethod(MethodMetadataBuilder methodBuilder)
methodBuilder - the method builder to add; ignored if
null or if its MID doesn't match this builder's
MIDpublic final List<ConstructorMetadata> buildConstructors()
public final List<FieldMetadata> buildFields()
public final List<InitializerMetadata> buildInitializers()
public final List<ClassOrInterfaceTypeDetails> buildInnerTypes()
public final List<MethodMetadata> buildMethods()
public void clearDeclaredMethods()
public final List<ConstructorMetadataBuilder> getDeclaredConstructors()
public final List<FieldMetadataBuilder> getDeclaredFields()
public List<InitializerMetadataBuilder> getDeclaredInitializers()
public List<ClassOrInterfaceTypeDetailsBuilder> getDeclaredInnerTypes()
public final List<MethodMetadataBuilder> getDeclaredMethods()
public final List<org.springframework.roo.model.JavaType> getExtendsTypes()
null listpublic final List<org.springframework.roo.model.JavaType> getImplementsTypes()
protected void onAddConstructor(ConstructorMetadataBuilder constructorBuilder)
protected void onAddExtendsTypes(org.springframework.roo.model.JavaType extendsType)
protected void onAddField(FieldMetadataBuilder fieldBuilder)
protected void onAddImplementType(org.springframework.roo.model.JavaType implementsType)
protected void onAddInitializer(InitializerMetadataBuilder initializer)
protected void onAddInnerType(ClassOrInterfaceTypeDetailsBuilder innerType)
protected void onAddMethod(MethodMetadataBuilder methodBuilder)
methodBuilder - the method being added; never nullpublic boolean removeAll(Collection<? extends MethodMetadataBuilder> methodsToRemove)
methodsToRemove - can be null for noneList.removeAll(Collection)public void removeExtendsTypes(org.springframework.roo.model.JavaType... superTypes)
superTypes - the types to remove as supertypespublic final void setDeclaredConstructors(Collection<? extends ConstructorMetadataBuilder> declaredConstructors)
declaredConstructors - can be null for nonepublic final void setDeclaredFields(Collection<? extends FieldMetadataBuilder> declaredFields)
declaredFields - the builders to set (can be null for
none)public void setDeclaredInitializers(Collection<? extends InitializerMetadataBuilder> declaredInitializers)
declaredInitializers - the builders to set; can be null
for nonepublic void setDeclaredInnerTypes(Collection<? extends ClassOrInterfaceTypeDetailsBuilder> declaredInnerTypes)
declaredInnerTypes - the builders to set; can be null
for nonepublic final void setDeclaredMethods(Iterable<? extends MethodMetadataBuilder> declaredMethods)
addMethod(MethodMetadataBuilder) once for each item of the given
Iterable.declaredMethods - the methods to set; can be null for
none, otherwise the Iterable is defensively copiedpublic final void setExtendsTypes(Collection<? extends org.springframework.roo.model.JavaType> extendsTypes)
extendsTypes - can be null for nonepublic final void setImplementsTypes(Collection<? extends org.springframework.roo.model.JavaType> implementsTypes)
implementsTypes - can be null for noneCopyright © 2009–2017. All rights reserved.