Methods Summary |
---|
private AndroidTargetParser | _Constructor(java.lang.String osJarPath)Calls the private constructor of the parser
Constructor<AndroidTargetParser> constructor =
AndroidTargetParser.class.getDeclaredConstructor(String.class);
constructor.setAccessible(true);
return constructor.newInstance(osJarPath);
|
private com.android.ide.eclipse.common.resources.ViewClassInfo | _addGroup(java.lang.Class groupClass)calls the private addGroup() of the parser
Method method = LayoutParamsParser.class.getDeclaredMethod("addGroup", //$NON-NLS-1$
IClassDescriptor.class);
method.setAccessible(true);
return (ViewClassInfo) method.invoke(mParser, new ClassWrapper(groupClass));
|
private com.android.ide.eclipse.common.resources.ViewClassInfo.LayoutParamsInfo | _addLayoutParams(java.lang.Class groupClass)calls the private addLayoutParams() of the parser
Method method = LayoutParamsParser.class.getDeclaredMethod("addLayoutParams", //$NON-NLS-1$
IClassDescriptor.class);
method.setAccessible(true);
return (LayoutParamsInfo) method.invoke(mParser, new ClassWrapper(groupClass));
|
private com.android.ide.eclipse.adt.sdk.IAndroidClassLoader.IClassDescriptor | _findLayoutParams(java.lang.Class groupClass)calls the private findLayoutParams() of the parser
Method method = LayoutParamsParser.class.getDeclaredMethod("findLayoutParams", //$NON-NLS-1$
IClassDescriptor.class);
method.setAccessible(true);
return (IClassDescriptor) method.invoke(mParser, new ClassWrapper(groupClass));
|
private void | _getLayoutClasses()calls the private getLayoutClasses() of the parser
Method method = AndroidTargetParser.class.getDeclaredMethod("getLayoutClasses"); //$NON-NLS-1$
method.setAccessible(true);
method.invoke(mParser);
|
private com.android.ide.eclipse.common.resources.ViewClassInfo.LayoutParamsInfo | _getLayoutParamsInfo(java.lang.Class layoutParamsClass)calls the private getLayoutParamsInfo() of the parser
Method method = LayoutParamsParser.class.getDeclaredMethod("getLayoutParamsInfo", //$NON-NLS-1$
IClassDescriptor.class);
method.setAccessible(true);
return (LayoutParamsInfo) method.invoke(mParser, new ClassWrapper(layoutParamsClass));
|
public void | setUp()
mParser = new MockLayoutParamsParser();
|
public void | tearDown()
|
public final void | testFindLayoutParams()
assertEquals(mock_android.view.ViewGroup.LayoutParams.class,
((ClassWrapper)_findLayoutParams(mock_android.view.ViewGroup.class)).wrappedClass());
assertEquals(mock_android.widget.LinearLayout.LayoutParams.class,
((ClassWrapper)_findLayoutParams(mock_android.widget.LinearLayout.class)).wrappedClass());
assertEquals(mock_android.widget.TableLayout.LayoutParams.class,
((ClassWrapper)_findLayoutParams(mock_android.widget.TableLayout.class)).wrappedClass());
|
public final void | testGetLayoutClasses()
// _getLayoutClasses();
|
public final void | testGetLayoutParamsInfo()
LayoutParamsInfo info1 = _getLayoutParamsInfo(
mock_android.view.ViewGroup.LayoutParams.class);
assertNotNull(info1);
// ViewGroup.LayoutData has Object for superClass, which we don't map
assertNull(info1.getSuperClass());
LayoutParamsInfo info2 = _getLayoutParamsInfo(
mock_android.widget.LinearLayout.LayoutParams.class);
assertNotNull(info2);
// LinearLayout.LayoutData links to ViewGroup.LayoutParams
assertSame(info1, info2.getSuperClass());
LayoutParamsInfo info3 = _getLayoutParamsInfo(
mock_android.widget.TableLayout.LayoutParams.class);
assertNotNull(info3);
// TableLayout.LayoutData does not link to ViewGroup.LayoutParams nor
// LinearLayout.LayoutParams
assertNotSame(info1, info3.getSuperClass());
assertNotSame(info2, info3.getSuperClass());
// TableLayout.LayoutParams => ViewGroup.MarginLayoutParams => ViewGroup.LayoutParams
assertSame(info1, info3.getSuperClass().getSuperClass());
|