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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.gwt.core.ext.soyc.coderef.EntityDescriptor
EntityDescriptor.Fragment
-
-
Field Summary
-
Fields inherited from class com.google.gwt.core.ext.soyc.coderef.EntityDescriptor
fragments, name, obfuscatedNames
-
-
Constructor Summary
Constructors Constructor Description ClassDescriptor(java.lang.String className, java.lang.String packageName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddField(FieldDescriptor fieldDescriptor)voidaddMethod(MethodDescriptor methodDescriptor)FieldDescriptorfieldFrom(com.google.gwt.dev.jjs.ast.JField field)Returns a field descriptor from a JField.static ClassDescriptorfrom(com.google.gwt.dev.jjs.ast.JDeclaredType classType)Creates a class descriptor from a JDeclaredType.FieldDescriptorgetField(java.lang.String fieldName)Returns the field descriptor associated to the given field name.java.util.Collection<FieldDescriptor>getFields()java.lang.StringgetFullName()Returns the full qualified name.MethodDescriptorgetMethod(java.lang.String methodSignature)Returns the method descriptor associated to the given original method signature.java.util.Collection<MethodDescriptor>getMethods()java.lang.StringgetPackageName()com.google.gwt.dev.jjs.ast.JDeclaredTypegetTypeReference()MethodDescriptormethodFrom(com.google.gwt.dev.jjs.ast.JMethod method, java.lang.String signature)Returns a method descriptor from a JMethod and its original signature (prior any modifications).-
Methods inherited from class com.google.gwt.core.ext.soyc.coderef.EntityDescriptor
addFragment, addObfuscatedName, getFragments, getName, getObfuscatedNames
-
-
-
-
Method Detail
-
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(java.lang.String fieldName)
Returns the field descriptor associated to the given field name.
-
getFields
public java.util.Collection<FieldDescriptor> getFields()
-
getFullName
public java.lang.String getFullName()
Description copied from class:EntityDescriptorReturns the full qualified name.- Specified by:
getFullNamein classEntityDescriptor
-
getMethod
public MethodDescriptor getMethod(java.lang.String methodSignature)
Returns the method descriptor associated to the given original method signature.
-
getMethods
public java.util.Collection<MethodDescriptor> getMethods()
-
getPackageName
public java.lang.String getPackageName()
-
getTypeReference
public com.google.gwt.dev.jjs.ast.JDeclaredType getTypeReference()
-
methodFrom
public MethodDescriptor methodFrom(com.google.gwt.dev.jjs.ast.JMethod method, java.lang.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.
-
-