org.codehaus.enunciate.contract.json
Class JsonTypeDefinition

java.lang.Object
  extended by net.sf.jelly.apt.decorations.declaration.DecoratedDeclaration
      extended by net.sf.jelly.apt.decorations.declaration.DecoratedMemberDeclaration
          extended by net.sf.jelly.apt.decorations.declaration.DecoratedTypeDeclaration
              extended by net.sf.jelly.apt.decorations.declaration.DecoratedClassDeclaration
                  extended by org.codehaus.enunciate.contract.json.JsonTypeDefinition
All Implemented Interfaces:
com.sun.mirror.declaration.ClassDeclaration, com.sun.mirror.declaration.Declaration, com.sun.mirror.declaration.MemberDeclaration, com.sun.mirror.declaration.TypeDeclaration, JsonType
Direct Known Subclasses:
JsonEnumTypeDefinition, JsonObjectTypeDefinition

public abstract class JsonTypeDefinition
extends net.sf.jelly.apt.decorations.declaration.DecoratedClassDeclaration
implements JsonType

A json type definition.

Author:
Steven Cummings

Field Summary
 
Fields inherited from class net.sf.jelly.apt.decorations.declaration.DecoratedDeclaration
delegate, javaDoc
 
Constructor Summary
protected JsonTypeDefinition(com.sun.mirror.declaration.ClassDeclaration delegate)
          Create a new JsonTypeDefinition.
 
Method Summary
 com.sun.mirror.declaration.ClassDeclaration classDeclaration()
           
static JsonTypeDefinition createTypeDefinition(com.sun.mirror.declaration.ClassDeclaration delegate)
          Create a new JsonTypeDefinition.
 java.lang.String getTypeName()
          
static java.lang.String getTypeName(com.sun.mirror.declaration.TypeDeclaration delegate)
           
 
Methods inherited from class net.sf.jelly.apt.decorations.declaration.DecoratedClassDeclaration
accept, getAnnotation, getConstructors, getMethods, getSuperclass, isClass
 
Methods inherited from class net.sf.jelly.apt.decorations.declaration.DecoratedTypeDeclaration
getFields, getFormalTypeParameters, getNestedTypes, getPackage, getProperties, getQualifiedName, getSuperinterfaces, isAnnotatedType, isEnum, isInterface, isPaired
 
Methods inherited from class net.sf.jelly.apt.decorations.declaration.DecoratedMemberDeclaration
getDeclaringType
 
Methods inherited from class net.sf.jelly.apt.decorations.declaration.DecoratedDeclaration
constructJavaDoc, equals, getAnnotationMirrors, getAnnotations, getDelegate, getDocComment, getDocValue, getJavaDoc, getModifiers, getPosition, getSimpleName, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.mirror.declaration.TypeDeclaration
getFields, getFormalTypeParameters, getNestedTypes, getPackage, getQualifiedName, getSuperinterfaces
 
Methods inherited from interface com.sun.mirror.declaration.MemberDeclaration
getDeclaringType
 
Methods inherited from interface com.sun.mirror.declaration.Declaration
equals, getAnnotationMirrors, getDocComment, getModifiers, getPosition, getSimpleName
 

Constructor Detail

JsonTypeDefinition

protected JsonTypeDefinition(com.sun.mirror.declaration.ClassDeclaration delegate)
Create a new JsonTypeDefinition.

Parameters:
delegate - Declaration to create a JSON type from (must not be null).
Method Detail

createTypeDefinition

public static JsonTypeDefinition createTypeDefinition(com.sun.mirror.declaration.ClassDeclaration delegate)
Create a new JsonTypeDefinition. If delegate is an EnumDeclaration then a JsonEnumTypeDefinition is created. Otherwise a JsonObjectTypeDefinition is created.

Parameters:
delegate - Declaration to create a JSON type from (must not be null).
Returns:
Non-null JsonTypeDefinition.

classDeclaration

public final com.sun.mirror.declaration.ClassDeclaration classDeclaration()
Returns:
Non-null ClassDeclaration that is the source for this JSON type.

getTypeName

public final java.lang.String getTypeName()

Specified by:
getTypeName in interface JsonType
Returns:
Name of the JSON type.

getTypeName

public static java.lang.String getTypeName(com.sun.mirror.declaration.TypeDeclaration delegate)
Parameters:
delegate - Type declaration to get a JSON type name for (must not be null).
Returns:
JSON type name for the given declaration.