Class ClassDescriptor

java.lang.Object
com.google.gwt.core.ext.soyc.coderef.EntityDescriptor
com.google.gwt.core.ext.soyc.coderef.ClassDescriptor

public class ClassDescriptor extends EntityDescriptor
A succinct code representation for classes.
  • Constructor Details

    • ClassDescriptor

      public ClassDescriptor(String className, String packageName)
  • Method Details

    • from

      public static ClassDescriptor from(com.google.gwt.dev.jjs.ast.JDeclaredType classType)
      Creates a class descriptor from a JDeclaredType.
    • addField

      public void addField(FieldDescriptor fieldDescriptor)
    • addMethod

      public void addMethod(MethodDescriptor methodDescriptor)
    • fieldFrom

      public FieldDescriptor fieldFrom(com.google.gwt.dev.jjs.ast.JField field)
      Returns a field descriptor from a JField. If the field descriptor is not in the current class descriptor, it will be added.
    • getField

      public FieldDescriptor getField(String fieldName)
      Returns the field descriptor associated to the given field name.
    • getFields

      public Collection<FieldDescriptor> getFields()
    • getFullName

      public String getFullName()
      Description copied from class: EntityDescriptor
      Returns the full qualified name.
      Specified by:
      getFullName in class EntityDescriptor
    • getMethod

      public MethodDescriptor getMethod(String methodSignature)
      Returns the method descriptor associated to the given original method signature.
    • getMethods

      public Collection<MethodDescriptor> getMethods()
    • getPackageName

      public String getPackageName()
    • getTypeReference

      public com.google.gwt.dev.jjs.ast.JDeclaredType getTypeReference()
    • methodFrom

      public MethodDescriptor methodFrom(com.google.gwt.dev.jjs.ast.JMethod method, String signature)
      Returns a method descriptor from a JMethod and its original signature (prior any modifications). If the method descriptor is not in the current class descriptor, it will be added.