Java 8 ORB - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 ORB class.

This code example shows how to use the following methods:resolve_initial_references, run
        //not created 
    } 
     
     
    static int run(ORB orb, String[] args) throws UserException {
        // 
        // Resolve Root POA 
        // 
        POA poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
 
        // 
        // Get a reference to the POA manager 
        // 
        POAManager manager = poa.the_POAManager();
 
        // 
        // Create implementation object 
        // 
        BankImpl bankImpl = new BankImpl(poa);
 

6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:create_interface_tc, create_output_stream, string_to_object
     
    @Test
    public void testWriteObject() throws IOException {
        URL refUrl = getClass().getResource("/references/account.ref");
        String oRef = IOUtils.toString(refUrl.openStream()).trim();
        org.omg.CORBA.Object objRef = 
            orb.string_to_object(oRef);
        assertNotNull(objRef);
         
        // create a test object 
        org.apache.cxf.binding.corba.wsdl.Object objectType = 
            new org.apache.cxf.binding.corba.wsdl.Object(); 
        objectType.setRepositoryID("IDL:Account:1.0");
        objectType.setBinding(new QName("AccountCORBABinding"));
         
        QName objectName = new QName("TestObject");
        QName objectIdlType = new QName("corbaatm:TestObject");
        TypeCode objectTC = orb.create_interface_tc("IDL:Account:1.0", "TestObject");
         
        CorbaObjectReferenceHandler obj = new CorbaObjectReferenceHandler(objectName, objectIdlType, 

5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:create_interface_tc, create_output_stream, string_to_object
        assertTrue(obj.getValue().equals(new java.math.BigDecimal("12345.67")));
    } 
     
    @Test
    public void testReadObjectReference() throws IOException {
        OutputStream oStream = orb.create_output_stream();
         
        URL refUrl = getClass().getResource("/references/account.ref");
        String oRef = IOUtils.toString(refUrl.openStream()).trim();
        org.omg.CORBA.Object objRef = 
            orb.string_to_object(oRef);
         
        assertNotNull(objRef);
        oStream.write_Object(objRef);
        // we need an ORBinstance to handle reading objects so use the input stream  
        InputStream iStream = oStream.create_input_stream();
         
        CorbaObjectReader reader = new CorbaObjectReader(iStream);
         
        // create a test object 

5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:setDuration, setFillAfter, setFillEnabled, setInterpolator
			if(olddegree == 0 && newdegree == 270){
				newdegree = -90;
			} else if(olddegree == 270 && newdegree == 0){
				newdegree = 360;
			} 
			retval = new RotateAnimation(olddegree,
					newdegree,
					Animation.RELATIVE_TO_SELF,
					0.5f, 
					Animation.RELATIVE_TO_SELF,
					0.5f); 
 
			retval.setDuration(500);
			retval.setFillEnabled(true);
			retval.setFillAfter(true);
			retval.setInterpolator(new DecelerateInterpolator());
		} 
 
		return retval;
	} 
	 
8
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:setDuration, setFillAfter, setInterpolator, setStartOffset
This code example shows how to use the following methods:
	 
	@Test 
	public void testAnimationList() { 
		Animation alpha = new AlphaAnimation(1f, 2f);
		Animation translate =  new TranslateAnimation(1f, 2f, 3f, 4f);
		Animation rotate = new RotateAnimation(1f, 2f);
		set.addAnimation(alpha);
		set.addAnimation(translate);
		set.addAnimation(rotate);
		 
		List<Animation> list = shadow.getAnimations();
        assertThat(list.size()).isEqualTo(3);
        assertThat(list.get(0)).isSameAs(alpha);
        assertThat(list.get(1)).isSameAs(translate);
        assertThat(list.get(2)).isSameAs(rotate);
	} 
 
} 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:centerX
        ViewGroup.MarginLayoutParams param = (ViewGroup.MarginLayoutParams) arrow.getLayoutParams();
        param.leftMargin = getArrowLeftMargin(arrow);
    } 
     
    protected int getArrowLeftMargin(View arrow) {
    	return mRect.centerX() - (arrow.getMeasuredWidth()) / 2;    	
    } 
 
    private void prepareAnimationStyle() { 
 
        final int screenWidth = mScreenWidth;
        final boolean onTop = mIsOnTop;
        final int arrowPointX = mRect.centerX();
 
        if (arrowPointX <= screenWidth / 4) {
            setAnimationStyle(onTop ? R.style.GreenDroid_Animation_PopUp_Left
                    : R.style.GreenDroid_Animation_PopDown_Left); 
        } else if (arrowPointX >= 3 * screenWidth / 4) {
            setAnimationStyle(onTop ? R.style.GreenDroid_Animation_PopUp_Right
                    : R.style.GreenDroid_Animation_PopDown_Right); 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:centerX, centerY, height, width
    /** 
     * Returns center x-coordinate of this arc shape. 
     * @return center x-coordinate of this arc shape 
     */ 
    public float getCenterX() { 
        return mOval.centerX();
    } 
     
    /** 
     * Returns center y-coordinate of this arc shape. 
     * @return center y-coordinate of this arc shape 
     */ 
    public float getCenterY() { 
        return mOval.centerY();
    } 
     
    /** 
     * Returns start angle of the arc in degrees. 
     * @return The start angle of the arc in degrees 
     */ 

7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getMatrix, restore, rotateX, rotateY, rotateZ
        final float rX = mRotationX;
        final float rY = mRotationY;
        final float rZ = mRotationZ;
        if ((rX != 0) || (rY != 0) || (rZ != 0)) {
            final Camera camera = mCamera;
            camera.save();
            camera.rotateX(rX);
            camera.rotateY(rY);
            camera.rotateZ(-rZ);
            camera.getMatrix(m);
            camera.restore();
            m.preTranslate(-pX, -pY);
            m.postTranslate(pX, pY);
        } 
 
        final float sX = mScaleX;
        final float sY = mScaleY;
        if ((sX != 1.0f) || (sY != 1.0f)) {
            m.postScale(sX, sY);
            final float sPX = -(pX / w) * ((sX * w) - w);
9
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getA, getB, getField
       EllipticCurve curve, 
       byte[] encoded)
    { 
        ECCurve c = null;
         
        if (curve.getField() instanceof ECFieldFp)
        { 
            c = new ECCurve.Fp(
                    ((ECFieldFp)curve.getField()).getP(), curve.getA(), curve.getB());
        } 
        else 
        { 
            int k[] = ((ECFieldF2m)curve.getField()).getMidTermsOfReductionPolynomial();
             
            if (k.length == 3)
            { 
                c = new ECCurve.F2m(
                        ((ECFieldF2m)curve.getField()).getM(), k[2], k[1], k[0], curve.getA(), curve.getB());
            } 
            else 

7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Java 8 ORB Methods: