FileDocCategorySizeDatePackage
ViewClassInfo.javaAPI DocAndroid 1.5 API5668Wed May 06 22:41:10 BST 2009com.android.ide.eclipse.common.resources

ViewClassInfo

public class ViewClassInfo extends Object
Information needed to represent a View or ViewGroup (aka Layout) item in the layout hierarchy, as extracted from the main android.jar and the associated attrs.xml.

Fields Summary
private boolean
mIsLayout
Is this a layout class (i.e. ViewGroup) or just a view?
private String
mCanonicalClassName
FQCN e.g. android.view.View, never null.
private String
mShortClassName
Short class name, e.g. View, never null.
private ViewClassInfo
mSuperClass
Super class. Can be null.
private String
mJavaDoc
Short javadoc. Can be null.
private com.android.ide.eclipse.common.resources.DeclareStyleableInfo.AttributeInfo[]
mAttributes
Attributes for this view or view group. Can be empty but never null.
public LayoutParamsInfo
mLayoutData
Layout data info for a layout class. Null for all non-layout classes and always non-null for a layout class.
Constructors Summary
public ViewClassInfo(boolean isLayout, String canonicalClassName, String shortClassName)

        mIsLayout = isLayout;
        mCanonicalClassName = canonicalClassName;
        mShortClassName = shortClassName;
        mAttributes = new AttributeInfo[0];
    
Methods Summary
public com.android.ide.eclipse.common.resources.DeclareStyleableInfo.AttributeInfo[]getAttributes()
Returns the attributes for this view or view group. Maybe empty but not null.

        return mAttributes;
    
public java.lang.StringgetCanonicalClassName()
Returns FQCN e.g. "android.view.View"

        return mCanonicalClassName;
    
public java.lang.StringgetJavaDoc()
Returns a short javadoc

        return mJavaDoc;
    
public com.android.ide.eclipse.common.resources.ViewClassInfo$LayoutParamsInfogetLayoutData()
Returns the LayoutData info for layout classes. Null for non-layout view classes.

        return mLayoutData;
    
public java.lang.StringgetShortClassName()
Returns short class name, e.g. "View"

        return mShortClassName;
    
public com.android.ide.eclipse.common.resources.ViewClassInfogetSuperClass()
Returns the super class. Can be null.

        return mSuperClass;
    
public booleanisLayout()
Returns whether this is a layout class (i.e. ViewGroup) or just a View

        return mIsLayout;
    
public voidsetAttributes(com.android.ide.eclipse.common.resources.DeclareStyleableInfo.AttributeInfo[] attributes)
Sets the list of attributes for this View or ViewGroup.

        mAttributes = attributes;
    
public voidsetJavaDoc(java.lang.String javaDoc)
Sets the javadoc for this View or ViewGroup.

        mJavaDoc = javaDoc;
    
public voidsetLayoutParams(com.android.ide.eclipse.common.resources.ViewClassInfo$LayoutParamsInfo layoutData)
Sets the {@link LayoutParamsInfo} for layout classes. Does nothing for non-layout view classes.

        if (mIsLayout) {
            mLayoutData = layoutData;
        }
    
public voidsetSuperClass(com.android.ide.eclipse.common.resources.ViewClassInfo superClass)
Sets a link on the info of the super class of this View or ViewGroup.

The super class info must be of the same kind (i.e. group to group or view to view) except for the top ViewGroup which links to the View info.

The super class cannot be null except for the top View info.

        mSuperClass = superClass;