org.springframework.roo.classpath.details
Class DefaultItdTypeDetailsBuilder

java.lang.Object
  extended by org.springframework.roo.classpath.details.DefaultItdTypeDetailsBuilder

public final class DefaultItdTypeDetailsBuilder
extends Object

Assists in the building of an ItdTypeDetails instance.

All methods on this class (which does NOT include the constructor) accept null arguments, and will automatically ignore any attempt to add an IdentifiableMember that is not use the same declaredByMetadataId as when the instance was constructed.

In addition, any method on this class which accepts an InvocableMemberMetadata will verify a InvocableMemberMetadata.getBody() is provided. This therefore detects programming errors which result from requesting a member to be included in an ITD but without providing the actual executable body for that member.

Since:
1.0
Author:
Ben Alex, Stefan Schmidt

Method Summary
 void addConstructor(ConstructorMetadata md)
           
 void addExtendsType(org.springframework.roo.model.JavaType type)
           
 void addField(FieldMetadata md)
           
 void addFieldAnnotation(DeclaredFieldAnnotationDetails declaredFieldAnnotationDetails)
           
 void addImplementsType(org.springframework.roo.model.JavaType type)
           
 void addMethod(MethodMetadata md)
           
 void addMethodAnnotation(DeclaredMethodAnnotationDetails declaredMethodAnnotationDetails)
           
 void addTypeAnnotation(AnnotationMetadata md)
           
 DefaultItdTypeDetails build()
           
 org.springframework.roo.model.ImportRegistrationResolver getImportRegistrationResolver()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

build

public DefaultItdTypeDetails build()
Returns:
an immutable DefaultItdTypeDetails representing the current state of the builder (never null)

getImportRegistrationResolver

public org.springframework.roo.model.ImportRegistrationResolver getImportRegistrationResolver()

addConstructor

public void addConstructor(ConstructorMetadata md)

addField

public void addField(FieldMetadata md)

addMethod

public void addMethod(MethodMetadata md)

addExtendsType

public void addExtendsType(org.springframework.roo.model.JavaType type)

addImplementsType

public void addImplementsType(org.springframework.roo.model.JavaType type)

addTypeAnnotation

public void addTypeAnnotation(AnnotationMetadata md)

addFieldAnnotation

public void addFieldAnnotation(DeclaredFieldAnnotationDetails declaredFieldAnnotationDetails)

addMethodAnnotation

public void addMethodAnnotation(DeclaredMethodAnnotationDetails declaredMethodAnnotationDetails)


Copyright © 2009-2010 VMware, Inc. All Rights Reserved.