List of usage examples for java.lang IllegalAccessError IllegalAccessError
public IllegalAccessError(String s)
IllegalAccessError
with the specified detail message. From source file:net.grandcentrix.thirtyinch.TiPresenter.java
/** * @deprecated use {@link #onAttachView(TiView)} instead */// w ww.j av a 2 s . c o m @Deprecated protected void onWakeUp() { if (mCalled) { throw new IllegalAccessError("don't call #onWakeUp() directly, call #attachView(TiView)"); } mCalled = true; }
From source file:com.coolerfall.uiart.PagerSlidingTabStrip.java
/** * Set number showing in number tab.//w w w . ja v a 2 s. c o m * * @param number number to show */ public void setNumber(int position, int number) { if (position > mTabCount) { throw new IllegalArgumentException("the position is not valid"); } if (!(mViewPager.getAdapter() instanceof NumTabProvider)) { throw new IllegalAccessError( "the tab is not number tab, " + "the adapter should implement NumTabProvider"); } /* update the number text */ View v = mTabsContainer.getChildAt(position); if (v instanceof LinearLayout) { View tabNum = ((LinearLayout) v).getChildAt(1); if (tabNum instanceof TextView) { TextView textNum = (TextView) tabNum; if (number == 0) { textNum.setVisibility(View.GONE); } else { textNum.setVisibility(View.VISIBLE); textNum.setText(Integer.toString(number)); } } } }
From source file:org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.java
private String getProcessKey(InputStream workflowDefinition) throws Exception { try {/* w ww . j av a2 s. c o m*/ InputSource inputSource = new InputSource(workflowDefinition); DOMParser parser = new DOMParser(); parser.parse(inputSource); Document document = parser.getDocument(); NodeList elemnts = document.getElementsByTagName("process"); if (elemnts.getLength() < 1) { throw new IllegalArgumentException("The input stream does not contain a process definition!"); } NamedNodeMap attributes = elemnts.item(0).getAttributes(); Node idAttrib = attributes.getNamedItem("id"); if (idAttrib == null) { throw new IllegalAccessError("The process definition does not have an id!"); } if (activitiUtil.isMultiTenantWorkflowDeploymentEnabled()) { // Workflow-definition is deployed tenant-aware, key should be altered return factory.getDomainProcessKey(idAttrib.getNodeValue()); } else { return idAttrib.getNodeValue(); } } finally { workflowDefinition.close(); } }
From source file:com.gelakinetic.mtgfam.FamiliarActivity.java
/** * A friendly reminder to not use the regular FragmentManager, ever * * @return Return? How about an exception! *///from w w w .java 2 s . c o m @Override @NotNull public android.app.FragmentManager getFragmentManager() { throw new IllegalAccessError("Use .getSupportFragmentManager()"); }
From source file:hudson.plugins.project_inheritance.projects.InheritanceProject.java
/** * Sets the parameterized workspace variable. Will only work, if called * <b>directly</b> by a "TestCase" class. Will throw an exception otherwise. * /* w w w .j a v a 2 s .c om*/ * @deprecated Must only be used from within {@link TestCase} classes. * * @param workspace the new value for the parameterized workspace */ @Deprecated public void setRawParameterizedWorkspace(String workspace) { if (Reflection.calledFromClass(2, TestCase.class)) { this.parameterizedWorkspace = workspace; } else { throw new IllegalAccessError("Should not be called outside by something other than a TestCase class"); } }